[Bug c++/56641] [4.7/4.8 regression] Bogus warning: 'A' has a field 'A::e' whose type uses the anonymous namespace

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Mar 17 19:25:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56641

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-17 19:24:45 UTC ---
The compiler is working as intended; the warning is there because if E and A
are included in multiple translation units, the A type changes between
translation units, creating an ODR violation.  Without the #1 line, the
compiler doesn't warn because the types are being defined in the main input
file rather than an #included file.



More information about the Gcc-bugs mailing list