public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ro at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rust/107633] New: [13 regression] Bootstrap failure due to -Werror=unused-parameter and -Werror=dangling-reference Date: Fri, 11 Nov 2022 12:12:29 +0000 [thread overview] Message-ID: <bug-107633-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107633 Bug ID: 107633 Summary: [13 regression] Bootstrap failure due to -Werror=unused-parameter and -Werror=dangling-reference 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 CC: dkm at gcc dot gnu.org Target Milestone: --- Host: i386-pc-solaris2.11 Target: i386-pc-solaris2.11 Build: i386-pc-solaris2.11 I just tried bootstrapping the current devel/rust/master branch on Solaris/x86, but ran into quite number of failues: * For one, there were hundreds of instances of -Werror=unused-parameter, e.g. /vol/gcc/src/hg/master/rust/gcc/rust/lex/rust-lex.cc: In member function 'std::tuple<Rust::Codepoint, int, bool> Rust::Lexer::parse_utf8_escape(char)': /vol/gcc/src/hg/master/rust/gcc/rust/lex/rust-lex.cc:1326:32: error: unused parameter 'opening_char' [-Werror=unused-parameter] 1326 | Lexer::parse_utf8_escape (char opening_char) | ~~~~~^~~~~~~~~~~~ /vol/gcc/src/hg/master/rust/gcc/rust/ast/rust-ast-dump.cc: In member function 'virtual void Rust::AST::Dump::visit(Rust::AST::AttrInputMetaItemContainer&)': /vol/gcc/src/hg/master/rust/gcc/rust/ast/rust-ast-dump.cc:243:42: error: unused parameter 'input' [-Werror=unused-parameter] 243 | Dump::visit (AttrInputMetaItemContainer &input) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ * With those worked around (see below), there still a couple of -Werror=dangling-reference errors: /vol/gcc/src/hg/master/rust/gcc/rust/typecheck/rust-hir-type-check-type.cc: In member function 'Rust::TyTy::BaseType* Rust::Resolver::TypeCheckType::resolve_segments(Rust::NodeId, Rust::HirId, std::vector<std::unique_ptr<Rust::HIR::TypePathSegment> >&, std::size_t, Rust::TyTy::BaseType*, const Rust::Analysis::NodeMapping&, Location)': /vol/gcc/src/hg/master/rust/gcc/rust/typecheck/rust-hir-type-check-type.cc:465:13: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 465 | auto &candidate = *candidates.begin (); | ^~~~~~~~~ /vol/gcc/src/hg/master/rust/gcc/rust/typecheck/rust-hir-type-check-type.cc:465:44: note: the temporary was destroyed at the end of the full expression 'candidates.std::set<Rust::Resolver::PathProbeCandidate>::begin().std::_Rb_tree_const_iterator<Rust::Resolver::PathProbeCandidate>::operator*()' 465 | auto &candidate = *candidates.begin (); | I've hacked around both by adding -Wno-error=unused-parameter -Wno-error=dangling-reference to gcc/rust/Make-lang.in (RUST_CXXFLAGS), but this is supposed to work out of the box. The build is in stage 2 now.
next reply other threads:[~2022-11-11 12:12 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-11 12:12 ro at gcc dot gnu.org [this message] 2022-11-11 13:37 ` [Bug rust/107633] " rguenth at gcc dot gnu.org 2022-11-11 13:45 ` redi at gcc dot gnu.org 2022-11-11 13:48 ` redi at gcc dot gnu.org 2022-11-11 15:03 ` mpolacek at gcc dot gnu.org 2022-11-11 15:09 ` mpolacek at gcc dot gnu.org 2022-11-11 20:27 ` mpolacek at gcc dot gnu.org 2022-11-14 11:26 ` ro at CeBiTec dot Uni-Bielefeld.DE 2022-11-14 12:12 ` dkm at gcc dot gnu.org 2022-11-17 10:18 ` cohenarthur.dev at gmail dot com 2022-11-17 15:22 ` mpolacek at gcc dot gnu.org 2022-12-14 13:42 ` tschwinge at gcc dot gnu.org 2022-12-14 14:49 ` tschwinge at gcc dot gnu.org 2022-12-14 15:40 ` [Bug rust/107633] " tschwinge at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-107633-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).