]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Fmt: Simplify pragma diagnostic setup
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 12 Nov 2025 16:18:14 +0000 (17:18 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 12 Nov 2025 17:22:34 +0000 (18:22 +0100)
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.

gcc/rust/ast/rust-fmt.h

index 0c25a4226c57fcf60e2dba3463cfd9110dc7efeb..13dc7be58f070bd73ab108be9e7e928b2985a1d5 100644 (file)
@@ -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