TEXT   41

cc.txt

Guest on 1st August 2021 05:51:42 PM

  1.  
  2.  
  3. NAME
  4.        gcc, g++ - GNU project C and C++ Compiler (v2.7)
  5.  
  6.  
  7.  
  8. SYNOPSIS
  9.        gcc [ option | filename ]...
  10.        g++ [ option | filename ]...
  11.  
  12.  
  13.  
  14. WARNING
  15.        The  information  in  this man page is an extract from the
  16.        full documentation of the GNU C compiler, and  is  limited
  17.        to the meaning of the options.
  18.  
  19.        This  man  page  is not kept up to date except when volun-
  20.        teers want to maintain it.   If  you  find  a  discrepancy
  21.        between  the  man  page and the software, please check the
  22.        Info file, which is the authoritative documentation.
  23.  
  24.        If we find that the things in this man page that  are  out
  25.        of date cause significant confusion or complaints, we will
  26.        stop distributing the man page.  The alternative, updating
  27.        the  man  page when we update the Info file, is impossible
  28.        because the rest of the work of maintaining GNU CC  leaves
  29.        us no time for that.  The GNU project regards man pages as
  30.        obsolete and should not let them take time away from other
  31.        things.
  32.  
  33.        For  complete and current documentation, refer to the Info
  34.        file `gcc' or the manual Using and  Porting  GNU  CC  (for
  35.        version  2.0).  Both are made from the Texinfo source file
  36.        gcc.texinfo.
  37.  
  38.  
  39.  
  40. DESCRIPTION
  41.        The C and C++  compilers  are  integrated.   Both  process
  42.        input  files  through  one or more of four stages: prepro-
  43.        cessing, compilation, assembly, and linking.  Source file-
  44.        name suffixes identify the source language, but which name
  45.        you use for the compiler governs default assumptions:
  46.  
  47.        gcc    assumes preprocessed (.i) files are C and assumes C
  48.               style linking.
  49.  
  50.        g++    assumes preprocessed (.i) files are C++ and assumes
  51.               C++ style linking.
  52.  
  53.        Suffixes of source file names indicate  the  language  and
  54.        kind of processing to be done:
  55.  
  56.        .c    C source; preprocess, compile, assemble
  57.        .C    C++ source; preprocess, compile, assemble
  58.        .cc   C++ source; preprocess, compile, assemble
  59.        .cxx  C++ source; preprocess, compile, assemble
  60.        .m    Objective-C source; preprocess, compile, assemble
  61.        .i    preprocessed C; compile, assemble
  62.        .ii   preprocessed C++; compile, assemble
  63.        .s    Assembler source; assemble
  64.        .S    Assembler source; preprocess, assemble
  65.        .h    Preprocessor file; not usually named on command line
  66.  
  67.        Files  with other suffixes are passed to the linker.  Com-
  68.        mon cases include:
  69.  
  70.        .o    Object file
  71.        .a    Archive file
  72.  
  73.        Linking is always the last stage unless you use one of the
  74.        -c,  -S,  or -E options to avoid it (or unless compilation
  75.        errors stop the whole process).  For the link  stage,  all
  76.        .o  files  corresponding  to  source  files, -l libraries,
  77.        unrecognized filenames (including named  .o  object  files
  78.        and  .a archives) are passed to the linker in command-line
  79.        order.
  80.  
  81.  
  82.  
  83. OPTIONS
  84.        Options must be separate: `-dr' is  quite  different  from
  85.        `-d -r '.
  86.  
  87.        Most `-f' and `-W' options have two contrary forms: -fname
  88.        and -fno-name (or -Wname and -Wno-name).   Only  the  non-
  89.        default forms are shown here.
  90.  
  91.        Here  is  a  summary  of all the options, grouped by type.
  92.        Explanations are in the following sections.
  93.  
  94.        Overall Options
  95.               -c -S -E -o file -pipe -v -x language
  96.  
  97.        Language Options
  98.               -ansi -fall-virtual -fcond-mismatch
  99.               -fdollars-in-identifiers -fenum-int-equiv
  100.               -fexternal-templates -fno-asm -fno-builtin
  101.               -fno-strict-prototype -fsigned-bitfields
  102.               -fsigned-char -fthis-is-variable
  103.               -funsigned-bitfields -funsigned-char
  104.               -fwritable-strings -traditional -traditional-cpp
  105.               -trigraphs
  106.  
  107.        Warning Options
  108.               -fsyntax-only -pedantic -pedantic-errors -w -W
  109.               -Wall -Waggregate-return -Wcast-align -Wcast-qual
  110.               -Wchar-subscript -Wcomment -Wconversion
  111.               -Wenum-clash -Werror -Wformat -Wid-clash-len
  112.               -Wimplicit -Winline -Wmissing-prototypes
  113.               -Wmissing-declarations -Wnested-externs -Wno-import
  114.               -Wparentheses -Wpointer-arith -Wredundant-decls
  115.               -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch
  116.               -Wtemplate-debugging -Wtraditional -Wtrigraphs
  117.               -Wuninitialized -Wunused -Wwrite-strings
  118.  
  119.        Debugging Options

Raw Paste


Login or Register to edit or fork this paste. It's free.