www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16430] New: Show a warning when a semicolon is used after a

https://issues.dlang.org/show_bug.cgi?id=16430

          Issue ID: 16430
           Summary: Show a warning when a semicolon is used after a struct
                    or enum definition
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

It's probably better to issue a warning than repeating the comment over and
over in D.learn. So at least these two cases could issue a warning, but I guess
there are more cases where the DMD frontend accepts a lot more than defined by
the spec.

enum Z { one, two };

struct { int a = 1 }; 

http://forum.dlang.org/post/jwydhcjnjlhbmedwovrf forum.dlang.org

--
Aug 25 2016