This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54060] G++ warning mixes up anonymous types and anonymous namespaces
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 31 Jul 2012 20:41:51 +0000
- Subject: [Bug c++/54060] G++ warning mixes up anonymous types and anonymous namespaces
- Auto-submitted: auto-generated
- References: <bug-54060-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54060
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-07-31 20:41:51 UTC ---
Every file that includes the code gets a different type, so S (in comment 0)
and B (in comment 1) violate the ODR if defined in more than one translation
unit. That's why the warning is given when the code occurs in a header.