Bug 6051 – struct declarations allow a trailing semicolon

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2011-05-24T06:23:00Z
Last change time
2011-05-24T10:22:13Z
Assigned to
nobody
Creator
b.helyer

Comments

Comment #0 by b.helyer — 2011-05-24T06:23:42Z
struct A { int foo; }; DMD allows this. This is not mentioned in the documentation. One or the other is incorrect.
Comment #1 by b.helyer — 2011-05-24T06:25:45Z
Empty declaration. Derp. Nevermind. ;;;;;;;;;;;;;;;;;;;;;;;;;;
Comment #2 by bearophile_hugs — 2011-05-24T10:22:13Z
On the other hand I remember Andrei saying something about empty statements. Currently you can't write for(); I think he was looking for more uniformity.