[Issue 576] New: version.html - ConditionalStatement grammar doesn't	make sense
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Nov 19 15:02:47 PST 2006
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=576
           Summary: version.html - ConditionalStatement grammar doesn't make
                    sense
           Product: D
           Version: 0.174
          Platform: All
               URL: http://www.digitalmars.com/d/version.html
        OS/Version: All
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: smjg at iname.com
OtherBugsDependingO 511
             nThis:
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
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list