[Issue 1311] New: DMD 1.018: Fix for bug657 breaks other code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 2 18:32:32 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1311
Summary: DMD 1.018: Fix for bug657 breaks other code
Product: D
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: critical
Priority: P1
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: aldacron at gmail.com
The following worked for over three years until DMD 1.018:
####################
version(Windows)
extern(Windows):
else
extern(C):
typedef void function() foo;
...
#####################
Compilation with DMD 1.018 results in the following error:
"Declaration expected, not 'else'"
Adding brackets compiles successfully:
####################
version(Windows)
{
extern(Windows):
}
else
{
extern(C):
}
typedef void function() foo;
...
#####################
Unfortunately, this form causes the executable to crash on both Windows and
Linux. It appears the extern statements are being ignored.
This affects several packages in Derelict, causing them to be unusable with
1.018 without a rather large rewrite. I assume this is a result of the fix for
bug657.
--
More information about the Digitalmars-d-bugs
mailing list