735
|
1 |
-*- mode: outline; coding: utf-8; fill-column: 80 -*-
|
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
|