--- Comment #11 from Steven Schveighoffer <> 2012-04-18 
05:21:34 PDT ---
(In reply to comment #10)
> (In reply to comment #9)
> > No.  An extern(C) function does not mean it's a C function.  It just means 
> > it
> > has C linkage.  See here:
> > 
> > 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.

No, I mean the extern(C) designates linkage and calling convention, it doesn't
affect the parameters or qualifiers for those parameters.  It also doesn't mean
C is the language used for implementation.

In other words, if the language implementing the function
implements/understands immutable, then why should it be disallowed to pass
immutable to an extern(C) function?  Same goes for ref, scope, in, out.

If something is passed in a register vs on the stack, that's part of the
calling convention, no?  It doesn't actually affect the parameter type or its
properties.  That's what I meant for 'nothing to do with parameters'.  Maybe
that was a misleading statement...

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

Wait, how can a function marked extern(C) not use C calling convention?  Are
these special-cased compiler functions?  If that's the case, I don't see how
those exceptions should affect the rules of extern(C), it doesn't affect
anything outside the compiler/runtime.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to