simde icon indicating copy to clipboard operation
simde copied to clipboard

simde/arm/neon.h fails to compile for an ARM64 target with Visual C++

Open johnplatts opened this issue 2 years ago • 0 comments

Including "simde/arm/neon.h" fails to compile on Visual C++ for an ARM64 target since some of the SIMD_CONSTIFY_2_, SIMDE_CONSTIFY_4_, SIMDE_CONSTIFY_8_, and SIMDE_CONSTIFY_16_ macros used in some of the header files in the simde/arm/ directory give the following errors:

A link to a test C++ source file including the simde/arm/neon.h and the compiler result on Visual C++ for an ARM64 target can be found at https://godbolt.org/z/o4K7YGET7.

The following errors are produced by the SIMDE_CONSTIFY_ macros on Visual C++ when compiling for an ARM64 target:

https://simde.netlify.app/amalgamated/arm/neon.h(38025): warning C4003: not enough arguments for function-like macro invocation 'vext_f32'
https://simde.netlify.app/amalgamated/arm/neon.h(38025): warning C4002: too many arguments for function-like macro invocation '__float32x2_t_to_n64'
https://simde.netlify.app/amalgamated/arm/neon.h(38025): error C2059: syntax error: ')'

The above errors do not occur when compiling for x86 or x86_64 targets with Visual C++, and the errors do not occur when compiling for an ARM or ARM64 target with gcc or clang.

johnplatts avatar May 06 '22 19:05 johnplatts