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


Thank you Jonathan for the nice explanations. I think it would be
better off adding what you wrote to the gcc documentation.
Please consider these:

assembler  assembler-with-cpp
f95  f95-cpp-input

So assembler-with-cpp means an assembly file which must be
preprocessed? It means that assembler alone won't do preprocessing.

But c or c++ alone does preprocessing(they did not define c-with-cpp)!!
and another thing is f95-cpp-input, does it mean like assembler-with-cpp?

Regards

On Tue, Dec 7, 2010 at 6:33 PM, Jonathan Wakely  wrote:
> 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]