extern(C) and name mangling
Dave P.
dave287091 at gmail.com
Tue Dec 15 22:04:12 UTC 2020
I can’t find this in the spec, but from experimentation it seems
like extern(C) only affects name mangling of functions at the top
level scope. Thus extern(C) function templates would be mangled
differently, but still use the C calling convention. Is this
right? I want to pass some templated functions as function
pointers to some C code and wanted to confirm that would work
(and that different versions would be mangled differently).
Also, is there any way to say you want the C calling convention,
but don’t want C name mangling for top level functions?
More information about the Digitalmars-d-learn
mailing list