bad error message: request for member `val' in static member function
Bob Sidebotham
rns@spud.eng.fore.com
Wed Dec 17 08:44:00 GMT 1997
For the (presumably illegal) class foo, shown below, egcs-1.0 gives
the following error:
xxx.cc:4: request for member `val' in static member function
xxx.cc:4: confused by earlier errors, bailing out
This is clearly inappropriate since there's no static member function
involved.
gcc 2.7.2.3 gives the following, more appropriate message:
xxx.cc:4: `val' was not declared in this scope
class foo {
public:
int val;
void bar(int v = val);
};
More information about the Gcc-bugs
mailing list