diff --git a/include/flatcc/portable/pattributes.h b/include/flatcc/portable/pattributes.h index 9240fa31..dd4918ac 100644 --- a/include/flatcc/portable/pattributes.h +++ b/include/flatcc/portable/pattributes.h @@ -57,7 +57,7 @@ extern "C" { /* https://en.cppreference.com/w/c/language/attributes/fallthrough */ -#if PORTABLE_HAS_C_ATTRIBUTE(__fallthrough__) +#if PORTABLE_HAS_C_ATTRIBUTE(__fallthrough__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L # define pattribute_fallthrough [[__fallthrough__]] #elif PORTABLE_HAS_ATTRIBUTE(__fallthrough__) # define pattribute_fallthrough __attribute__((__fallthrough__))