Allow multiple consecutive __attribute__ blocks
This commit is contained in:
parent
ee0dd63670
commit
2c33cccaf7
@ -420,8 +420,8 @@ type_qualifier
|
||||
;
|
||||
|
||||
declarator
|
||||
: pointer direct_declarator opt_attribute_spec { $$ = $2; }
|
||||
| direct_declarator opt_attribute_spec
|
||||
: pointer direct_declarator attributes { $$ = $2; }
|
||||
| direct_declarator attributes
|
||||
;
|
||||
|
||||
direct_declarator
|
||||
@ -573,15 +573,16 @@ external_declaration
|
||||
;
|
||||
|
||||
function_definition
|
||||
: declaration_specifiers declarator declaration_list opt_attribute_spec compound_statement
|
||||
| declaration_specifiers declarator opt_attribute_spec compound_statement
|
||||
| declarator declaration_list opt_attribute_spec compound_statement
|
||||
| declarator opt_attribute_spec compound_statement
|
||||
: declaration_specifiers declarator declaration_list attributes compound_statement
|
||||
| declaration_specifiers declarator attributes compound_statement
|
||||
| declarator declaration_list attributes compound_statement
|
||||
| declarator attributes compound_statement
|
||||
;
|
||||
|
||||
opt_attribute_spec
|
||||
attributes
|
||||
: { $$ = nullptr; }
|
||||
| attribute_spec
|
||||
| attributes attribute_spec
|
||||
;
|
||||
|
||||
attribute_spec
|
||||
|
Loading…
x
Reference in New Issue
Block a user