From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30128 invoked by alias); 17 Mar 2013 15:43:34 -0000 Received: (qmail 29906 invoked by uid 48); 17 Mar 2013 15:43:10 -0000 From: "ppluzhnikov at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56641] New: [4.7/4.8 regression] Bogus warning: 'A' has a field 'A::e' whose type uses the anonymous namespace Date: Sun, 17 Mar 2013 15:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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/msg01253.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56641 Bug #: 56641 Summary: [4.7/4.8 regression] Bogus warning: 'A' has a field 'A::e' whose type uses the anonymous namespace Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: ppluzhnikov@google.com This one is recent regression of gcc-4_7 branch. Confirmed with current trunk r196749. namespace { #1 "foo.cc" enum E { }; } struct A { enum E e; }; g++ -c foo.ii foo.cc:4:8: warning: =E2=80=98A=E2=80=99 has a field =E2=80=98A::e=E2=80=99= whose type uses the anonymous namespace [enabled by default] Deleting the '#1 "foo.cc"' line makes the warning go away.