public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53184] Unnecessary anonymous namespace warnings Date: Wed, 02 May 2012 10:48:00 -0000 [thread overview] Message-ID: <bug-53184-4-EVKGdMggmo@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53184-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53184 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-02 10:48:18 UTC --- (In reply to comment #2) > The warning is meant for types > inside anonymous namespaces, which is not the case here. Technically it triggers for types with "anon" visibility, which is usually (but not always) caused by being declared in an anonymous namespace. Andrew's right the wording could be improved so it's not misleading in cases such as this. > Moreover, removing the volatile keyword resolves the warning. Why is that? Because then the anonymous class has the name "Foo" for linkage purposes, and has external linkage. When Foo referes to the const or volatile qualified form of the class, the anonymous class itself has no name and so no linkage, only the cv-qualified form has a name for linkage purposes. I'm not sure if that behaviour is correct though, let's ask Jason
next prev parent reply other threads:[~2012-05-02 10:48 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-05-02 6:09 [Bug c++/53184] New: " orgads at gmail dot com 2012-05-02 6:26 ` [Bug c++/53184] " pinskia at gcc dot gnu.org 2012-05-02 6:56 ` orgads at gmail dot com 2012-05-02 10:48 ` redi at gcc dot gnu.org [this message] 2012-05-02 17:23 ` jason at gcc dot gnu.org 2013-06-15 18:16 ` paolo.carlini at oracle dot com 2013-06-16 2:59 ` zeratul976 at hotmail dot com 2013-06-17 12:41 ` redi at gcc dot gnu.org 2013-06-17 12:43 ` paolo.carlini at oracle dot com 2013-06-17 12:58 ` paolo.carlini at oracle dot com 2015-04-27 19:45 ` paolo.carlini at oracle dot com 2015-08-19 14:44 ` paolo.carlini at oracle dot com 2015-09-09 16:48 ` paolo at gcc dot gnu.org 2015-09-09 16:53 ` paolo.carlini at oracle dot com
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-53184-4-EVKGdMggmo@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).