[Bug c/11658] Wrong error message
bonzini at gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Feb 2 13:44:00 GMT 2004
------- Additional Comments From bonzini at gnu dot org 2004-02-02 13:44 -------
It is related to this code in c-common.c (c_common_truthvalue_conversion):
When could it be wrong for C++?!? And do "all callers" now handle ERROR_MARK
properly?
#if 0 /* This appears to be wrong for C++. */
/* These really should return error_mark_node after 2.4 is stable.
But not all callers handle ERROR_MARK properly. */
switch (TREE_CODE (TREE_TYPE (expr)))
{
case RECORD_TYPE:
error ("struct type value used where scalar is required");
return truthvalue_false_node;
case UNION_TYPE:
error ("union type value used where scalar is required");
return truthvalue_false_node;
case ARRAY_TYPE:
error ("array type value used where scalar is required");
return truthvalue_false_node;
default:
break;
}
#endif /* 0 */
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |bonzini at gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11658
More information about the Gcc-bugs
mailing list