[Bug c++/22256] diagnostic shows wrong type for cast operator
pcarlini at suse dot de
gcc-bugzilla@gcc.gnu.org
Mon Aug 6 11:52:00 GMT 2007
------- Comment #6 from pcarlini at suse dot de 2007-08-06 11:52 -------
The subtle issue here is that this specific error message should be emitted
*only* when the incorrectly specified return type doesn't match, thus a plain
error instead of a pedwarn:
case sfk_conversion:
if (type && !same_type_p (type, optype))
error ("operator %qT declared to return %qT", optype, type);
else if (type)
pedwarn ("return type specified for %<operator %T%>", optype);
type = optype;
but for some reason the thing doesn't work... I'm looking a bit into it.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pcarlini at suse dot de
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22256
More information about the Gcc-bugs
mailing list