怎样从C
工程中移除注释以及#if 0
代码
- GCC
- unifdef
- sunifdef
- scc-snapshots
GCC preprocesse
gcc -fpreprocessed -dD -E app_test.c
-fpreprocessed
Indicate to the preprocessor that the input file has already been preprocessed.-dD
Dump all macro definitions, at the end of preprocessing, in addition to normal output.-E
the linker is not run
scc-snapshots
$ sunifdef -DDEFINED -ned < app_test.c > 2.c