error detection of ; syntax

J Grant jg@jguk.org
Thu Oct 4 19:26:00 GMT 2001


I am using gcc -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.96/specs
gcc version 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)

I know this is not the latest version, but maybe it still exists in the
latest version.

I am making a C++ application and in one of my class declarations I
missed a ; off, the error I got did not make it plain what the error
was, I found the error reasonably quickly but I think this is a very
simple error to parse check for. e.g.

----
g++ -Wall -O3 -c rs.cpp
In file included from rs.cpp:18:
rs.h:65: multiple types in one declaration
make: *** [rs.o] Error 1
------------

my source was like this example:

class foo;
class bar

class foo
{
 int a;
public:
 foo(void);
};


Now the obvious error is the class bar does not have a ; this must be
easy to check for eg

class bar class foo 

as that would never normally appear in source code, would it?

I am not on this list, so please email me directly if you have any
questions.


JG



More information about the Gcc-bugs mailing list