This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2013-03-17 19:42:28 UTC ---
Thanks for the explanation.

The actual use case looks like this:

// test-skeleton.cc
namespace { enum E { }; }
struct A { E e; };
//... other common test skeleton code ...

// foo-test.cc
#include "test-skeleton.cc"
//... specific foo tests


The workaround is to either make 'enum E' global, or name the namespace.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]