This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: a question about -x language option


On 7 December 2010 10:05, ali hagigat wrote:
> We can specify -x option with gcc. I want to know the meaning of the
> following languages:
>
> c c-header c-cpp-output
> c++ c++-header c++-cpp-output
> assembler assembler-with-cpp
>
> What does 'output' indicate? What is the meaning of 'header'? cpp
> stands for preprocessor?

Yes, cpp means the preprocessor, and it's not just "output" it's
"cpp-output" i.e. it specifies a file which has already been
preprocessed.

So c-cpp-output is a preprocessed C file (this is the default language
gcc assumes for a .i file)

And c++-cpp-output is a preprocessed C++ file (the default for a .ii file)

c-header means a C header file, which will be turned into a preprocessed header.

See http://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html for the
file extensions and other languages supported.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]