How to interpret g ++ generated .i file

Possible duplicate:
gcc preprocessor output

For some reason, I need to examine some .i files generated by the g ++ preprocessor, where I see this code:

#1 /usr/local/include/boost/python.hpp 1 3 #11 /usr/local/include/boost/python.hpp 3 

I am an experienced C ++ programmer and I know what an .i file is, the problem is that I cannot find a detailed explanation of how to interpret the lines in the .i file.

Can someone explain what the above lines mean (especially the numbers following the files), or point me to the place where I can find some kind of document about it?


Thanks, looking at the link, my problem is resolved. I would like to add some background if someone else sees the same problem. My project uses strict compiler validation, i.e. g ++ -Wall -Werror. All warnings are treated as errors. And we use boost.python, until yesterday, boost was put in / usr / local / include, and compilation is fine. Then we decide to move boost to our control source for an easier update, and a warning appears (seen as an error).

So, after researching and details from the link provided by CrazyCasta, the problem is actually this: when boost is in / usr / local / include, it is considered as a system header, so gcc suppresses some warnings; while we move forward, gcc is not that tolerant of it.

Basically, just ignore or suppress this warning manually.

+4
source share
1 answer

Your answer can be found here .

Basically, this is a reassignment of the line number / input file name so that the compiler knows where the lines came from. The first number is the line number where the source came from, the file name after this file. The numbers after this are flags.

+3
source

Source: https://habr.com/ru/post/1436545/


All Articles