使用此选项,我在预处理后收到文件。有很多行,例如:
# 91 "/usr/include/stdint.h" 3 4
这些数字代表着什么?首先我认为这#91是包含文件的行数,但事实并非如此。关于3 4我根本不知道。
使用此选项,我在预处理后收到文件。有很多行,例如:
# 91 "/usr/include/stdint.h" 3 4
这些数字代表着什么?首先我认为这#91是包含文件的行数,但事实并非如此。关于3 4我根本不知道。
根据官方文档,该行的格式为:
# linenum filename flags
linenum指定以下行源自该filename行号。然后有四个标志:
1- 新文件的开始2- 返回文件3- 系统头文件4- 视为被包裹extern "C"所以让我们解释一下你的线标记:
# 91 "/usr/include/stdint.h" 3 4
以下行源自 的第 91 行/usr/include/stdint.h。它是一个系统头文件,应该被视为包含在extern "C".
有flags(空格分隔),含义是:
1 - Start of a new file
2 - Returning to previous file
3 - Following text comes from a system header file (#include <> vs #include "")
4 - Following text should be treated as being wrapped in an implicit extern "C" block.