I tried to check the translation unit generated for a simple hello world program looks like. So, I wrote below code in test.cpp.
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World"<<endl;
}
I then compiled the above file with g++ with -E option and output the data to a temp file. The file has c++ code with lines in between starting with # symbols.
Something like below,
# 1 "test.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "test.cpp"
# 1 "/usr/include/c++/8/iostream" 1 3
# 36 "/usr/include/c++/8/iostream" 3
- What do these lines mean ?
- Is there any document that I should read or do I have to get knowledge in any specific subject to understand this file?