Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22028

preserve preprocessor directives as comments with `gcc -E`

$
0
0

Is it possible to achive something like this with gcc -E?

src.c:

z
#define FOO bar
z

actual preprocess result:

# 1 "src.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "src.c"
z

z

desired preprocess result:

# 1 "src.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "src.c"
z
/* #define FOO bar */
z

Viewing all articles
Browse latest Browse all 22028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>