This is the mail archive of the gcc-bugs@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]

[Bug c++/29834] g++ thinks it is a declaration when it cannot be



------- 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


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