CMake/Tests/CompileFeatures/c_std_23.c
Brad King 011f3d1dd3 Tests/CompileFeatures: Fix c_std_23 case with Clang < 14
Generalize the `__STDC_VERSION__` exception previously added for
AppleClang < 14 to also cover LLVM/Clang < 14.  Although the two
vendors do not follow the same version scheme, the major versions
happen to match in this case.
2024-04-19 08:39:15 -04:00

6 lines
213 B
C

#include "c_std.h"
#if defined(C_STD) && C_STD <= C_STD_17 && \
!(C_STD == C_STD_17 && defined(__clang_major__) && __clang_major__ < 14)
# error "c_std_23 not honored"
#endif