Hello all,
I am trying to use the C built-in function offsetof() in a basilisk code but I am getting "warning: Basilisk C parse error" from this (I have attached short examples using both Basilisk and regular C). This same syntax works fine in regular C and oddly, the Basilisk code runs and produces the same result (at least in this specific case) as the C code. I don't know if this will produce different results in the future or not.
To compile the basilisk code, I use:
CC99='mpicc -std=c99' qcc -O2 -Wall -D_MPI=1 offsetofBasilisk.c -lm
And to compile the regular C code, I use:
mpicc -O2 -Wall offsetofNative.c -lm
mpicc is using gcc version 13.3.0
If I compile the C code (offsetofNative.c) using the same basilisk compiling command, I still get the error so it is not related to the basilisk include statement. While this short example code doesn't need to be compiled in parallel, the code I am using this in is parallel and so this must work in parallel. However, if the basilisk code is compiled in serial using "qcc -O2 -Wall offsetofBasilisk.c -lm" the parse error still occurs.
My question is, why does this not give any compiler warnings in regular C but does with Basilisk C and what do I have to change to avoid the parse errors?
Thanks for your attention,
Andrew