Authors: Thiago Adams, Jens Gustedt
Date: 2026-04-01
Submitted against: C23
Status: Open
Currently we have in C23 6.7.13.8.1 "General" of 6.7.13.8 of "Standard attributes for function types"
An attribute for a function type shall be applied to a function declarator175) or to a type specifier that has a function type.
This description misses one case that we think should be valid, namely if the attribute is applied to a "function abstract declarator" such as in
typeof(int (void)[[unsequenced]])* func;
Scanning the rest of the standard shows that the same problem may also be present at other places, such as
Changes similar to the following:
Modify 6.2.1 "Scopes of identifiers, type names, and compound literals":
If the declarator or type specifier that declares the identifier appears within the list of parameter declarations in a function prototype (not part of a function definition), the identifier has function prototype scope, which terminates at the end of the function declarator or function abstract declarator.
Modify 6.7.13.8.1 "General" of 6.7.13.8 of "Standard attributes for function types" as follows:
An attribute for a function type shall be applied to a function declarator, function abstract declarator,175) or to a type specifier that has a function type.