C++ Interfacing:'static' array function parameter contradiction
Atila Neves via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Apr 28 18:49:56 PDT 2017
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
> On Friday, 28 April 2017 at 18:07:49 UTC, ParticlePeter wrote:
>> Interesting, your example corresponds to my third case, the
>> linker error. I am on Window, building an x64 App, afaik in
>> that case the MS Visual Studio linker is used instead of
>> optilink. Will add your findings to the bug report.
>
> Apparently Microsoft's C++ compiler doesn't mangle `float
> arg[3]` parameters identically to `float* arg`:
>
> void cppSArray(float color[3]) => ?cppSArray@@YAXQEAM at Z
> void cppPtr(float* color) => ?cppPtr@@YAXPEAM at Z
The worst part about that is mangling aside, the two declarations
are identical to the compiler.
Atila
More information about the Digitalmars-d-learn
mailing list