#include <stdio.h>
void Cfunc(int o, int p, int q, int a, int b, int c, float d, float *e, int f, float *g, int h, float i, float *j, int k) {
printf("o:%d,p:%d,q:%d,a:%d,b:%d,c:%d,d:%f,e:%p,f:%d,g:%p,h:%d,i:%f,j:%p,k:%d\n", o,p,q,a,b,c,d,e,f,g,h,i,j,k);
}
This is tested on an Apple M1 machine with MacOS beta and clang 14.0 installed.
❯ uname -a
Darwin ShideMBP.lan 22.0.0 Darwin Kernel Version 22.0.0: Tue Jun 28 20:46:36 PDT 2022; root:xnu-8792.0.134.131.2~1/RELEASE_ARM64_T6000 arm64
❯ gcc -v
Apple clang version 14.0.0 (clang-1400.0.28.1)
Target: arm64-apple-darwin22.0.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
C Side:
Compile to so:
Scheme Side:
The outputs should be the same, but what actually get is:
The last two variables get wrong values.
This is tested on an Apple M1 machine with MacOS beta and clang 14.0 installed.