On 10/21/21 02:01, Alejandro Colomar (man-pages) via Libc-alpha wrote:
10 EXAMPLE In the declaration for an entity, attributes appertaining
to that entity may appear at the start of the declarationand after the
identifier for that declaration.
[[deprecated]] void f [[deprecated]] (void); // valid
Forward references: declarators (6.7.6), enumeration specifiers
(6.7.2.2), initialization (6.7.9), typenames (6.7.7), type qualifiers
(6.7.3).
]
So we could put it in any of those 2 positions. Is there any reason
that one is better (more readable / less ambiguous) than the other? We
should decide very carefully which one to use.
"f (...)" is hardwired into people's brains for function calls, and we
shouldn't put anything between the "f" and the "(" to confuse this
longstanding syntactic pattern. So this stuff should go at the start of
the declaration, not after the identifier.