www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1311] New: DMD 1.018: Fix for bug657 breaks other code

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: aldacron 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.


-- 
Jul 02 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1311


deewiant gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |regression




-- 
Jul 02 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1311


clayasaurus gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clayasaurus gmail.com





This bug is blocking the Arc v.2 release. 


-- 
Jul 03 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1311


tomas famolsen.dk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tomas famolsen.dk





According to the changelog for DMD 0.74:
* Version declarations can now wrap attribute : and they'll stick.

Why did this feature suddenly turn into a bug?


-- 
Oct 05 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1311


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED





The functionality was restored by introducing extern(System) for exactly this
situation. I'll mark this as fixed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 06 2009