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]
Other format: [Raw text]

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


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


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