This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13113] [3.4 regression] Nice warning about &(X::m) lost
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Nov 2003 03:11:03 -0000
- Subject: [Bug c++/13113] [3.4 regression] Nice warning about &(X::m) lost
- References: <20031118202321.13113.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2003-11-20 03:10 -------
Subject: Re: New: [3.4 regression] Nice warning about &(X::m) lost
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| 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
:-( That warning was part of the job of resolve_offset_xxx -- which
used to ICE on such code.
I wish the cp/error.c display 'A::f' instead of the silly 'A::f()',
but it is something that seemseasier to do with the new
pretty-printer.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13113