-
Bug
-
Resolution: Fixed
-
P3
-
hs25
-
b23
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8010346 | 8 | Joseph Provino | P3 | Resolved | Fixed | b82 |
There are now many uses of #if INCLUDE_XXX in the sources to allow the minimal VM to exclude certain features and functionality. In order for this to work properly, all source files with INCLUDE_XXX references need to include macros.hpp. If they don't, "#if INCLUDE_XXX" will always include the feature, even if we are doing a minimal VM build.
There is no mechanism in place to guarantee that macros.hpp has been properly included. Adding -Wundef would result in compiler errors for cases where #if INCLUDE_XXX is used and INCLUDE_XXX is not defined. Note that we already build with -Werror, which is why -Wundef will result in errors instead of warnings (and errors are what we want in this case).
Note thatJDK-8006498 is currently preventing us from using -Wundef. There are some uses of "#if ASSERTS" that need to be changed to "#ifdef ASSERT". This bug will need to be fixed first.
There is no mechanism in place to guarantee that macros.hpp has been properly included. Adding -Wundef would result in compiler errors for cases where #if INCLUDE_XXX is used and INCLUDE_XXX is not defined. Note that we already build with -Werror, which is why -Wundef will result in errors instead of warnings (and errors are what we want in this case).
Note that
- backported by
-
JDK-8010346 -Wundef should be added to the build to catch #if references to undefined macros
-
- Resolved
-
- relates to
-
JDK-8003310 Enable -Wunused-function when compiling with gcc
-
- Resolved
-
-
JDK-8006357 Need a stable way to select parts of the VM to compile in and out
-
- Closed
-
-
JDK-8006498 #if <symbol> is wrong in the code
-
- Closed
-