From: Arthur Cohen <[email protected]>

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 <[email protected]>
---
 gcc/rust/ast/rust-fmt.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gcc/rust/ast/rust-fmt.h b/gcc/rust/ast/rust-fmt.h
index e59bed3e9d2..0c25a4226c5 100644
--- a/gcc/rust/ast/rust-fmt.h
+++ b/gcc/rust/ast/rust-fmt.h
@@ -22,6 +22,10 @@
 #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
-- 
2.50.1

Reply via email to