Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
8288101: False build warning-as-error with GCC 9 after JDK-8214976
Browse files Browse the repository at this point in the history
Reviewed-by: mdoerr, zgu, kbarrett
  • Loading branch information
shipilev committed Jun 10, 2022
1 parent 0164145 commit d9c1364
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/hotspot/share/utilities/compilerWarnings_gcc.hpp
Expand Up @@ -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,
Expand All @@ -89,6 +92,6 @@
__VA_ARGS__ \
PRAGMA_DIAG_POP

#endif // gcc9+ or clang14+
#endif // gcc10+ or clang14+

#endif // SHARE_UTILITIES_COMPILERWARNINGS_GCC_HPP

1 comment on commit d9c1364

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.