2 # error "A C++ compiler has been selected for C."
8 #if defined(__CLASSIC_C__)
9 /* cv-qualifiers did not exist in K&R C */
14 #if !defined(__has_include)
15 /* If the compiler does not have __has_include, pretend the answer is
17 # define __has_include(x) 0
20 @CMAKE_C_COMPILER_ID_CONTENT@
22 /* Construct the string literal in pieces to prevent the source from
23 getting matched. Store it in a pointer rather than an array
24 because some compilers will just produce instructions to fill the
25 array rather than assigning a pointer to a static array. */
26 char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
28 char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
32 char const* qnxnto = "INFO" ":" "qnxnto[]";
35 #if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
36 char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
39 @CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
40 @CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@
42 #if !defined(__STDC__) && !defined(__clang__)
43 # if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
44 # define C_VERSION "90"
48 #elif __STDC_VERSION__ > 201710L
49 # define C_VERSION "23"
50 #elif __STDC_VERSION__ >= 201710L
51 # define C_VERSION "17"
52 #elif __STDC_VERSION__ >= 201000L
53 # define C_VERSION "11"
54 #elif __STDC_VERSION__ >= 199901L
55 # define C_VERSION "99"
57 # define C_VERSION "90"
59 const char* info_language_standard_default =
60 "INFO" ":" "standard_default[" C_VERSION "]";
62 const char* info_language_extensions_default = "INFO" ":" "extensions_default["
63 // !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode.
64 #if (defined(__clang__) || defined(__GNUC__) || \
65 defined(__TI_COMPILER_VERSION__)) && \
66 !defined(__STRICT_ANSI__) && !defined(_MSC_VER)
73 /*--------------------------------------------------------------------------*/
78 # if defined(__CLASSIC_C__)
79 int main(argc, argv) int argc; char *argv[];
81 int main(int argc, char* argv[])
85 require += info_compiler[argc];
86 require += info_platform[argc];
87 require += info_arch[argc];
88 #ifdef COMPILER_VERSION_MAJOR
89 require += info_version[argc];
91 #ifdef COMPILER_VERSION_INTERNAL
92 require += info_version_internal[argc];
95 require += info_simulate[argc];
97 #ifdef SIMULATE_VERSION_MAJOR
98 require += info_simulate_version[argc];
100 #if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
101 require += info_cray[argc];
103 require += info_language_standard_default[argc];
104 require += info_language_extensions_default[argc];