Re: [C++] Possible GCC bug

2012-11-16 Thread Jiri Palecek
Piotr Wyderski wrote: Dodji Seketeli wrote: That, and [dcl.typedef]/6 says: In a given scope, a typedef specifier shall not be used to redefine the name of any type declared in that scope to refer to a different type. So, I tend to think that GCC is right here. Right *where*?

Re: [C++] Possible GCC bug

2012-11-16 Thread Andrew Pinski
On Fri, Nov 16, 2012 at 7:15 AM, Piotr Wyderski wrote: > Dodji Seketeli wrote: > >> That, and [dcl.typedef]/6 says: >> >> In a given scope, a typedef specifier shall not be used to redefine >> the name of any type declared in that scope to refer to a different >> type. >> >> So, I tend

Re: [C++] Possible GCC bug

2012-11-16 Thread Piotr Wyderski
Dodji Seketeli wrote: > That, and [dcl.typedef]/6 says: > > In a given scope, a typedef specifier shall not be used to redefine > the name of any type declared in that scope to refer to a different > type. > > So, I tend to think that GCC is right here. Right *where*? In case of the s

Re: [C++] Possible GCC bug

2012-11-16 Thread Dodji Seketeli
Jiri Palecek a écrit: > Ulf Magnusson wrote: >> On Wed, Nov 14, 2012 at 6:10 PM, Piotr Wyderski >> wrote: >>> The following snippet: >>> >>> class A {}; >>> class B : public A { >>> >>> typedef A super; >>> >>> public: >>> >>> class X {}; >>> }; >>> >>> >>> class C : public B { >>> >>>

Re: [C++] Possible GCC bug

2012-11-14 Thread Jiri Palecek
Ulf Magnusson wrote: On Wed, Nov 14, 2012 at 6:10 PM, Piotr Wyderski wrote: 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;

Re: [C++] Possible GCC bug

2012-11-14 Thread Ulf Magnusson
On Wed, Nov 14, 2012 at 6:10 PM, Piotr Wyderski wrote: > 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;

[C++] Possible GCC bug

2012-11-14 Thread Piotr Wyderski
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) fai