Open sdkrystian opened 4 years ago
While pretty obvious, this does not feel editorial to me.
[dcl.pre] p10 introduces "object declaration" (which, curiously enough, might also declare a reference). This would be a suitable place to prohibit "cv void".
CWG 2020-12-07:
C allows extern void var;
A new core issue will be created, and deferred to the WG14/WG21 liaison group.
[basic.pre] p6
A variable is introduced by the declaration of a reference other than a non-static data member or of an object. The variable’s name, if any, denotes the reference or object.
Presumably, an "object" must have object type.
See CWG2475
Should have been resolved by #6118 (https://github.com/cplusplus/draft/pull/6118/commits/4682d959dff605c86b6ad361acccf839d2f0ccd2).
Nothing prohibits an object declaration from having type
cv void
. While there is wording that prevents an object definition from having such a type in [basic.def], so such wording exists to cover the following: