Hi,
compiling on a64fx with ARM 22 leads to this:
/usr/include/netdb.h:666:44: error: invalid parameter name: 'static' is a keywordextern void freeaddrinfo (struct addrinfo *__ai) __THROW; ^/lustre/software/arm/compiler/22.0/arm-linux-compiler-22.0.1_Generic-AArch64_RHEL-8_aarch64-linux/lib/clang/13.0.0/include/arm_sve.h:135:14: note: expanded from macro '__ai'#define __ai static __inline__ __attribute__((__always_inline__, __nodebug__)) ^
The __ai macro in arm_sve.h is clashing with the __ai parameter.
Minimal Reproducer:
#include <arm_sve.h>#include <netdb.h>
int main() {}
$ armclang -O3 -mcpu=a64fx ...
The real code is out of my control, so I can't realistically do anything about it. __ai is not referenced in the real app anyway, it's in <netdb.h>.
I should note this problem appears with mainstream LLVM and Fujitsu compilers too, for the same reason. But given that ARM are upstreaming the SVE code, I thought this was the best place to lodge this issue.
Hi tonycurtis
Arm Compiler for Linux 22.1 has a fix for this issue and can be downloaded from https://developer.arm.com/downloads/-/arm-compiler-for-linux
The fix should also be present in LLVM 15, and will filter into other LLVM-derived vendor compilers as they update.
Ta
Rich
Hi, yep, fixed. thanks.