Products
and Services Support
and Docs Training Partner Programs About Red
Hat
  download storecart
red hat logo
redhat.comredhat network

Red Hat Documentation

cpp, the GNU preprocessor Contents|Index|Previous|Next
 cpp, the GNU preprocessor 

cpp merges in the #include files, expands all macros definitions, and processes the #ifdef sections. To see the output of cpp, invoke gcc with the -E option, and the preprocessed file will be printed on stdout.

There are two convenient options to assemble handwritten files that require C-style preprocessing. Both options depend on using the compiler driver program, gcc, instead of calling the assembler directly.

  • Name the source file using the extension .S (capitalized) rather than .s. gcc recognizes files with this extension as assembly language requiring C-style preprocessing.
  • Specify the “source language” explicitly for this situation, using the option, -xassembler-with-cpp.
For more information on cpp, see The C Preprocessor in GNUPro Compiler Tools.

Top|Contents|Index|Previous|Next

 

 


 
© 2001 Red Hat, Inc. All rights reserved.
About Red Hat  :  Legal statement  :  Privacy statement  :  Y2K statement  :  Contact Red Hat