digitalmars.D.bugs - [Issue 5584] New: bad string representation of function types with C/Windows linkage
- d-bugmail puremagic.com (36/40) Feb 15 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5584
- d-bugmail puremagic.com (12/12) Apr 25 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5584
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 puremagic.com
ReportedBy: r.sagitario gmx.de
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: -------
Feb 15 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5584
Rainer Schuetze <r.sagitario gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
PDT ---
Looks good. Fix was in dmd 2.056 with commit
https://github.com/D-Programming-Language/dmd/commit/6c1a3e105529a7577d119a46c1427572be2eabbb
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 25 2012








d-bugmail puremagic.com