8308283: Build failure with GCC12 & GCC13
Reviewed-by: erikj, jiefu
This commit is contained in:
parent
57b8ed1398
commit
bfc3ccd90d
@ -456,7 +456,7 @@ else
|
||||
unused-result array-bounds
|
||||
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
|
||||
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
|
||||
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type expansion-to-defined
|
||||
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type expansion-to-defined dangling-reference
|
||||
HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers range-loop-analysis
|
||||
HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244
|
||||
|
||||
|
@ -74,6 +74,10 @@
|
||||
#define PRAGMA_STRINGOP_OVERFLOW_IGNORED
|
||||
#endif
|
||||
|
||||
#ifndef PRAGMA_INFINITE_RECURSION_IGNORED
|
||||
#define PRAGMA_INFINITE_RECURSION_IGNORED
|
||||
#endif
|
||||
|
||||
#ifndef PRAGMA_NONNULL_IGNORED
|
||||
#define PRAGMA_NONNULL_IGNORED
|
||||
#endif
|
||||
|
@ -39,9 +39,12 @@
|
||||
#define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push")
|
||||
#define PRAGMA_DIAG_POP _Pragma("GCC diagnostic pop")
|
||||
|
||||
// Disable -Wdangling-pointer which is introduced in GCC 12.
|
||||
#if !defined(__clang_major__) && (__GNUC__ >= 12)
|
||||
// Disable -Wdangling-pointer which is introduced in GCC 12.
|
||||
#define PRAGMA_DANGLING_POINTER_IGNORED PRAGMA_DISABLE_GCC_WARNING("-Wdangling-pointer")
|
||||
|
||||
// Disable -Winfinite-recursion which is introduced in GCC 12.
|
||||
#define PRAGMA_INFINITE_RECURSION_IGNORED PRAGMA_DISABLE_GCC_WARNING("-Winfinite-recursion")
|
||||
#endif
|
||||
|
||||
#define PRAGMA_FORMAT_NONLITERAL_IGNORED \
|
||||
|
@ -190,6 +190,8 @@ static bool stack_has_headroom(size_t headroom) {
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
PRAGMA_DIAG_PUSH
|
||||
PRAGMA_INFINITE_RECURSION_IGNORED
|
||||
void VMError::reattempt_test_hit_stack_limit(outputStream* st) {
|
||||
if (stack_has_headroom(_reattempt_required_stack_headroom)) {
|
||||
// Use all but (_reattempt_required_stack_headroom - K) unguarded stack space.
|
||||
@ -220,6 +222,7 @@ void VMError::reattempt_test_hit_stack_limit(outputStream* st) {
|
||||
}
|
||||
controlled_crash(14);
|
||||
}
|
||||
PRAGMA_DIAG_POP
|
||||
#endif // ASSERT
|
||||
|
||||
bool VMError::can_reattempt_step(const char* &stop_reason) {
|
||||
|
Loading…
Reference in New Issue
Block a user