[Bug c++/13113] New: [3.4 regression] Nice warning about &(X::m) lost

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Tue Nov 18 20:23:00 GMT 2003


Sometime in the 3.2 series, a nice warning was introduced for
code like this:
--------------------
struct A {
    int f();
};

int (A::*p)() = &(A::f);
---------------------

g/x> /home/bangerth/bin/gcc-3.2.3/bin/c++ -c x.cc
x.cc:5: parenthesis around 'A::f()' cannot be used to form a
   pointer-to-member-function

This got lost with the new parser, which now says

g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc:5: error: invalid use of non-static member function `int A::f()'

-- 
           Summary: [3.4 regression] Nice warning about &(X::m) lost
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13113



More information about the Gcc-bugs mailing list