[Issue 5584] New: bad string representation of function types with C/Windows linkage
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 15 00:08:48 PST 2011
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: nobody at puremagic.com
ReportedBy: r.sagitario at gmx.de
--- Comment #0 from Rainer Schuetze <r.sagitario at 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: -------
More information about the Digitalmars-d-bugs
mailing list