help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: namespace / class name conflict: bug or feature?


From: Paul Pluzhnikov
Subject: Re: namespace / class name conflict: bug or feature?
Date: Wed, 07 Feb 2007 10:04:14 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Ulrich Lauther <ulrich.lauther@siemens.com> writes:

>    1  namespace Foo {
>    2  };
>    3  
>    4  class Foo {
>    5  };
>    6  
>    7  int main() {
>    8    class Foo1 : public Foo {
>    9    };
>   10    Foo1 my_Foo1; 
>   11    Foo my_foo;
>   12    return 0;
>   13  }

Commenting out line 11 makes the source compilable with all versions
of gcc from egcs-2.91.66 all the way through gcc-4.3-20061104.

You may wish to file "accepts invalid" gcc bug report.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]