Description
/pool/buildbot/slaves/sobornost/jdkX/build/src/hotspot/share/gc/shared/weakProcessorPhases.cpp: In static member function 'static bool WeakProcessorPhases::is_serial(WeakProcessorPhases::Phase)':
/pool/buildbot/slaves/sobornost/jdkX/build/src/hotspot/share/gc/shared/weakProcessorPhases.cpp:62:46: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
return (index(phase) - serial_phase_start) < serial_phase_count;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
This because serial_phase_count ends up being "0" with Minimal VM, because JVMTI and JFR are disabled:
enum Phase {
// Serial phases.
JVMTI_ONLY(jvmti COMMA)
JFR_ONLY(jfr COMMA)
// OopStorage phases.
jni,
vm
};
static const uint serial_phase_start = 0;
static const uint serial_phase_count = jni;
This can be worked around with -Wno-type-limits. We probably want to tag the usage in weakProcessorPhases.cpp:62 as safe one, instead of disabling that compiler warning wholesale.
/pool/buildbot/slaves/sobornost/jdkX/build/src/hotspot/share/gc/shared/weakProcessorPhases.cpp:62:46: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
return (index(phase) - serial_phase_start) < serial_phase_count;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
This because serial_phase_count ends up being "0" with Minimal VM, because JVMTI and JFR are disabled:
enum Phase {
// Serial phases.
JVMTI_ONLY(jvmti COMMA)
JFR_ONLY(jfr COMMA)
// OopStorage phases.
jni,
vm
};
static const uint serial_phase_start = 0;
static const uint serial_phase_count = jni;
This can be worked around with -Wno-type-limits. We probably want to tag the usage in weakProcessorPhases.cpp:62 as safe one, instead of disabling that compiler warning wholesale.
Attachments
Issue Links
- duplicates
-
JDK-8210164 building Minimal VM fails with error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
- Closed
-
JDK-8210164 building Minimal VM fails with error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
- Closed
- relates to
-
JDK-8072498 Multi-thread JNI weak reference processing
- Resolved