&& lookup_attribute ("format", attrs))
{
warning_at (input_location, OPT_Wattributes,
- "%qs attribute cannot be applied to a function that "
- "does not take variable arguments", "format");
+ "%qs attribute can only be applied to variadic functions",
+ "format");
attrs = remove_attribute ("format", attrs);
}
return c_build_type_attribute_variant (ntype, attrs);
FMT (3, 4) void print3 ();
FMT (1, 2) void print4 ();
- void print4 (void); // { dg-warning "'format' attribute cannot be applied to a function that does not take variable arguments" }
+ void print4 (void); // { dg-warning "'format' attribute can only be applied to variadic functions" }
void print5 ();
FMT (1, 2) void print5 (void); // { dg-warning "\\\[-Wattributes" }
FMT (3, 4) void (*pfprint3)();
FMT (1, 2) void (*pfprint4)();
- void (*pfprint4)(void); // { dg-warning "'format' attribute cannot be applied to a function that does not take variable arguments" }
+ void (*pfprint4)(void); // { dg-warning "'format' attribute can only be applied to variadic functions" }
void (*pfprint5)();
FMT (1, 2) void (*pfprint5)(void); // { dg-warning "\\\[-Wattributes" }