CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
CMakeCCompilerId.c
Go to the documentation of this file.
1 #ifdef __cplusplus
2 # error "A C++ compiler has been selected for C."
3 #endif
4 
5 #if defined(__18CXX)
6 # define ID_VOID_MAIN
7 #endif
8 #if defined(__CLASSIC_C__)
9 /* cv-qualifiers did not exist in K&R C */
10 # define const
11 # define volatile
12 #endif
13 
14 
15 /* Version number components: V=Version, R=Revision, P=Patch
16  Version date components: YYYY=Year, MM=Month, DD=Day */
17 
18 #if defined(__INTEL_COMPILER) || defined(__ICC)
19 # define COMPILER_ID "Intel"
20 # if defined(_MSC_VER)
21 # define SIMULATE_ID "MSVC"
22 # endif
23  /* __INTEL_COMPILER = VRP */
24 # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
25 # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
26 # if defined(__INTEL_COMPILER_UPDATE)
27 # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
28 # else
29 # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
30 # endif
31 # if defined(__INTEL_COMPILER_BUILD_DATE)
32  /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
33 # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
34 # endif
35 # if defined(_MSC_VER)
36  /* _MSC_VER = VVRR */
37 # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
38 # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
39 # endif
40 
41 #elif defined(__PATHCC__)
42 # define COMPILER_ID "PathScale"
43 # define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
44 # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
45 # if defined(__PATHCC_PATCHLEVEL__)
46 # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
47 # endif
48 
49 #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
50 # define COMPILER_ID "Embarcadero"
51 # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
52 # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
53 # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
54 
55 #elif defined(__BORLANDC__)
56 # define COMPILER_ID "Borland"
57  /* __BORLANDC__ = 0xVRR */
58 # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
59 # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
60 
61 #elif defined(__WATCOMC__) && __WATCOMC__ < 1200
62 # define COMPILER_ID "Watcom"
63  /* __WATCOMC__ = VVRR */
64 # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
65 # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
66 # if (__WATCOMC__ % 10) > 0
67 # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
68 # endif
69 
70 #elif defined(__WATCOMC__)
71 # define COMPILER_ID "OpenWatcom"
72  /* __WATCOMC__ = VVRP + 1100 */
73 # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
74 # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
75 # if (__WATCOMC__ % 10) > 0
76 # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
77 # endif
78 
79 #elif defined(__SUNPRO_C)
80 # define COMPILER_ID "SunPro"
81 # if __SUNPRO_C >= 0x5100
82  /* __SUNPRO_C = 0xVRRP */
83 # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
84 # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
85 # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
86 # else
87  /* __SUNPRO_CC = 0xVRP */
88 # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
89 # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
90 # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
91 # endif
92 
93 #elif defined(__HP_cc)
94 # define COMPILER_ID "HP"
95  /* __HP_cc = VVRRPP */
96 # define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
97 # define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
98 # define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
99 
100 #elif defined(__DECC)
101 # define COMPILER_ID "Compaq"
102  /* __DECC_VER = VVRRTPPPP */
103 # define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
104 # define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
105 # define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
106 
107 #elif defined(__IBMC__) && defined(__COMPILER_VER__)
108 # define COMPILER_ID "zOS"
109 # if defined(__ibmxl__)
110 # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
111 # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
112 # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
113 # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
114 # else
115  /* __IBMC__ = VRP */
116 # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
117 # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
118 # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
119 # endif
120 
121 
122 #elif defined(__ibmxl__) || (defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800)
123 # define COMPILER_ID "XL"
124 # if defined(__ibmxl__)
125 # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
126 # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
127 # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
128 # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
129 # else
130  /* __IBMC__ = VRP */
131 # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
132 # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
133 # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
134 # endif
135 
136 
137 #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
138 # define COMPILER_ID "VisualAge"
139 # if defined(__ibmxl__)
140 # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
141 # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
142 # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
143 # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
144 # else
145  /* __IBMC__ = VRP */
146 # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
147 # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
148 # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
149 # endif
150 
151 
152 #elif defined(__PGI)
153 # define COMPILER_ID "PGI"
154 # define COMPILER_VERSION_MAJOR DEC(__PGIC__)
155 # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
156 # if defined(__PGIC_PATCHLEVEL__)
157 # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
158 # endif
159 
160 #elif defined(_CRAYC)
161 # define COMPILER_ID "Cray"
162 # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
163 # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
164 
165 #elif defined(__TI_COMPILER_VERSION__)
166 # define COMPILER_ID "TI"
167  /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
168 # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
169 # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
170 # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
171 
172 #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
173 # define COMPILER_ID "Fujitsu"
174 
175 #elif defined(__ghs__)
176 # define COMPILER_ID "GHS"
177 /* __GHS_VERSION_NUMBER = VVVVRP */
178 # ifdef __GHS_VERSION_NUMBER
179 # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
180 # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
181 # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
182 # endif
183 
184 #elif defined(__TINYC__)
185 # define COMPILER_ID "TinyCC"
186 
187 #elif defined(__BCC__)
188 # define COMPILER_ID "Bruce"
189 
190 #elif defined(__SCO_VERSION__)
191 # define COMPILER_ID "SCO"
192 
193 #elif defined(__ARMCC_VERSION) && !defined(__clang__)
194 # define COMPILER_ID "ARMCC"
195 #if __ARMCC_VERSION >= 1000000
196  /* __ARMCC_VERSION = VRRPPPP */
197  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
198  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
199  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
200 #else
201  /* __ARMCC_VERSION = VRPPPP */
202  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
203  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
204  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
205 #endif
206 
207 
208 #elif defined(__clang__) && defined(__apple_build_version__)
209 # define COMPILER_ID "AppleClang"
210 # if defined(_MSC_VER)
211 # define SIMULATE_ID "MSVC"
212 # endif
213 # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
214 # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
215 # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
216 # if defined(_MSC_VER)
217  /* _MSC_VER = VVRR */
218 # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
219 # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
220 # endif
221 # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
222 
223 #elif defined(__clang__)
224 # define COMPILER_ID "Clang"
225 # if defined(_MSC_VER)
226 # define SIMULATE_ID "MSVC"
227 # endif
228 # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
229 # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
230 # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
231 # if defined(_MSC_VER)
232  /* _MSC_VER = VVRR */
233 # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
234 # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
235 # endif
236 
237 #elif defined(__GNUC__)
238 # define COMPILER_ID "GNU"
239 # define COMPILER_VERSION_MAJOR DEC(__GNUC__)
240 # if defined(__GNUC_MINOR__)
241 # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
242 # endif
243 # if defined(__GNUC_PATCHLEVEL__)
244 # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
245 # endif
246 
247 #elif defined(_MSC_VER)
248 # define COMPILER_ID "MSVC"
249  /* _MSC_VER = VVRR */
250 # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
251 # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
252 # if defined(_MSC_FULL_VER)
253 # if _MSC_VER >= 1400
254  /* _MSC_FULL_VER = VVRRPPPPP */
255 # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
256 # else
257  /* _MSC_FULL_VER = VVRRPPPP */
258 # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
259 # endif
260 # endif
261 # if defined(_MSC_BUILD)
262 # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
263 # endif
264 
265 #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
266 # define COMPILER_ID "ADSP"
267 #if defined(__VISUALDSPVERSION__)
268  /* __VISUALDSPVERSION__ = 0xVVRRPP00 */
269 # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
270 # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
271 # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
272 #endif
273 
274 #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
275 # define COMPILER_ID "IAR"
276 # if defined(__VER__) && defined(__ICCARM__)
277 # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
278 # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
279 # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
280 # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
281 # elif defined(__VER__) && defined(__ICCAVR__)
282 # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
283 # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
284 # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
285 # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
286 # endif
287 
288 #elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
289 # define COMPILER_ID "SDCC"
290 # if defined(__SDCC_VERSION_MAJOR)
291 # define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
292 # define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
293 # define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
294 # else
295  /* SDCC = VRP */
296 # define COMPILER_VERSION_MAJOR DEC(SDCC/100)
297 # define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
298 # define COMPILER_VERSION_PATCH DEC(SDCC % 10)
299 # endif
300 
301 #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
302 # define COMPILER_ID "MIPSpro"
303 # if defined(_SGI_COMPILER_VERSION)
304  /* _SGI_COMPILER_VERSION = VRP */
305 # define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100)
306 # define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10)
307 # define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10)
308 # else
309  /* _COMPILER_VERSION = VRP */
310 # define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100)
311 # define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10)
312 # define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10)
313 # endif
314 
315 
316 /* These compilers are either not known or too old to define an
317  identification macro. Try to identify the platform and guess that
318  it is the native compiler. */
319 #elif defined(__hpux) || defined(__hpua)
320 # define COMPILER_ID "HP"
321 
322 #else /* unknown compiler */
323 # define COMPILER_ID ""
324 #endif
325 
326 /* Construct the string literal in pieces to prevent the source from
327  getting matched. Store it in a pointer rather than an array
328  because some compilers will just produce instructions to fill the
329  array rather than assigning a pointer to a static array. */
330 char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
331 #ifdef SIMULATE_ID
332 char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
333 #endif
334 
335 #ifdef __QNXNTO__
336 char const* qnxnto = "INFO" ":" "qnxnto[]";
337 #endif
338 
339 #if defined(__CRAYXE) || defined(__CRAYXC)
340 char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
341 #endif
342 
343 #define STRINGIFY_HELPER(X) #X
344 #define STRINGIFY(X) STRINGIFY_HELPER(X)
345 
346 /* Identify known platforms by name. */
347 #if defined(__linux) || defined(__linux__) || defined(linux)
348 # define PLATFORM_ID "Linux"
349 
350 #elif defined(__CYGWIN__)
351 # define PLATFORM_ID "Cygwin"
352 
353 #elif defined(__MINGW32__)
354 # define PLATFORM_ID "MinGW"
355 
356 #elif defined(__APPLE__)
357 # define PLATFORM_ID "Darwin"
358 
359 #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
360 # define PLATFORM_ID "Windows"
361 
362 #elif defined(__FreeBSD__) || defined(__FreeBSD)
363 # define PLATFORM_ID "FreeBSD"
364 
365 #elif defined(__NetBSD__) || defined(__NetBSD)
366 # define PLATFORM_ID "NetBSD"
367 
368 #elif defined(__OpenBSD__) || defined(__OPENBSD)
369 # define PLATFORM_ID "OpenBSD"
370 
371 #elif defined(__sun) || defined(sun)
372 # define PLATFORM_ID "SunOS"
373 
374 #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
375 # define PLATFORM_ID "AIX"
376 
377 #elif defined(__hpux) || defined(__hpux__)
378 # define PLATFORM_ID "HP-UX"
379 
380 #elif defined(__HAIKU__)
381 # define PLATFORM_ID "Haiku"
382 
383 #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
384 # define PLATFORM_ID "BeOS"
385 
386 #elif defined(__QNX__) || defined(__QNXNTO__)
387 # define PLATFORM_ID "QNX"
388 
389 #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
390 # define PLATFORM_ID "Tru64"
391 
392 #elif defined(__riscos) || defined(__riscos__)
393 # define PLATFORM_ID "RISCos"
394 
395 #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
396 # define PLATFORM_ID "SINIX"
397 
398 #elif defined(__UNIX_SV__)
399 # define PLATFORM_ID "UNIX_SV"
400 
401 #elif defined(__bsdos__)
402 # define PLATFORM_ID "BSDOS"
403 
404 #elif defined(_MPRAS) || defined(MPRAS)
405 # define PLATFORM_ID "MP-RAS"
406 
407 #elif defined(__osf) || defined(__osf__)
408 # define PLATFORM_ID "OSF1"
409 
410 #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
411 # define PLATFORM_ID "SCO_SV"
412 
413 #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
414 # define PLATFORM_ID "ULTRIX"
415 
416 #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
417 # define PLATFORM_ID "Xenix"
418 
419 #elif defined(__WATCOMC__)
420 # if defined(__LINUX__)
421 # define PLATFORM_ID "Linux"
422 
423 # elif defined(__DOS__)
424 # define PLATFORM_ID "DOS"
425 
426 # elif defined(__OS2__)
427 # define PLATFORM_ID "OS2"
428 
429 # elif defined(__WINDOWS__)
430 # define PLATFORM_ID "Windows3x"
431 
432 # else /* unknown platform */
433 # define PLATFORM_ID
434 # endif
435 
436 #elif defined(__INTEGRITY)
437 # if defined(INT_178B)
438 # define PLATFORM_ID "Integrity178"
439 
440 # else /* regular Integrity */
441 # define PLATFORM_ID "Integrity"
442 # endif
443 
444 #else /* unknown platform */
445 # define PLATFORM_ID
446 
447 #endif
448 
449 /* For windows compilers MSVC and Intel we can determine
450  the architecture of the compiler being used. This is because
451  the compilers do not have flags that can change the architecture,
452  but rather depend on which compiler is being used
453 */
454 #if defined(_WIN32) && defined(_MSC_VER)
455 # if defined(_M_IA64)
456 # define ARCHITECTURE_ID "IA64"
457 
458 # elif defined(_M_X64) || defined(_M_AMD64)
459 # define ARCHITECTURE_ID "x64"
460 
461 # elif defined(_M_IX86)
462 # define ARCHITECTURE_ID "X86"
463 
464 # elif defined(_M_ARM64)
465 # define ARCHITECTURE_ID "ARM64"
466 
467 # elif defined(_M_ARM)
468 # if _M_ARM == 4
469 # define ARCHITECTURE_ID "ARMV4I"
470 # elif _M_ARM == 5
471 # define ARCHITECTURE_ID "ARMV5I"
472 # else
473 # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
474 # endif
475 
476 # elif defined(_M_MIPS)
477 # define ARCHITECTURE_ID "MIPS"
478 
479 # elif defined(_M_SH)
480 # define ARCHITECTURE_ID "SHx"
481 
482 # else /* unknown architecture */
483 # define ARCHITECTURE_ID ""
484 # endif
485 
486 #elif defined(__WATCOMC__)
487 # if defined(_M_I86)
488 # define ARCHITECTURE_ID "I86"
489 
490 # elif defined(_M_IX86)
491 # define ARCHITECTURE_ID "X86"
492 
493 # else /* unknown architecture */
494 # define ARCHITECTURE_ID ""
495 # endif
496 
497 #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
498 # if defined(__ICCARM__)
499 # define ARCHITECTURE_ID "ARM"
500 
501 # elif defined(__ICCAVR__)
502 # define ARCHITECTURE_ID "AVR"
503 
504 # else /* unknown architecture */
505 # define ARCHITECTURE_ID ""
506 # endif
507 
508 #elif defined(__ghs__)
509 # if defined(__PPC64__)
510 # define ARCHITECTURE_ID "PPC64"
511 
512 # elif defined(__ppc__)
513 # define ARCHITECTURE_ID "PPC"
514 
515 # elif defined(__ARM__)
516 # define ARCHITECTURE_ID "ARM"
517 
518 # elif defined(__x86_64__)
519 # define ARCHITECTURE_ID "x64"
520 
521 # elif defined(__i386__)
522 # define ARCHITECTURE_ID "X86"
523 
524 # else /* unknown architecture */
525 # define ARCHITECTURE_ID ""
526 # endif
527 #else
528 # define ARCHITECTURE_ID
529 #endif
530 
531 /* Convert integer to decimal digit literals. */
532 #define DEC(n) \
533  ('0' + (((n) / 10000000)%10)), \
534  ('0' + (((n) / 1000000)%10)), \
535  ('0' + (((n) / 100000)%10)), \
536  ('0' + (((n) / 10000)%10)), \
537  ('0' + (((n) / 1000)%10)), \
538  ('0' + (((n) / 100)%10)), \
539  ('0' + (((n) / 10)%10)), \
540  ('0' + ((n) % 10))
541 
542 /* Convert integer to hex digit literals. */
543 #define HEX(n) \
544  ('0' + ((n)>>28 & 0xF)), \
545  ('0' + ((n)>>24 & 0xF)), \
546  ('0' + ((n)>>20 & 0xF)), \
547  ('0' + ((n)>>16 & 0xF)), \
548  ('0' + ((n)>>12 & 0xF)), \
549  ('0' + ((n)>>8 & 0xF)), \
550  ('0' + ((n)>>4 & 0xF)), \
551  ('0' + ((n) & 0xF))
552 
553 /* Construct a string literal encoding the version number components. */
554 #ifdef COMPILER_VERSION_MAJOR
555 char const info_version[] = {
556  'I', 'N', 'F', 'O', ':',
557  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
558  COMPILER_VERSION_MAJOR,
559 # ifdef COMPILER_VERSION_MINOR
560  '.', COMPILER_VERSION_MINOR,
561 # ifdef COMPILER_VERSION_PATCH
562  '.', COMPILER_VERSION_PATCH,
563 # ifdef COMPILER_VERSION_TWEAK
564  '.', COMPILER_VERSION_TWEAK,
565 # endif
566 # endif
567 # endif
568  ']','\0'};
569 #endif
570 
571 /* Construct a string literal encoding the internal version number. */
572 #ifdef COMPILER_VERSION_INTERNAL
573 char const info_version_internal[] = {
574  'I', 'N', 'F', 'O', ':',
575  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
576  'i','n','t','e','r','n','a','l','[',
577  COMPILER_VERSION_INTERNAL,']','\0'};
578 #endif
579 
580 /* Construct a string literal encoding the version number components. */
581 #ifdef SIMULATE_VERSION_MAJOR
582 char const info_simulate_version[] = {
583  'I', 'N', 'F', 'O', ':',
584  's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
585  SIMULATE_VERSION_MAJOR,
586 # ifdef SIMULATE_VERSION_MINOR
587  '.', SIMULATE_VERSION_MINOR,
588 # ifdef SIMULATE_VERSION_PATCH
589  '.', SIMULATE_VERSION_PATCH,
590 # ifdef SIMULATE_VERSION_TWEAK
591  '.', SIMULATE_VERSION_TWEAK,
592 # endif
593 # endif
594 # endif
595  ']','\0'};
596 #endif
597 
598 /* Construct the string literal in pieces to prevent the source from
599  getting matched. Store it in a pointer rather than an array
600  because some compilers will just produce instructions to fill the
601  array rather than assigning a pointer to a static array. */
602 char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
603 char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
604 
605 
606 
607 
608 #if !defined(__STDC__)
609 # if (defined(_MSC_VER) && !defined(__clang__)) \
610  || (defined(__ibmxl__) || defined(__IBMC__))
611 # define C_DIALECT "90"
612 # else
613 # define C_DIALECT
614 # endif
615 #elif __STDC_VERSION__ >= 201000L
616 # define C_DIALECT "11"
617 #elif __STDC_VERSION__ >= 199901L
618 # define C_DIALECT "99"
619 #else
620 # define C_DIALECT "90"
621 #endif
623  "INFO" ":" "dialect_default[" C_DIALECT "]";
624 
625 /*--------------------------------------------------------------------------*/
626 
627 #ifdef ID_VOID_MAIN
628 void main() {}
629 #else
630 # if defined(__CLASSIC_C__)
631 int main(argc, argv) int argc; char *argv[];
632 # else
633 int main(int argc, char* argv[])
634 # endif
635 {
636  int require = 0;
637  require += info_compiler[argc];
638  require += info_platform[argc];
639  require += info_arch[argc];
640 #ifdef COMPILER_VERSION_MAJOR
641  require += info_version[argc];
642 #endif
643 #ifdef COMPILER_VERSION_INTERNAL
644  require += info_version_internal[argc];
645 #endif
646 #ifdef SIMULATE_ID
647  require += info_simulate[argc];
648 #endif
649 #ifdef SIMULATE_VERSION_MAJOR
650  require += info_simulate_version[argc];
651 #endif
652 #if defined(__CRAYXE) || defined(__CRAYXC)
653  require += info_cray[argc];
654 #endif
655  require += info_language_dialect_default[argc];
656  (void)argv;
657  return require;
658 }
659 #endif
#define ARCHITECTURE_ID
#define C_DIALECT
#define PLATFORM_ID
#define COMPILER_ID
char const * info_arch
const char * info_language_dialect_default
int main(int argc, char *argv[])
char const * info_platform
char const * info_compiler