-E
Category
Pragma equivalent
None.
Purpose
Preprocesses the source files named in the compiler invocation, without compiling, and writes the output to the standard output.
Defaults
By default, source files are preprocessed, compiled, and linked to produce an executable file.
Usage
Source files with unrecognized file name suffixes are treated and preprocessed as C files.
Unless -qnoppline is specified, #line directives are generated to preserve the source coordinates of the tokens. Continuation sequences are preserved.
Unless -C is specified, comments are replaced in the preprocessed output by a single space character. New lines and #line directives are issued for comments that span multiple source lines.
The -E option overrides the -P, -o, and -qsyntaxonly options.
Predefined macros
None.
Examples
To compile myprogram.c and
send the preprocessed source to standard output, enter:
xlc myprogram.c -E
If myprogram.c has
a code fragment such as:
#define SUM(x,y) (x + y)
int a ;
#define mm 1 /* This is a comment in a
preprocessor directive */
int b ; /* This is another comment across
two lines */
int c ;
/* Another comment */
c = SUM(a,b) ; /* Comment in a macro function argument*/
the
output will be:
#line 2 "myprogram.c"
int a ;
#line 5
int b ;
int c ;
c = a + b ;



