You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Non-defining object declarations can have type cv void CWG2475 #3953
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:
externvoid var; // not a definition, so incomplete type is permitted
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".
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.
changed the title [-]Non-defining object declarations can have type cv void[/-][+]Non-defining object declarations can have type cv void CWG2475[/+]on Feb 26, 2022
Activity
jensmaurer commentedon Oct 30, 2020
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".
jensmaurer commentedon Dec 7, 2020
CWG 2020-12-07:
C allows
extern void var;A new core issue will be created, and deferred to the WG14/WG21 liaison group.
jensmaurer commentedon Dec 7, 2020
[basic.pre] p6
Presumably, an "object" must have object type.
[-]Non-defining object declarations can have type cv void[/-][+]Non-defining object declarations can have type cv void CWG2475[/+]jensmaurer commentedon Feb 26, 2022
See CWG2475
frederick-vs-ja commentedon Aug 1, 2023
Should have been resolved by #6118 (4682d95).