This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13113] New: [3.4 regression] Nice warning about &(X::m) lost
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2003 20:23:24 -0000
- Subject: [Bug c++/13113] New: [3.4 regression] Nice warning about &(X::m) lost
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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