Bug 576 – version.html - ConditionalStatement grammar doesn't make sense

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2006-11-19T17:02:00Z
Last change time
2014-02-15T13:29:03Z
Keywords
spec
Assigned to
bugzilla
Creator
smjg
Blocks
511, 677

Comments

Comment #0 by smjg — 2006-11-19T17:02:47Z
The grammar for ConditionalStatement, i.e. a conditional compilation block within a function, is defined as follows: ConditionalStatement: Condition Statement Condition Statement else Statement whereas on statement.html, we have Statement: ; NonEmptyStatement ScopeBlockStatement This is implying: (a) that debug, version and static if create a scope, which is contrary to their design (b) that a statement of the form static if (...); is valid, contrary to a design principle of D whereby ';' for an empty body of something is prevented to avoid a common typo. It should be changed to ConditionalStatement: Condition NoScopeNonEmptyStatement Condition NoScopeNonEmptyStatement else NoScopeNonEmptyStatement
Comment #1 by bugzilla — 2006-12-27T01:56:57Z
Fixed DMD 0.178