Created on 2025-03-13.00:00:00 last changed 1 month ago
Proposed resolution (approved by CWG 2025-09-12):
Add a new paragraph to C.7.6 [diff.dcl] as follows:
Affected subclause: 9.1 [dcl.pre]
Change: In C++, no declaration of a variable can have cv void type. In C, this is allowed, unless the declaration is a definition.
[Example:extern void x; // valid C, invalid in C++
-- end example]
Rationale: Stricter type checking in C++.
Effect on original feature: Deletion of semantically well-defined feature.
Difficulty of converting: Syntactic transformation.
How widely used: Seldom.
(From submission #682.)
C allows
extern void x;
C++ does not, as clarified by issue 2475 in 9.1 [dcl.pre] paragraph 8.
This deviation warrants an entry in Annex C.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-09-13 07:13:27 | admin | set | messages: + msg8097 |
2025-09-13 07:13:27 | admin | set | status: open -> tentatively ready |
2025-03-13 00:00:00 | admin | create |