public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10496: erroneus suggestion in diagnostic
@ 2003-04-25 15:04 bangerth
0 siblings, 0 replies; only message in thread
From: bangerth @ 2003-04-25 15:04 UTC (permalink / raw)
To: benko, gcc-bugs, gcc-prs, nobody
Old Synopsis: erroneus suggestion in diagnostic and possible bug
New Synopsis: erroneus suggestion in diagnostic
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Apr 25 15:04:06 2003
State-Changed-Why:
Confirmed. Though the example you gave is wrong (it compiles
cleanly, what you wanted is just &f). With this
---------------------------
struct X {
void f() const {
&f;
}
};
------------------------
I get indeed
g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
x.cc: In member function `void X::f() const':
x.cc:3: error: ISO C++ forbids taking the address of an unqualified non-static
member function to form a pointer to member function. Say `&const X::f'
gcc is right to require you to qualify f with the class name,
i.e. write &X::f, but the "const" in the error message is
wrong, of course.
This is a bug I see in every version 2.95 ... 3.4.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10496
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-04-25 15:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-25 15:04 c++/10496: erroneus suggestion in diagnostic bangerth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).