简体   繁体   中英

GCC preprocessing, what are the built-in and command-line lines for?

I'm curious about the output of the preprocessing step of GCC. More precisely, what is the purpose of the following two lines:

# 1 "<built-in>"
# 1 "<command line>"

I know that the format is <line_number> <file name> <flags> but I don't understand what type of data might appear in this section. What is its purpose?

Thanks!

The purpose is to keep track of the original source line that lead to the expanded code. This is then eg used when you compile with debugging to tell the debugger the code lines through which your are stepping.

In your particular case you seem to have captured lines at the beginning of compilation, before gcc even started to process an input file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM