gcc -fpreprocessed
indicates that the translation unit was already
preprocessed, thus most the preprocessor's task (like macro expansion) etc. will not be performed again.
Yet, the preprocessor still removes comments.
prog.c
Here's a program that will be invoked with the -fpreprocessed
flag.
If the program were to be compiled with the canonical gcc proc.c
, the preprocessor would replace int
, main
and return
with meaningless tokens and render the program uncompilable.
However, with -fpreprocessed
, the lines starting with a #
will just be ignored and an executable can be produced.
#define int foo
#define main bar
#define return baz
int main() {
/*
Silly comment: return THE number.
*/
return 42;
}