On Mon, May 16, 2005 at 11:19:47PM -0700, Mark Mitchell wrote:
On the other hand, I have no idea what the current code is trying to do;
the comment:
/* Avoid trying to get an operand off an identifier node. */
doesn't look like something I would have written, though you never know.
How about just replacing the entire contents of the "if (decl_context
== FIELD)" block with:
if (declarator && declarator->kind == cdk_id)
error ("invalid storage class specified for data member %qD",
declarator->u.id.unqualified_name);
else
error ("invalid storage class specified for data member");
return error_mark_node;
?
This would report the name only for some fields, eventhough the name
is known. NAME is guaranteed to be non-NULL, so all the code is trying
to do is categorize what NAME actually is.