if (TREE_CODE (TREE_VALUE (args)) != STRING_CST)
{
- error ("section attribute argument not a string constant");
+ error ("%qE attribute argument not a string constant", name);
*no_add_attrs = true;
return NULL_TREE;
}
struct attribute_spec.handler. */
static tree
-d_handle_symver_attribute (tree *node, tree, tree args, int, bool *no_add_attrs)
+d_handle_symver_attribute (tree *node, tree name, tree args, int,
+ bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_DECL && TREE_CODE (*node) != VAR_DECL)
{
tree symver = TREE_VALUE (args);
if (TREE_CODE (symver) != STRING_CST)
{
- error ("%<symver%> attribute argument not a string constant");
+ error ("%qE attribute argument not a string constant", name);
*no_add_attrs = true;
return NULL_TREE;
}
tree id = TREE_VALUE (args);
if (TREE_CODE (id) != STRING_CST)
{
- error ("%qE argument not a string", name);
+ error ("%qE attribute argument not a string constant", name);
return NULL_TREE;
}
tree id = TREE_VALUE (args);
if (TREE_CODE (id) != STRING_CST)
{
- error ("visibility argument not a string");
+ error ("%qE attribute argument not a string constant", name);
return NULL_TREE;
}
struct S {} // { dg-warning ".section. attribute does not apply to types" }
@attribute("section", 123)
-int f1(); // { dg-error "section attribute argument not a string constant" }
+int f1(); // { dg-error ".section. attribute argument not a string constant" }
int f2(@section("param") int a) // { dg-error "section attribute not allowed for .a." }
{
}
@attribute("visibility", 123)
-int not_a_string(); // { dg-error "visibility argument not a string" }
+int not_a_string(); // { dg-error ".visibility. attribute argument not a string constant" }
@attribute("visibility", "invalid argument")
int invalid_argument(); // { dg-error ".visibility. argument must be one of" }