This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question on recent method scoping changes
- To: egcs at cygnus dot com
- Subject: Question on recent method scoping changes
- From: David Mazieres <dm at reeducation-labor dot lcs dot mit dot edu>
- Date: Wed, 25 Nov 1998 15:57:50 -0500 (EST)
The most recent version of egcs seems to require method names to be
fully scoped when doing anything other than a direct function
invocation. For instance, this code
struct foo {
void m1 ();
void m2 ();
void (foo::*f) ();
void set1 () { f = &m1; }
};
no longer compiles with egcs, even though it compiles with all old
versions (and every other C++ compiler I've tried). The latest egcs
[egcs-2.92.23 19981125 (gcc2 ss-980609 experimental)] gives:
method-scope.C: In method `void foo::set1()':
method-scope.C:5: object-dependent reference to `foo::m1()' can only be used in a call
method-scope.C:5: to form a pointer to member function, say `&foo::m1'
Is this change required by the final C++ standard? If so, I will
begin the painful process of making all my code comply. However, I
would really appreciate it if someone could confirm this and possibly
clarify the issue before I put a large amount of effort into
complying.
Thanks a lot,
David