https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103649
Bug ID: 103649
Summary: -Wno-attribute=foo::bar implies no arguments
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Target Milestone: ---
[[foo::bar(1, 2)]];
is accepted with a warning:
pr103587-2.c:1:1: warning: attribute ignored [-Wattributes]
1 | [[foo::bar(1, 2)]];
| ^~~~~~~~~~~~~~~~~~
but with -Wno-attributes=foo::bar
it is rejected:
pr103587-2.c:1:11: error: ‘bar’ attribute does not take any arguments
1 | [[foo::bar(1, 2)]];
| ^
and with -Wno-attributes=foo::*
with
<built-in>: error: wrong argument to ignored attributes
pr103587-2.c:1:1: warning: attribute ignored [-Wattributes]
1 | [[foo::bar(1, 2)]];
| ^~~~~~~~~~~~~~~~~~
I think it should be accepted with whatever arguments it has.