From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21995 invoked by alias); 15 Nov 2012 11:02:41 -0000 Received: (qmail 21940 invoked by uid 48); 15 Nov 2012 11:02:28 -0000 From: "piotr.wyderski at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55338] New: Incorrectly reported error in type name hiding Date: Thu, 15 Nov 2012 11:02: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: piotr.wyderski at gmail 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: 2012-11/txt/msg01390.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55338 Bug #: 55338 Summary: Incorrectly reported error in type name hiding Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: piotr.wyderski@gmail.com The following snippet: class A {}; class B : public A { typedef A super; public: class X {}; }; class C : public B { typedef B super; class X : public super::X { typedef super::X super; }; }; compiles without a warning on Comeau and MSVC, but GCC (4.6.1 and 4.7.1) failes with the following message: $ gcc -c bug.cpp bug.cpp:18:24: error: declaration of =E2=80=98typedef class B::X C::X::supe= r=E2=80=99 [-fpermissive] bug.cpp:14:14: error: changes meaning of =E2=80=98super=E2=80=99 from =E2= =80=98typedef class B C::super=E2=80=99 [-fpermissive] To my understanding of the Standard Comeau is right and GCC is wrong here.