|
|
Compiler macrosYou probably maybe possibly really want to use -std1 -isoc94 at all times maybe! __DECC | DEC C compiler. | -std0 | __DECC_VER | DEC C compiler. | -std0 | __osf__ | The system is DEC OSF/1. | (or -std -std0 -stf1) | __alpha | The platform is Alpha. | (or -std -std0 -std1) | __STDC__ | Compiler conforms to an ISO C standard. | -isoc94 | __STDC_VERSION__ | The ISO C standard compiler comforms to. | (or -std -std1) and -isoc94 |
For example, the following code requires the flags -std1 and -isoc94 to be passed to cc: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| #include <stdio.h>
int
main(void)
{
#if defined(__DECC)
printf("DEC C compiler\n");
#endif
#if defined(__DECC_VER)
printf("Version %d\n", __DECC_VER);
#endif
#if defined(__alpha)
printf("Alpha\n");
#endif
#if defined(__osf__)
printf("DEC OSF/1\n");
#endif
#if defined(__STDC__)
# if defined(__STDC_VERSION__)
printf("C Standard: %d\n", __STDC_VERSION__);
# endif
#endif
return 0;
}
|
| |
|