public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13657] New: Error message incorrectly describes return type as argument type
@ 2004-01-12 16:35 ian at airs dot com
2004-01-12 17:44 ` [Bug c++/13657] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: ian at airs dot com @ 2004-01-12 16:35 UTC (permalink / raw)
To: gcc-bugs
Compiling this test case:
class C { public: int (*f())(); int bar(); };
int (*C::f())() { return C::bar; }
produces this error message:
foo3.cc: In member function `int (* C::f())()':
foo3.cc:2: error: argument of type `int (C::)()' does not match `int (*)()'
The error message is basically correct, but there is no `argument' here. The
error message should refer to the return type instead. It might suffice to
simply replace the word `argument' with the word `return'.
--
Summary: Error message incorrectly describes return type as
argument type
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ian at airs dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13657
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/13657] Error message incorrectly describes return type as argument type
2004-01-12 16:35 [Bug c++/13657] New: Error message incorrectly describes return type as argument type ian at airs dot com
@ 2004-01-12 17:44 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-12 17:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-12 17:43 -------
3.3.x gives:
pr13657.cc: In member function `int (* C::f())()':
pr13657.cc:2: error: no matches converting function `bar' to type `int (*)()'
pr13657.cc:1: error: candidates are: int C::bar()
I wound not call this a regression but I can confirm that the error message that 3.4 gives is a little
confusing.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2004-01-12 17:44:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13657
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-12 17:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-12 16:35 [Bug c++/13657] New: Error message incorrectly describes return type as argument type ian at airs dot com
2004-01-12 17:44 ` [Bug c++/13657] " pinskia at gcc dot gnu dot org
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).