Derive-C
Loading...
Searching...
No Matches
compiler.h
Go to the documentation of this file.
1#pragma once
2
3// JUSTIFY: Allowing _Generic with clang
4// - Tests are in C++, we ideally want all the code to be compiled as C
5// - In the matrix build, GCC will validate the templated versions, clang the _Generic
6// - Examples also help to validate (compiled as C)
7#if defined(__cplusplus)
8 #if defined(__clang__)
9 #define DC_STATIC_ASSERT_SUPPORTED
10 #define DC_GENERIC_KEYWORD_SUPPORTED
11 #endif
12#else
13 #define DC_STATIC_ASSERT_SUPPORTED
14 #define DC_GENERIC_KEYWORD_SUPPORTED
15#endif