CVS head (gcc-3.4), new parser, and should variable names interfere with namespace names?
Mark Mitchell
mark@codesourcery.com
Tue Dec 31 15:33:00 GMT 2002
--On Tuesday, December 31, 2002 05:16:22 PM +0000 Neil Booth
<neil@daikokuya.co.uk> wrote:
>> 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.
I think this is indeed a bug in the new parser.
I will work on a fix.
I hate it when I make mistakes.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc
mailing list