freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation problem with gcc-3.0


From: Mark Mitchell
Subject: Re: Compilation problem with gcc-3.0
Date: Wed, 27 Jun 2001 12:44:34 -0700



--On Wednesday, June 27, 2001 01:55:14 PM -0600 Dave Nystrom <address@hidden> wrote:

Below is a small test case that includes two functions, find1 and find2.
When I try to compile this with the g++ from gcc-3.0, I get the following
error:

Yes, this is a famous problem in GCC -- it uses a YACC parser that
doesn't have enough look-ahead to see whether or not that construct
is a function-declaration or an expression.  We need a new parser.

I've begged LANL to let me do that for years -- and they agreed!  In
fact, what I'm working on right now, is writing a nice bright shiny new
C++ parser -- and it aready gets this example correct.  So, I'd expect
this to be fixed in G++ 3.1, probably ready in about 6 months.  And,
in development snaphots before that.

Besides the workaround you found, another one that usually works is:

 C* pclass ((0, unwrap<C*>()(*object)));

The `0' can't appear in a parameter-declaration, so g++ knows pclass
is a variable, and not a function.

--
Mark Mitchell                address@hidden
CodeSourcery, LLC            http://www.codesourcery.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]