This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/11658] Wrong error message
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2004 13:44:47 -0000
- Subject: [Bug c/11658] Wrong error message
- References: <20030724115355.11658.bonzini@gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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