This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29834] g++ thinks it is a declaration when it cannot be
- From: "james dot kanze at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Nov 2006 10:05:21 -0000
- Subject: [Bug c++/29834] g++ thinks it is a declaration when it cannot be
- References: <bug-29834-9635@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from james dot kanze at gmail dot com 2006-11-15 10:05 -------
Subject: Re: g++ thinks it is a declaration when it cannot be
On 14 Nov 2006 21:33:34 -0000, rguenth at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
> I you use
> ( Doh ( x ) ), ++ x;
> it works.
I know. I don't consider it a critical error, but it is legal
code, so formally, at least, the compiler should accept it.
> (EDG accepts the code unmodified)
So does Sun CC and VC++.
If I remember correctly, in the past, g++ has had problems with
opting too soon for the declaration, before having seen enough
of the context to know that it couldn't be. I suspect that this
is just a case of the correction having missed a couple of
cases.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29834