cpp.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 05 Jan 2010 22:17:11 +0200
changeset 275 3b1d21da03e3
parent 176 5181378e42af
child 735 5c437e2d5fe1
permissions -rw-r--r--
Correct configure.bat options.

-*- outline -*-

* How to see macros expansion?

** GCC.

  $ cpp <file>.c

** MSVC.

  $ cl /E <file>.c

* Who to see predefined macros?

See

  http://predef.sourceforge.net/
  http://en.wikipedia.org/wiki/C_preprocessor#Compiler-specific_predefined_macros

** GNU C Compiler.

  $ gcc -dM -E - < /dev/null

** HP-UX ansi C compiler.

  $ cc -v EMPTY.c

** SCO OpenServer C compiler.

  $ cc -## EMPTY.c

** Sun Studio C/C++ compiler.

  $ cc -## EMPTY.c