public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13657] Error message incorrectly describes return type as argument type
[not found] <bug-13657-4@http.gcc.gnu.org/bugzilla/>
@ 2011-10-19 18:11 ` paolo.carlini at oracle dot com
2011-10-19 20:53 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-19 18:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13657
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|gcc-bugs at gcc dot gnu.org |jason at gcc dot gnu.org,
| |paolo.carlini at oracle dot
| |com
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-19 18:10:53 UTC ---
For this issue, would it make sense to keep on propagating the impl_conv_rhs
argument passed by check_return_expr to convert_for_initialization - that is,
ICR_RETURN - beyond convert_for_assignment, thus to can_convert_arg_bad ->
implicit_conversion -> standard_conversion -> instantiate_type ?
Or we want to aim for something more ad hoc in this case?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13657] Error message incorrectly describes return type as argument type
[not found] <bug-13657-4@http.gcc.gnu.org/bugzilla/>
2011-10-19 18:11 ` [Bug c++/13657] Error message incorrectly describes return type as argument type paolo.carlini at oracle dot com
@ 2011-10-19 20:53 ` jason at gcc dot gnu.org
2011-10-19 22:08 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2011-10-19 20:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13657
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-19 20:52:01 UTC ---
I think just making the error message more general makes sense here, something
along the lines of "cannot convert..."
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13657] Error message incorrectly describes return type as argument type
[not found] <bug-13657-4@http.gcc.gnu.org/bugzilla/>
2011-10-19 18:11 ` [Bug c++/13657] Error message incorrectly describes return type as argument type paolo.carlini at oracle dot com
2011-10-19 20:53 ` jason at gcc dot gnu.org
@ 2011-10-19 22:08 ` paolo.carlini at oracle dot com
2011-10-19 22:47 ` paolo at gcc dot gnu.org
2011-10-19 22:47 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-19 22:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13657
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-19 22:06:56 UTC ---
Ok, thanks, I'm doing that.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13657] Error message incorrectly describes return type as argument type
[not found] <bug-13657-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2011-10-19 22:47 ` paolo at gcc dot gnu.org
@ 2011-10-19 22:47 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-19 22:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13657
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-19 22:47:28 UTC ---
Fixed for 4.7.0.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13657] Error message incorrectly describes return type as argument type
[not found] <bug-13657-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2011-10-19 22:08 ` paolo.carlini at oracle dot com
@ 2011-10-19 22:47 ` paolo at gcc dot gnu.org
2011-10-19 22:47 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-10-19 22:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13657
--- Comment #6 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-10-19 22:46:01 UTC ---
Author: paolo
Date: Wed Oct 19 22:45:58 2011
New Revision: 180228
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180228
Log:
/cp
2011-10-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/13657
* class.c (instantiate_type): Fix error message.
/testsuite
2011-10-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/13657
* g++.dg/parse/error42.C: New.
* g++.old-deja/g++.other/ptrmem7.C: Tweak dg-errors.
Added:
trunk/gcc/testsuite/g++.dg/parse/error42.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.old-deja/g++.other/ptrmem7.C
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13657] Error message incorrectly describes return type as argument type
[not found] <bug-13657-1313@http.gcc.gnu.org/bugzilla/>
2005-11-26 8:59 ` gdr at gcc dot gnu dot org
@ 2007-01-26 23:48 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-01-26 23:48 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]
------- Comment #2 from manu at gcc dot gnu dot org 2007-01-26 23:47 -------
(In reply to comment #0)
> 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'.
It is not that easy. The function that emits the error seems to be used for
several things. However, at the point that the error is issued, I don't see any
way to detect what we are actually doing.
What do you think about this message? Will it work for any situation?
error: C::bar of type int (C::)() does not match expected type int (*)()
The patch would be something like:
- error ("argument of type %qT does not match %qT", TREE_TYPE (rhs), lhstype);
+ error ("%qE of type %qT does not match expected type %qT", rhs,
TREE_TYPE(rhs), lhstype)
Andrew? Gabriel? Ian?
I can implement it and test it if you agree.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13657
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13657] Error message incorrectly describes return type as argument type
[not found] <bug-13657-1313@http.gcc.gnu.org/bugzilla/>
@ 2005-11-26 8:59 ` gdr at gcc dot gnu dot org
2007-01-26 23:48 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 8+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-11-26 8:59 UTC (permalink / raw)
To: gcc-bugs
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at gcc dot gnu dot org
AssignedTo|unassigned at gcc dot gnu |gdr at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-09-17 03:54:45 |2005-11-26 08:59:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13657
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13657] Error message incorrectly describes return type as argument type
2004-01-12 16:35 [Bug c++/13657] New: " ian at airs dot com
@ 2004-01-12 17:44 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 8+ 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] 8+ messages in thread
end of thread, other threads:[~2011-10-19 22:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-13657-4@http.gcc.gnu.org/bugzilla/>
2011-10-19 18:11 ` [Bug c++/13657] Error message incorrectly describes return type as argument type paolo.carlini at oracle dot com
2011-10-19 20:53 ` jason at gcc dot gnu.org
2011-10-19 22:08 ` paolo.carlini at oracle dot com
2011-10-19 22:47 ` paolo at gcc dot gnu.org
2011-10-19 22:47 ` paolo.carlini at oracle dot com
[not found] <bug-13657-1313@http.gcc.gnu.org/bugzilla/>
2005-11-26 8:59 ` gdr at gcc dot gnu dot org
2007-01-26 23:48 ` manu at gcc dot gnu dot org
2004-01-12 16:35 [Bug c++/13657] New: " 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).