8288101: False build warning-as-error with GCC 9 after JDK-8214976

Reviewed-by: mdoerr, zgu, kbarrett
This commit is contained in:
Aleksey Shipilev 2022-06-10 17:07:20 +00:00
parent 0164145afc
commit d9c1364dde

View File

@ -69,10 +69,13 @@
#endif // clang/gcc version check
#if (__GNUC__ >= 9) || (defined(__clang_major__) && (__clang_major__ >= 14))
#if (__GNUC__ >= 10) || (defined(__clang_major__) && (__clang_major__ >= 14))
// Use "warning" attribute to detect uses of "forbidden" functions.
//
// Note: The warning attribute is available since GCC 9, but disabling pragmas
// does not work reliably in ALLOW_C_FUNCTION. GCC 10+ and up work fine.
//
// Note: _FORTIFY_SOURCE transforms calls to certain functions into calls to
// associated "checking" functions, and that transformation seems to occur
// *before* the attribute check. We use fortification in fastdebug builds,
@ -89,6 +92,6 @@
__VA_ARGS__ \
PRAGMA_DIAG_POP
#endif // gcc9+ or clang14+
#endif // gcc10+ or clang14+
#endif // SHARE_UTILITIES_COMPILERWARNINGS_GCC_HPP