[Issue 2354] New: conditional compilation rejects else if the declaration is a single pragma
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 11 09:34:07 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2354
Summary: conditional compilation rejects else if the declaration
is a single pragma
Product: D
Version: 2.019
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: snake.scaly at gmail.com
Compiler refuses to accept the following code:
version(Windows)
pragma(msg, "true");
else
pragma(msg, "false");
The compiler output is:
>dmd -c test.d
test3.d(3): Declaration expected, not 'else'
Also happens with static if instead of version.
--
More information about the Digitalmars-d-bugs
mailing list