From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19640 invoked by alias); 17 Mar 2013 19:42:53 -0000 Received: (qmail 19575 invoked by uid 48); 17 Mar 2013 19:42:29 -0000 From: "ppluzhnikov at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56641] [4.7/4.8 regression] Bogus warning: 'A' has a field 'A::e' whose type uses the anonymous namespace Date: Sun, 17 Mar 2013 19:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppluzhnikov at google dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Resolution Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-03/txt/msg01270.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56641 Paul Pluzhnikov changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #2 from Paul Pluzhnikov 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.