Skip to content

Commit e3dad43

Browse files
Ben TaylorPaul Hohensee
Ben Taylor
authored and
Paul Hohensee
committed
8308283: Build failure with GCC12 & GCC13
Reviewed-by: phh Backport-of: bfc3ccd90d579f6cba3a704766b7a1ea56beebe1
1 parent 0dd98fd commit e3dad43

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

make/modules/java.desktop/lib/Awt2dLibraries.gmk

+1-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ else
464464
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
465465
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
466466
maybe-uninitialized class-memaccess unused-result extra use-after-free noexcept-type \
467-
expansion-to-defined
467+
expansion-to-defined dangling-reference
468468
HARFBUZZ_DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
469469
tautological-constant-out-of-range-compare int-to-pointer-cast \
470470
undef missing-field-initializers range-loop-analysis \

src/hotspot/share/utilities/compilerWarnings.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,8 @@
7070
#define PRAGMA_STRINGOP_TRUNCATION_IGNORED
7171
#endif
7272

73+
#ifndef PRAGMA_INFINITE_RECURSION_IGNORED
74+
#define PRAGMA_INFINITE_RECURSION_IGNORED
75+
#endif
76+
7377
#endif // SHARE_UTILITIES_COMPILERWARNINGS_HPP

src/hotspot/share/utilities/compilerWarnings_gcc.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@
3838
#define PRAGMA_DISABLE_GCC_WARNING(option_string) \
3939
PRAGMA_DISABLE_GCC_WARNING_AUX(GCC diagnostic ignored option_string)
4040

41-
// Disable -Wdangling-pointer which is introduced in GCC 12.
4241
#if !defined(__clang_major__) && (__GNUC__ >= 12)
42+
// Disable -Wdangling-pointer which is introduced in GCC 12.
4343
#define PRAGMA_DANGLING_POINTER_IGNORED PRAGMA_DISABLE_GCC_WARNING("-Wdangling-pointer")
44+
45+
// Disable -Winfinite-recursion which is introduced in GCC 12.
46+
#define PRAGMA_INFINITE_RECURSION_IGNORED PRAGMA_DISABLE_GCC_WARNING("-Winfinite-recursion")
4447
#endif
4548

4649
#define PRAGMA_FORMAT_NONLITERAL_IGNORED \

0 commit comments

Comments
 (0)