[Issue 6132] extern (C) Silently Ignored Within D Classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 29 09:00:15 PST 2011


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



--- Comment #4 from dawg at dawgfoto.de 2011-11-29 08:59:07 PST ---
Actually one needs to note, that extern(C) is not ignored for the calling
convention. It is only ignored for the mangling and the hidden this argument.
It even results in different delegate types for extern(C) and extern(D)
methods.

So on a struct method extern(C) behaves as __cdecl but not as extern(C).

A clean cut would be to disallow extern(C/Pascal/Windows) on structure level
except for static methods.

If there were a real need for declaring the calling convention than that should
become a different construct.

-- 
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