调用预编译器cpp预编译main.cpp生成main.i文件:
$cpp main.cpp > main.i
或者:
$gcc -E main.cpp > main.i
生成的行号标志中有如下格式的:
# 1 “/usr/include/features.h” 1 3 4
表示下面的内容是由某个文件的第几行产生的。
但是最后面的几个数字是什么意思?看不出来是什么。
查到的结果是:http://tigcc.ticalc.org/doc/cpp.html
Source file name and line number information is conveyed by lines of the form
# linenum filename flags
These are called linemarkers. They are inserted as needed into the output (but never within a string or character constant). They mean that the following line originated in file filename at line linenum. filename will never contain any non-printing characters; they are replaced with octal escape sequences.
After the file name comes zero or more flags, which are 1, 2, 3, or 4. If there are multiple flags, spaces separate them. Here is what the flags mean:
1 This indicates the start of a new file.
2 This indicates returning to a file (after having included another file).
3 This indicates that the following text comes from a system header file, so certain warnings should be suppressed.
4 This indicates that the following text should be treated as being wrapped in an implicit extern "C" block.