cpp.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 19 Feb 2011 13:56:44 +0200
changeset 822 128982e6689b
parent 735 5c437e2d5fe1
child 839 ed02eb6c7a86
permissions -rw-r--r--
Automated merge with file:///cygdrive/e/srv/hg/tips

-*- mode: outline; coding: utf-8; fill-column: 80 -*-

* 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