This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bad error message: request for member `val' in static member function


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);
};


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]