Hi! On 2022-09-14T15:34:10+0200, Richard Biener via Gcc-patches <gcc-patc...@gcc.gnu.org> wrote: > On Wed, Aug 24, 2022 at 2:22 PM <herron.phi...@googlemail.com> wrote: >> --- /dev/null >> +++ b/gcc/rust/Make-lang.in
>> +# TODO: possibly find a way to ensure C++11 compilation level here? >> +RUST_CXXFLAGS = -std=c++11 -Wno-unused-parameter -Werror=overloaded-virtual > > You probably should inherit from $(CXXFLAGS) here which ensures C++11 > compatibility. That was done in GCC/Rust commit da13bf4bbc46b399419c3e7f2c358a0efe3bdfdd "make: Inherit CXXFLAGS, remove compiler-specific warnings", which changed this to just 'RUST_CXXFLAGS = $(CXXFLAGS)'. > Note you have to deal with non-g++ host compilers when not > bootstrapping so adding -Wno-unused-parameter -Werror=overload-virtual > needs to be guarded. '-Werror=overloaded-virtual' is implied as by default, we have '-Woverloaded-virtual' and '-Werror'. (I've verified via putting 'class tmp : public Dump { void visit (int) {} };' into 'gcc/rust/ast/rust-ast-dump.cc', and getting a number of 'error: ‘virtual void Rust::AST::Dump::visit([...])’ was hidden'.) (Maybe that isn't active for '--disable-bootstrap' builds, but that's "OK".) Remains only '-Wno-unused-parameter'. That one should move into 'rust-warn', where we currently have: >> +# Use strict warnings for this front end. >> +rust-warn = $(STRICT_WARN) Per GCC 4.8 documentation (baseline version to bootstrap GCC), we may use '-Wno-[...]' without checking whether the corresponding '-W[...]' is actually supported, so we may specify '-Wno-unused-parameter' unconditionally, like existing ones, for example in 'gcc/Makefile.in': # These files are to have specific diagnostics suppressed, [...] gimple-match.o-warn = -Wno-unused generic-match.o-warn = -Wno-unused dfp.o-warn = -Wno-strict-aliasing I thus understand that non-GCC compilers implement the same '-Wno-[...]' behavior -- or maybe warning flags are not passed to those at all, at stage 1 build where this is (only) relevant. I've thus proposed <https://github.com/Rust-GCC/gccrs/pull/1670> "'rust-warn += -Wno-unused-parameter'". Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 -- Gcc-rust mailing list Gcc-rust@gcc.gnu.org https://gcc.gnu.org/mailman/listinfo/gcc-rust