public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30952] New: Unclear error message when callling via a function pointer
@ 2007-02-24 22:25 schnetter at aei dot mpg dot de
2007-02-25 10:29 ` [Bug c++/30952] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: schnetter at aei dot mpg dot de @ 2007-02-24 22:25 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]
When I call a function via a function pointer, then the error message does not
specify which argument contains an error. Consider the code
typedef void (* subptr) (int * x, void ** y);
void call (subptr sub, int a, int * b)
{
(* sub) (a, b);
}
when compiled, then I receive the errors
$ ~/gcc/bin/g++ --version
g++ (GCC) 4.3.0 20070201 (experimental)
$ ~/gcc/bin/g++ -c argerror.cc
argerror.cc: In function void call(void (*)(int*, void**), int, int*):
argerror.cc:5: error: invalid conversion from int to int*
argerror.cc:5: error: cannot convert int* to void** in argument passing
Note that the first error does not specify that it appears in the first
function argument, and the second error only says "in argument passing", not
"in the second argument". None of the errors say that the function *sub is
called.
--
Summary: Unclear error message when callling via a function
pointer
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
GCC build triplet: i386-apple-darwin8.8.1
GCC host triplet: i386-apple-darwin8.8.1
GCC target triplet: i386-apple-darwin8.8.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30952
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/30952] Unclear error message when callling via a function pointer
2007-02-24 22:25 [Bug c++/30952] New: Unclear error message when callling via a function pointer schnetter at aei dot mpg dot de
@ 2007-02-25 10:29 ` rguenth at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-02-25 10:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-02-25 10:29 -------
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2007-02-25 10:29:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30952
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-25 10:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-24 22:25 [Bug c++/30952] New: Unclear error message when callling via a function pointer schnetter at aei dot mpg dot de
2007-02-25 10:29 ` [Bug c++/30952] " rguenth 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).