C preprocessor: Difference between revisions
Jump to navigation
Jump to search
New intro.
[unchecked revision] | [unchecked revision] |
(→Uses) |
(New intro.) |
||
Line 1:
== C preprocessor ==
The C preprocessor is the first step in the process of translating C/C++ source code into a binary (preprocessing -> compiling -> linking). In trivial environments, the preprocessor is used only for '''#include'''ing header files, and providing "header guards" to avoid multiple inclusions.
But the preprocessor can do much more, and can be very useful - not only for C/C++ sources, but for your Assembler sources just as well.
It should be used with care and moderation though, because it can also obfuscate your source code and introduce bugs that are very difficult to debug.
=== Rules ===
<source lang="c">
#ifdef SOME_MACRO
Line 24 ⟶ 28:
that the preprocessor can be used with languages other than C. The standard way to invoke the preprocessor with GCC is "gcc -E".
{{stub}}
=== Uses ===
|