This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CVS head (gcc-3.4), new parser, and should variable names interfere with namespace names?
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Neil Booth <neil at daikokuya dot co dot uk>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Andrew Pollard <andrewp at andypo dot net>
- Date: 31 Dec 2002 23:09:43 +0100
- Subject: Re: CVS head (gcc-3.4), new parser, and should variable names interfere with namespace names?
- Organization: Integrable Solutions
- References: <614980000.1041371125@warlock.codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
| --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.
Oops, Neil is right. I went back doing my homework and found that the
new parser is indeed in error. The paragraph 3.4.3/1 Neil quoted
actually gave a similar example.
Sorry for the confusion.
-- Gaby