Red Hat ENTERPRISE LINUX 3 - USING CPP Using Instructions page 67

Using cpp, the c preprocessor
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING CPP:
Table of Contents

Advertisement

Chapter 12. Invocation
-A-
Cancel all predefined assertions and all assertions preceding it on the command line. Also, unde-
fine all predefined macros and all macros preceding it on the command line. (This is a historical
wart and may change in the future.)
-dCHARS
is a sequence of one or more of the following characters, and must not be preceded by a
CHARS
space. Other characters are interpreted by the compiler proper, or reserved for future versions of
GCC, and so are silently ignored. If you specify characters whose behavior conflicts, the result
is undefined.
M
Instead of the normal output, generate a list of
during the execution of the preprocessor, including predefined macros. This gives you a way
of finding out what is predefined in your version of the preprocessor. Assuming you have
no file
foo.h
touch foo.h; cpp -dM foo.h
will show all the predefined macros.
D
Like
except in two respects: it does not include the predefined macros, and it outputs
M
both the
#define
standard output file.
N
Like
, but emit only the macro names, not their expansions.
D
I
Output
#include
-P
Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when
running the preprocessor on something that is not C code, and will be sent to a program which
might be confused by the linemarkers. Refer to Chapter 9 Preprocessor Output.
-C
Do not discard comments. All comments are passed through to the output file, except for com-
ments in processed directives, which are deleted along with the directive.
You should be prepared for side effects when using
ments as tokens in their own right. For example, comments appearing at the start of what would
be a directive line have the effect of turning that line into an ordinary source line, since the first
token on the line is no longer a
-gcc
Define the macros __gnuc__, __gnuc_minor__ and __gnuc_patchlevel__. These are defined au-
tomatically when you use
, the command
directives and the result of preprocessing. Both kinds of output go to the
directives in addition to the result of preprocessing.
.
#
; you can turn them off in that case with
gcc -E
directives for all the macros defined
#define
; it causes the preprocessor to treat com-
-C
63
.
-no-gcc

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents