[Issue 327] Compiler accepts ';' by itself as a statement

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 19 12:32:37 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=327


bugzilla at digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID




------- Comment #6 from bugzilla at digitalmars.com  2006-11-19 14:32 -------
Both DebugStatement and VersionStatement allow a ';' as a statement, as both
have Statement in the grammar, and Statement includes ';'. In other words, this
is not a bug as the spec matches the implementation. If you want to change it,
it should be marked as an enhancement request, not a bug.

As to why allow empty statements, 1) such are common in C like languages and
are expected to be there and 2) they are 'boundary' or 'degenerate' cases and
can be handy to have as markers, placeholders, or to just make it easier for
programs that generate source code as output. They don't hurt anything.


-- 




More information about the Digitalmars-d-bugs mailing list