From: Arthur Cohen Date: Wed, 12 Nov 2025 16:18:14 +0000 (+0100) Subject: gccrs: Fmt: Simplify pragma diagnostic setup X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0fb3b3ace66c05e64c39e73be3907f8edd3efa55;p=thirdparty%2Fgcc.git gccrs: Fmt: Simplify pragma diagnostic setup There was a typo in the original commit where the diagnostic context was not being popped, however popping the context still causes issues while bootstrapping. For now, just mark -Warray-bounds as a warning to fix bootstrap on trunk and think about a proper fix (probably adding a push and pop on every file including rust-fmt.h...) later if the C++ warning issue is still not fixed. gcc/rust/ChangeLog: * ast/rust-fmt.h: Simplify diagnostic avoidance. --- diff --git a/gcc/rust/ast/rust-fmt.h b/gcc/rust/ast/rust-fmt.h index 0c25a4226c5..13dc7be58f0 100644 --- a/gcc/rust/ast/rust-fmt.h +++ b/gcc/rust/ast/rust-fmt.h @@ -23,7 +23,6 @@ #include "optional.h" // PR122498 "rust-enabled bootstrap is broken after r16-4897" -#pragma GCC diagnostic push #pragma GCC diagnostic warning "-Warray-bounds" namespace Rust { @@ -433,7 +432,4 @@ private: } // namespace Fmt } // namespace Rust -// PR122498 "rust-enabled bootstrap is broken after r16-4897" -#pragma GCC diagnostic push - #endif // !RUST_FMT_H