This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
possible parser bug?
- To: egcs at cygnus dot com
- Subject: possible parser bug?
- From: Michael Iber <michael dot iber at siemens dot at>
- Date: Fri, 06 Nov 1998 13:25:18 +0100
I have a problem with the egcs parser.
It raises an error message on code that seems syntactically correct to me.
It seems the egcs parser knows, it is inside a constructor parameter list.
In a function call parameter list there is no parse error.
the code:
class A
{
public:
A() {};
int f() { return 1; };
};
class B
{
public:
B(int) {};
};
A* GetA() { return new A(); };
int main()
{
B(GetA()->f());
}
the error message:
test1.cxx: In function `int main()':
test1.cxx:18: parse error before `->'
egcs-1.0.3, egcs-1.1 and egcs-ss981101 show the same behaviour.
mike