simplify text.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 13 Nov 2011 18:57:57 +0200
changeset 1086 66ecbe32a2af
parent 1085 b3d65819639b
child 1087 e1b19e1e7031
simplify text.
cpp.rst
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp.rst	Sun Nov 13 18:57:57 2011 +0200
@@ -0,0 +1,51 @@
+.. -*- coding: utf-8; -*-
+
+=======================
+ cpp (C preprocessor).
+=======================
+
+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
+
+IBM AIX XL C/C++ compiler::
+
+  $ cc -qshowmacros -E EMPTY.c
+
+For Visual Studio compiler there no any possibility get predefined macros from
+command line...
+
+  http://msdn.microsoft.com/en-us/library/b0084kay.aspx
+                Predefined Macros
+