这是C语言中的Hello World程序中GNU cpp的输出。我想知道这些行是什么意思?#Number Header_File_Location [数字]
# 1 "hello.c" # 1 "" # 1 " " # 1 "/usr/include/stdc-predef.h" 1 3 4 # 1 " " 2 # 1 "hello.c" # 1 "/usr/include/stdio.h" 1 3 4 # 27 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 374 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 # 385 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 386 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 # 375 "/usr/include/features.h" 2 3 4 # 398 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4 # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4 # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 # 399 "/usr/include/features.h" 2 3 4 # 28 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h" 1 3 4 # 212 "/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h" 3 4 typedef long unsigned int size_t; # 34 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long;
这些是某种依赖吗?如果是,那又如何?行号?
从gcc 文档:
源文件名和行号信息通过以下形式的行传达
# linenum filename flags这些称为线标记。它们根据需要插入到输出中(但绝不插入字符串或字符常量中)。它们的意思是以下几行起源于文件名filename在linenum行。filename绝不会包含任何非打印字符;它们被替换为八进制转义序列。
文件名到达零或多个标志后,即为“ 1”,“ 2”,“ 3”或“ 4”。如果有多个标志,请用空格分隔它们。标志的含义如下:
'1'表示新文件的开始。
“ 2”表示返回文件(包含另一个文件后)。
'3'表示以下文本来自系统头文件,因此应禁止某些警告。
'4'这表示应将以下文本视为包装在隐式extern“ C”块中。