metaprogram.h without global.h (#6469)

This commit is contained in:
Martin Griffin 2025-03-28 20:21:58 +00:00 committed by GitHub
parent 8d94edaaa0
commit 71a5542168
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,11 +4,11 @@
/* Check if VA_OPT_ is supported by the compiler. GCC's version should be at least 9.5*/
#define PP_THIRD_ARG(a,b,c,...) c
#define VA_OPT_SUPPORTED_I(...) PP_THIRD_ARG(__VA_OPT__(,),TRUE,FALSE,)
#define VA_OPT_SUPPORTED_I(...) PP_THIRD_ARG(__VA_OPT__(,),1,0,)
#define VA_OPT_SUPPORTED VA_OPT_SUPPORTED_I(?)
#if !VA_OPT_SUPPORTED
#error ERROR: VA_OPT__ is not supported. Please update your gcc compiler to version 10 or higher
#error ERROR: __VA_OPT__ is not supported. Please update your arm-none-eabi-gcc compiler to version 10 or higher
#endif // VA_OPT_SUPPORTED
/* Calls m0/m1/.../m8 depending on how many arguments are passed. */