]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: fmt: Skip warnings in Fmt class due to unused devirt method [PR122498]
authorArthur Cohen <arthur.cohen@embecosm.com>
Mon, 10 Nov 2025 14:27:59 +0000 (15:27 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 12 Nov 2025 15:52:32 +0000 (16:52 +0100)
Since this warning is not easily fixable, avoid it for now and wait for
the underlying issue to be resolved.

gcc/rust/ChangeLog:

PR rust/122498
* ast/rust-fmt.h: Add -Warray-bounds pragma to avoid the issue during
bootstraps

Co-authored-by: Thomas Schwinge <tschwinge@gcc.gnu.org>
gcc/rust/ast/rust-fmt.h

index e59bed3e9d29a17e4eebce45aca434f192e98ded..0c25a4226c57fcf60e2dba3463cfd9110dc7efeb 100644 (file)
 #include "rust-system.h"
 #include "optional.h"
 
+// PR122498 "rust-enabled bootstrap is broken after r16-4897"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic warning "-Warray-bounds"
+
 namespace Rust {
 namespace Fmt {
 
@@ -429,4 +433,7 @@ private:
 } // namespace Fmt
 } // namespace Rust
 
+// PR122498 "rust-enabled bootstrap is broken after r16-4897"
+#pragma GCC diagnostic push
+
 #endif // !RUST_FMT_H