http://d.puremagic.com/issues/show_bug.cgi?id=5584

           Summary: bad string representation of function types with
                    C/Windows linkage
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: patch
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: r.sagita...@gmx.de


--- Comment #0 from Rainer Schuetze <r.sagita...@gmx.de> 2011-02-15 00:06:16 
PST ---
This code 

extern(C) void fnC() {}
extern(Windows) void fnWindows() {}

pragma(msg,typeof(fnC));
pragma(msg,typeof(fnWindows));

compiled with "dmd -c test.d" outputs:

voidC ()
voidWindows ()

with bad space placement. This is also the type emitted into the json file.

Here's the simple patch that corrects the spacing:

File: src\mtype.c
4734,4737c4734,4737
<             case LINKc:         p = "C ";       break;
<             case LINKwindows:   p = "Windows "; break;
<             case LINKpascal:    p = "Pascal ";  break;
<             case LINKcpp:       p = "C++ ";     break;
---
>             case LINKc:         p = " C";       break;
>             case LINKwindows:   p = " Windows"; break;
>             case LINKpascal:    p = " Pascal";  break;
>             case LINKcpp:       p = " C++";     break;

Problably, it should better output extern(C) etc. before the return type...

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

Reply via email to