Hi gurus,
I am trying to compile following file with g++. I am using -E options
which says don't invoke the compiler. Stop at the preprocessor level.
The file is :
Hello
There
Please note that the space before hello is not a space but it is a tab
character.
Now compile this file as
g++ -x c -E hello > hello.new
After the compilation is done, if you see the contents of hello.new
file, all the tab characters are changed to space characters (white
spaces).
I'm facing some problems due to this behavious. In my case, we
generate makefiles by compiling some other files this way. Then the
generated makefiles are actually used for the final build. Now the
problem is that the source files from which the makefile is generated
has some tab characters which get converted to white spaces. Now when
i run make utility on this makefile, the utility gives error as it is
not able to recognise the white spaces.
So, my question is that whether, i am missing some compiler flag or
something or there is some problem with the compiler itself. If there
is some problem with the compiler itself, is ther any patch which
fixes this problem?
Thanks and regards,
Rahul