public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55338] New: Incorrectly reported error in type name hiding
@ 2012-11-15 11:02 piotr.wyderski at gmail dot com
  2012-11-16 14:15 ` [Bug c++/55338] " paolo.carlini at oracle dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: piotr.wyderski at gmail dot com @ 2012-11-15 11:02 UTC (permalink / raw)
  To: gcc-bugs


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

             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 ‘typedef class B::X C::X::super’
[-fpermissive]
bug.cpp:14:14: error: changes meaning of ‘super’ from ‘typedef class B
C::super’ [-fpermissive]

To my understanding of the Standard Comeau is right and GCC is wrong here.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-16 17:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 11:02 [Bug c++/55338] New: Incorrectly reported error in type name hiding piotr.wyderski at gmail dot com
2012-11-16 14:15 ` [Bug c++/55338] " paolo.carlini at oracle dot com
2012-11-16 15:07 ` piotr.wyderski at gmail dot com
2012-11-16 17:28 ` pinskia at gcc dot gnu.org
2012-11-16 17:38 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).