This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bad error message: request for member `val' in static member function
- To: egcs-bugs at cygnus dot com
- Subject: bad error message: request for member `val' in static member function
- From: Bob Sidebotham <rns at spud dot eng dot fore dot com>
- Date: Wed, 17 Dec 1997 11:44:45 -0500
- Reply-To: egcs-bugs at cygnus dot com
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);
};