4

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!

Tim Merrifield
  • 6,088
  • 5
  • 31
  • 33

1 Answers1

1

The purpose is to keep track of the original source line that lead to the expanded code. This is then e.g 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.

Jens Gustedt
  • 76,821
  • 6
  • 102
  • 177
  • Thank you, but what exactly are those sections used for? What could appear in the built-in and command line sections? – Tim Merrifield Jan 02 '11 at 18:17
  • 1
    builtin: setting all predefined macros, such as `__LINUX__` or so. commandline: the macros that are set by `-D` commandline options – Jens Gustedt Jan 02 '11 at 18:47