https://gcc.gnu.org/g:8af0e3dff44e931e81fa0e3777bffec06ebd8e26

commit r16-5198-g8af0e3dff44e931e81fa0e3777bffec06ebd8e26
Author: Arthur Cohen <[email protected]>
Date:   Mon Nov 10 15:27:59 2025 +0100

    gccrs: fmt: Skip warnings in Fmt class due to unused devirt method 
[PR122498]
    
    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]>

Diff:
---
 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 e59bed3e9d29..0c25a4226c57 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

Reply via email to