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



--- Comment #10 from Don <clugd...@yahoo.com.au> 2012-04-17 02:03:47 PDT ---
(In reply to comment #9)
> (In reply to comment #6)
> > > I'm not exactly talking about binding or calling convention, I'm more 
> > > talking
> > > about types.  To me, the two are orthogonal.
> > 
> > Whereas I would argue that since you're declaring a C function, it should 
> > be a
> > _C_ function and therefore not include features which C doesn't have. The 
> > only
> > reason that I think that permitting pure and nothrow on C functions makes 
> > any
> > sense is out of pure necessity.
> 
> No.  An extern(C) function does not mean it's a C function.  It just means it
> has C linkage.  See here: http://dlang.org/attribute.html#linkage
> 
> extern(C) has nothing to do with parameters, only calling conventions.

I don't understand that statement. Do you mean 'parameters, only name mangling"
? If so, that that isn't true.
On 32-bit x86 Windows,

extern(D) void foo(int x)

passes x in the EAX register.

extern(C) void foo(int x)

passes x on the stack.
It's not just a name mangling issue.

The confusion comes because there are some druntime functions which use C name
mangling but the extern(D) calling convention! This is not true of all
extern(C) functions.

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

Reply via email to