public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rs2740 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96078] New: [10/11 Regression] flatten attribute on constructor and destructor causes spurious warning Date: Mon, 06 Jul 2020 13:15:58 +0000 [thread overview] Message-ID: <bug-96078-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96078 Bug ID: 96078 Summary: [10/11 Regression] flatten attribute on constructor and destructor causes spurious warning Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rs2740 at gmail dot com Target Milestone: --- struct A { [[gnu::flatten]] A() {} [[gnu::flatten]] ~A() {} }; A a; Produces no warnings with GCC 9 but on GCC 10 and trunk warns: <source>:3:22: warning: 'flatten' attribute is ignored on aliases [-Wattributes] 3 | [[gnu::flatten]] ~A() {} | ^ <source>:2:22: warning: 'flatten' attribute is ignored on aliases [-Wattributes] 2 | [[gnu::flatten]] A() {} | ^ The warning appears to be introduced by the fix to PR92372. Marking `A` as `final` eliminates the warnings, as does giving it an virtual base class. Presumably the issue is that in the problematic case one of the complete/base object c/dtors was treated as an alias for the other?
next reply other threads:[~2020-07-06 13:15 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-06 13:15 rs2740 at gmail dot com [this message] 2020-07-06 13:35 ` [Bug c++/96078] " redi at gcc dot gnu.org 2020-07-06 15:31 ` rguenth at gcc dot gnu.org 2020-07-07 8:54 ` marxin at gcc dot gnu.org 2020-07-23 6:52 ` rguenth at gcc dot gnu.org 2020-10-12 12:49 ` rguenth at gcc dot gnu.org 2021-02-12 3:04 ` jason at gcc dot gnu.org 2021-02-12 17:10 ` jason at gcc dot gnu.org 2021-03-03 4:20 ` cvs-commit at gcc dot gnu.org 2021-03-03 4:22 ` [Bug c++/96078] [10 " jason at gcc dot gnu.org 2021-03-04 4:49 ` cvs-commit at gcc dot gnu.org 2021-03-04 4:52 ` jason at gcc dot gnu.org 2021-03-11 10:38 ` aoliva 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-96078-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).