https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105914
Bug ID: 105914 Summary: gccrs setting warn_unused_variable breaks thousands of non-Rust tests Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rust Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- I've just finished bootstrapping the devel/rust/master branch on all of Linux/x86_64, Linux/i686, Solaris/x86_64, and Solaris/x86 with --enable-languages=rust. The rust testresults are fine everywhere, but one change badly breaks C and C++ tests like this: FAIL: gcc.c-torture/compile/pr99787-1.c -O0 (test for excess errors) Excess errors: /vol/gcc/src/git/rust/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c:10:12: warning: unused variable 'f' [-Wunused-variable] There are several thousand failures like this, all over the place (gcc, g++, libgomp, libitm, libstdc++). I'm pretty certain this is due to this snippet in gcc/rust/lang.opt: Wunused-variable Rust Var(warn_unused_variable) Init(1) Warning ; documented in common.opt Obviously this causes the warning to default to on for every language, not just for Rust. I haven't tried looking how to avoid this.