Commit 20045452 by Richard Henderson Committed by Richard Henderson

c-common.c (decl_attributes): Issue an error if the argument to alias is not a string.

* c-common.c (decl_attributes): Issue an error if the argument
to alias is not a string.

From-SVN: r21824
parent eaa41c8d
Tue Aug 18 12:40:27 1998 Richard Henderson <rth@cygnus.com>
* c-common.c (decl_attributes): Issue an error if the argument
to alias is not a string.
Tue Aug 18 10:33:30 1998 Jeffrey A Law (law@cygnus.com) Tue Aug 18 10:33:30 1998 Jeffrey A Law (law@cygnus.com)
* Makefile.in (cplus-dem.o): Provide explicit rules for building * Makefile.in (cplus-dem.o): Provide explicit rules for building
......
...@@ -855,8 +855,16 @@ decl_attributes (node, attributes, prefix_attributes) ...@@ -855,8 +855,16 @@ decl_attributes (node, attributes, prefix_attributes)
"`%s' defined both normally and as an alias"); "`%s' defined both normally and as an alias");
else if (decl_function_context (decl) == 0) else if (decl_function_context (decl) == 0)
{ {
tree id = get_identifier (TREE_STRING_POINTER tree id;
(TREE_VALUE (args)));
id = TREE_VALUE (args);
if (TREE_CODE (id) != STRING_CST)
{
error ("alias arg not a string");
break;
}
id = get_identifier (TREE_STRING_POINTER (id));
if (TREE_CODE (decl) == FUNCTION_DECL) if (TREE_CODE (decl) == FUNCTION_DECL)
DECL_INITIAL (decl) = error_mark_node; DECL_INITIAL (decl) = error_mark_node;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment