This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CVS head (gcc-3.4), new parser, and should variable names interfere with namespace names?


> Andrew Pollard <andrewp@andypo.net> writes:
> 
> | Hi All,
> | 
> |  With the recent parser changes, the following snippet of code now
> | doesn't compile...
> | 
> | namespace.cxx:
> | -----------------------
> | namespace foo {
> |     int baz(int);
> | }
> | 
> | int
> | bar(int foo)
> 
> This foo hides ::foo.
> 
> [...]
> 
> | Is the parser just being more standard conforming,
> 
> Yes.

Hi Gaby,

I'm no C++ expert, but are you sure?  Comeau accepts it in strict mode,
and your answer is not how I read 3.4.3p1 which I assume is the relevant
paragraph.

Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]