author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Wed, 20 Jul 2011 10:54:41 +0300 | |
changeset 899 | 7b4265c8d324 |
parent 840 | c7002e98c1d5 |
permissions | -rw-r--r-- |
899
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
840
diff
changeset
|
1 |
-*- mode: outline; coding: utf-8; -*- |
176 | 2 |
|
3 |
* How to see macros expansion? |
|
4 |
||
5 |
** GCC. |
|
6 |
||
7 |
$ cpp <file>.c |
|
8 |
||
9 |
** MSVC. |
|
10 |
||
11 |
$ cl /E <file>.c |
|
12 |
||
13 |
* Who to see predefined macros? |
|
14 |
||
15 |
See |
|
16 |
||
17 |
http://predef.sourceforge.net/ |
|
18 |
http://en.wikipedia.org/wiki/C_preprocessor#Compiler-specific_predefined_macros |
|
19 |
||
20 |
** GNU C Compiler. |
|
21 |
||
22 |
$ gcc -dM -E - < /dev/null |
|
23 |
||
24 |
** HP-UX ansi C compiler. |
|
25 |
||
26 |
$ cc -v EMPTY.c |
|
27 |
||
28 |
** SCO OpenServer C compiler. |
|
29 |
||
30 |
$ cc -## EMPTY.c |
|
31 |
||
32 |
** Sun Studio C/C++ compiler. |
|
33 |
||
34 |
$ cc -## EMPTY.c |
|
839
ed02eb6c7a86
IBM AIX XL C/C++ compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
735
diff
changeset
|
35 |
|
ed02eb6c7a86
IBM AIX XL C/C++ compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
735
diff
changeset
|
36 |
** IBM AIX XL C/C++ compiler. |
ed02eb6c7a86
IBM AIX XL C/C++ compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
735
diff
changeset
|
37 |
|
ed02eb6c7a86
IBM AIX XL C/C++ compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
735
diff
changeset
|
38 |
$ cc -qshowmacros -E EMPTY.c |
ed02eb6c7a86
IBM AIX XL C/C++ compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
735
diff
changeset
|
39 |
|
840
c7002e98c1d5
Visual Studio compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
839
diff
changeset
|
40 |
** Visual Studio compiler. |
839
ed02eb6c7a86
IBM AIX XL C/C++ compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
735
diff
changeset
|
41 |
|
840
c7002e98c1d5
Visual Studio compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
839
diff
changeset
|
42 |
http://msdn.microsoft.com/en-us/library/b0084kay.aspx |
c7002e98c1d5
Visual Studio compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
839
diff
changeset
|
43 |
Predefined Macros |
c7002e98c1d5
Visual Studio compiler.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
839
diff
changeset
|
44 |