sps*_*sps 2 c gcc c-preprocessor
对于一个简单的C程序,我gcc -E hello.c -o hello.pp看到了预处理后程序的外观.
在输出文件中,我可以看到许多行开头#,看起来像注释.这些线是什么?
如果没有这些注释,我怎么能只看到C代码?
以下是一个片段:
user $ gcc -E hello.c -o hello.pp
user $ tail -n 15 hello.pp
extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
# 943 "/usr/include/stdio.h" 3 4
# 3 "hello.c" 2
int main()
{
printf("Hello world \n");
return 0;
}
user $
Run Code Online (Sandbox Code Playgroud)