-
Bug
-
Resolution: Fixed
-
P4
-
9, 11, 14, 15, 16
-
b14
With JDK-8074096 (changeset http://hg.openjdk.java.net/jdk9/dev/jdk/rev/676ec3e5cfc3), most warnings in the JDK native libraries were disabled to minimize the noise when building.
One of the library that had warnings disabled is libfontmanager, in make/lib/Awt2dLibraries.gmk.
The following warnings are disabled for this library:
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast reorder delete-non-virtual-dtor
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types
DISABLED_WARNINGS_solstudio := truncwarn
DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090
This library has some additional quirks. It mixes C and C++ source code, and the warning handling framework does not really support this. As a result, two of the gcc warnings are C++ warnings only, and when applied to a C file, gcc emits (another) warning about this.
The same problem applies to solstudio, where the C compiler warns about truncwarn, which is a C++ only warning. Also, C specific warnings were not possible to disable using this framework.
(Note that warnings are disabled per toolchain type (essentially, compiler). Also note that disabling warnings does not work for gcc prior to version 4.4.)
Blindly hiding warnings is just sweeping the problems under the rug. On the other hand, not all warnings are meaningful to fix in the source code.
The expected outcome of this bug is, for each disabled warning category, either:
1) The code is fixed so the warning can be re-enabled (by removing it from the list of disabled warnings for that library), or
2) The warning is kept disabled, but in that case a rationale added to the stanza for that library in the makefile.
Incremental builds is helpful when testing the effect of warnings. Once the build has fully finished, if the list of warnings is modified for this library,
only that library is rebuilt on future calls to make (without clean). This makes it easy to spot the effect of re-enabling warnings for a single library.
For reference, the log files prior and afterJDK-8074096 was pushed is stored here:
http://cr.openjdk.java.net/~ihse/no-warnings/saved-logs-for-JDK-8074096/
One of the library that had warnings disabled is libfontmanager, in make/lib/Awt2dLibraries.gmk.
The following warnings are disabled for this library:
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast reorder delete-non-virtual-dtor
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types
DISABLED_WARNINGS_solstudio := truncwarn
DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090
This library has some additional quirks. It mixes C and C++ source code, and the warning handling framework does not really support this. As a result, two of the gcc warnings are C++ warnings only, and when applied to a C file, gcc emits (another) warning about this.
The same problem applies to solstudio, where the C compiler warns about truncwarn, which is a C++ only warning. Also, C specific warnings were not possible to disable using this framework.
(Note that warnings are disabled per toolchain type (essentially, compiler). Also note that disabling warnings does not work for gcc prior to version 4.4.)
Blindly hiding warnings is just sweeping the problems under the rug. On the other hand, not all warnings are meaningful to fix in the source code.
The expected outcome of this bug is, for each disabled warning category, either:
1) The code is fixed so the warning can be re-enabled (by removing it from the list of disabled warnings for that library), or
2) The warning is kept disabled, but in that case a rationale added to the stanza for that library in the makefile.
Incremental builds is helpful when testing the effect of warnings. Once the build has fully finished, if the list of warnings is modified for this library,
only that library is rebuilt on future calls to make (without clean). This makes it easy to spot the effect of re-enabling warnings for a single library.
For reference, the log files prior and after
http://cr.openjdk.java.net/~ihse/no-warnings/saved-logs-for-JDK-8074096/
- relates to
-
JDK-8196985 Disable new warnings from GCC 7.3 in jdk libraries
- Resolved