This is the mail archive of the gcc@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]

Question on recent method scoping changes


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


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