Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gcc(1) — BSD/386 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

as(1)

ld(1)

gdb(1)



CC(1)                                                       CC(1)


NAME
       cc - GNU project C Compiler

SYNOPSIS
       cc [ options ] files

DESCRIPTION
       Cc  is  a  version  of  the  GNU C compiler.  It accepts a
       dialect of ANSI C with extensions; this dialect is differ-
       ent from the dialect used in 4.3 BSD and earlier distribu-
       tions.  The  -traditional  flag  causes  the  compiler  to
       accept a dialect of extended Classic C, much like the C of
       these earlier  distributions.   If  you  are  not  already
       familiar  with  ANSI C and its new features, you will want
       to build your software with -traditional.

DIFFERENCES
       Most older C compiler flags are supported  by  cc.   Three
       that  are  not are: -go, to generate symbol tables for the
       unsupported sdb debugger; -f, for single precision  float-
       ing  point  in  expressions, which is now the default; and
       -t, for alternate compiler passes.

       The differences between ANSI C and Classic C dialects  are
       too  numerous  to  describe here in detail.  The following
       quick summary is meant to make users  aware  of  potential
       subtle  problems when converting Classic C code to ANSI C.

       The most obvious change is the pervasive use  of  function
       prototypes.  Under the ANSI C dialect, the number and type
       of arguments to C library functions  are  checked  by  the
       compiler  when  standard  header files are included; calls
       that fail to  match  will  yield  errors.   Argument  type
       checking  using  prototype declarations in header files is
       meant to replace the old Unix lint(1)  type-checking  pro-
       gram,  which is not available on non-Unix systems.  A sub-
       tle consequence of adding prototype declarations  is  that
       user  code  that inadvertently redefines a C library func-
       tion may break; for example it is no  longer  possible  to
       write an abort function that takes different parameters or
       returns a different value from the  standard  abort,  when
       including  standard header files.  Another issue with pro-
       totypes is that functions that  take  different  parameter
       types  no longer have the same type; function pointers now
       differ by parameter types as well as return types.   Vari-
       able  argument  lists  are  handled  differently;  the old
       varargs(3) package is  obsolete,  replaced  by  stdarg(3),
       which  unfortunately is not completely compatible.  A sub-
       tle change in  type  promotion  can  be  confusing:  small
       unsigned  types  are  now widened into signed types rather
       than unsigned types.  A similar problem can occur with the
       sizeof  operator, which now yields an unsigned type rather
       than a signed type.  One common problem is due to a change
       in  scoping:  external  declarations are now scoped to the



Version 1.40               May 9, 1991                          1




CC(1)                                                       CC(1)


       block they occur in, so  a  declaration  for  (say)  errno
       inside  one  block will no longer declare it in all subse-
       quent blocks.  The syntax for braces in structure initial-
       izations is now a bit stricter, and it is sometimes neces-
       sary to add braces to please the compiler.  Two very  sub-
       tle and sometimes very annoying features apply to constant
       strings and to the longjmp(3) function.  Constant  strings
       in  the ANSI dialect are read-only; attempts to alter them
       cause protection violations.  This  ANSI  feature  permits
       the  compiler  to  coalesce  identical strings in the same
       source file, and saves space when  multiple  copies  of  a
       binary  are  running at the same time, since the read-only
       part of a binary is sharable.  The most common  difficulty
       with  read-only  strings  lies  with the use of the mktemp
       function, which in  the  past  often  altered  a  constant
       string  argument.   It is now necessary to copy a constant
       string (for example, with  strdup(3))  before  it  may  be
       altered.   The longjmp function may now destroy any regis-
       ter or stack variable in the function that made the corre-
       sponding  call  to the setjmp function; to protect a local
       variable, the new ANSI volatile  modifier  must  be  used.
       This  often  leads  to  confusing situations upon `return'
       from setjmp.  The compiler has extended warning flags  for
       dealing  with  read-only strings and setjmp, but these are
       not very effective.  If your code has problems with any of
       these ANSI features, you will probably want to use -tradi-
       tional.

       Even with -traditional, there are some differences between
       this  dialect  of  Classic  C and the dialect supported on
       older distributions.

       There are at least two differences that are a  consequence
       of  the fact that cc uses an ANSI C style grammar for both
       traditional and ANSI modes.  The old C dialect permitted a
       typedef  to  replace a simple type in the idiom ``unsigned
       type''; this cc treats such forms as syntax  errors.   The
       old C dialect also permitted formal parameters to have the
       same names as typedef types; the current dialect does not.

       Some questionable or illegal practices that were supported
       in the old C dialect are not  supported  by  -traditional:
       non-comment text at the end of a ``#include'' preprocessor
       control line is an error, not ignored; compound assignment
       operators  must  not contain white space, e.g.  ``* ='' is
       not the same as ``*=''; the last member declaration  in  a
       structure  or  union must be terminated by a semicolon; it
       is not possible to ``switch'' on function  pointers;  more
       than  one  occurrence  of ``#else'' at the same level in a
       preprocessor ``#if'' clause is an error, not ignored.

       Some truly ancient C practices are  no  longer  supported.
       The  idiom  of  declaring an anonymous structure and using
       its members to extract fields  from  other  structures  or



Version 1.40               May 9, 1991                          2




CC(1)                                                       CC(1)


       even non-structures is illegal.  Integers are not automat-
       ically converted to pointers when they  are  dereferenced.
       The  -traditional  dialect  does  not retain the so-called
       ``old-fashioned'' assignment  operators  (with  the  ``=''
       preceding  rather than following the operator) or initial-
       izations (with no ``='' between initializer  and  initial-
       izee).

WARNING
       This  rest  of man page is an extract of the documentation
       of the GNU C compiler and is limited to the meaning of the
       options.   It  is  not kept up to date.  If you want to be
       certain of the information below, check it in  the  manual
       "Using  and Porting GCC".  Refer to the Info file gcc.info
       or the DVI file gcc.dvi which are made  from  the  Texinfo
       source file gcc.texinfo.

       The  GNU  C  compiler  uses a command syntax much like the
       Unix C compiler.  The cc program accepts options and  file
       names as operands.  Multiple single-letter options may not
       be grouped: -dr is very different from -d -r.

       When you invoke GNU CC, it  normally  does  preprocessing,
       compilation,  assembly  and linking.  File names which end
       in .c are taken as C source to be  preprocessed  and  com-
       piled;  file  names ending in .i are taken as preprocessor
       output to be compiled;  compiler  output  files  plus  any
       input  files  with  names ending in .s are assembled; then
       the resulting object files, plus any  other  input  files,
       are linked together to produce an executable.

       Command  options  allow  you  to  stop  this process at an
       intermediate stage.  For example, the -c option  says  not
       to  run  the  linker.   Then the output consists of object
       files output by the assembler.

       Other command options are passed on to one stage  of  pro-
       cessing.  Some options control the preprocessor and others
       the compiler itself.  Yet other options control the assem-
       bler  and  linker;  these are not documented here, but you
       rarely need to use any of them.

OPTIONS
       Here are the options to control  the  overall  compilation
       process, including those that say whether to link, whether
       to assemble, and so on.

       -o file
              Place output in file file.  This applies regardless
              to  whatever  sort  of  output  is  being produced,
              whether it be an executable file, an  object  file,
              an assembler file or preprocessed C code.

              If  -o  is  not specified, the default is to put an



Version 1.40               May 9, 1991                          3




CC(1)                                                       CC(1)


              executable file in a.out, the object file  source.c
              in  source.o,  an  assembler  file in source.s, and
              preprocessed C on standard output.

       -c     Compile or assemble the source files,  but  do  not
              link.   Produce  object  files  with  names made by
              replacing .c or .s with .o at the end of the  input
              file  names.   Do  nothing  at all for object files
              specified as input.

       -S     Compile into assembler code but  do  not  assemble.
              The assembler output file name is made by replacing
              .c with .s at the end of the input file  name.   Do
              nothing at all for assembler source files or object
              files specified as input.

       -E     Run only the C preprocessor.  Preprocess all the  C
              source  files  specified  and output the results to
              standard output.

       -v     Compiler driver program prints the commands it exe-
              cutes as it runs the preprocessor, compiler proper,
              assembler and linker.  Some of these  are  directed
              to print their own version numbers.

       -pipe  Use  pipes rather than temporary files for communi-
              cation between the various stages  of  compilation.
              This fails to work on some systems where the assem-
              bler is unable to read from a  pipe;  but  the  GNU
              assembler has no trouble.

       -Bprefix
              Compiler  driver  program  tries prefix as a prefix
              for each program it tries to run.   These  programs
              are cpp, cc1, as and ld.

              For  each subprogram to be run, the compiler driver
              first tries the -B prefix, if any.  If that name is
              not  found,  or if -B was not specified, the driver
              tries  a  standard  prefix,  which   currently   is
              /usr/libexec/.   If  this does not result in a file
              name that is found, the unmodified program name  is
              searched  for  using  the  directories specified in
              your PATH environment variable.

              You can get a similar result from  the  environment
              variable  GCCEXECPREFIX;  if  it  is defined, its
              value is used as a prefix in the same way.  If both
              the  -B option and the GCCEXECPREFIX variable are
              present, the -B option is used first and the  envi-
              ronment variable value second.

       -bprefix
              The  argument prefix is used as a second prefix for



Version 1.40               May 9, 1991                          4




CC(1)                                                       CC(1)


              the compiler executables and libraries.  This  pre-
              fix is optional: the compiler tries each file first
              with it, then without it.  This prefix follows  the
              prefix specified with -B or the default prefixes.

              Thus,  -bvax-  -Bcc/ in the presence of environment
              variable GCCEXECPREFIX  with  definition  /u/foo/
              causes  GNU  CC to try the following file names for
              the preprocessor executable:

                   cc/vax-cpp
                   cc/cpp
                   /u/foo/vax-cpp
                   /u/foo/cpp
                   /usr/libexec/vax-cpp
                   /usr/libexec/cpp

       These options control the details of C compilation itself.

       -ansi  Support all ANSI standard C programs.

              This  turns  off certain features of GNU C that are
              incompatible with ANSI C, such as the  asm,  inline
              and  typeof keywords, and predefined macros such as
              unix and vax that identify the type of  system  you
              are  using.   It  also  enables the undesirable and
              rarely used ANSI trigraph feature.

              The  alternate  keywords  asm,  inline  and
              typeof  continue  to  work  despite -ansi.  You
              would not want to use them in an ANSI C program, of
              course,  but  it useful to put them in header files
              that might be included in  compilations  done  with
              -ansi.    Alternate   predefined   macros  such  as
              unix and vax are also  available,  with  or
              without -ansi.

              The  -ansi  option does not cause non-ANSI programs
              to be rejected gratuitously.  For  that,  -pedantic
              is required in addition to -ansi.

              The  macro  STRICTANSI  is predefined when the
              -ansi option is used.  Some header files may notice
              this macro and refrain from declaring certain func-
              tions or defining  certain  macros  that  the  ANSI
              standard  doesn't call for; this is to avoid inter-
              fering with any programs that might use these names
              for other things.

       -traditional
              Attempt  to  support  some aspects of traditional C
              compilers.  Specifically:

            * All extern declarations take effect  globally  even



Version 1.40               May 9, 1991                          5




CC(1)                                                       CC(1)


              if  they  are  written inside of a function defini-
              tion.  This includes implicit declarations of func-
              tions.

            *  The  keywords  typeof,  inline,  signed, const and
              volatile are not recognized.

            *  Comparisons  between  pointers  and  integers  are
              always allowed.

            * Integer types unsigned short and unsigned char pro-
              mote to unsigned int.

            * Out-of-range floating point  literals  are  not  an
              error.

            *  All  automatic variables not declared register are
              preserved by longjmp(3C).  Ordinarily, GNU  C  fol-
              lows  ANSI  C:  automatic  variables  not  declared
              volatile may be clobbered.

            * In the preprocessor, comments convert to nothing at
              all,  rather  than  to a space.  This allows tradi-
              tional token concatenation.

            * In the preprocessor, macro arguments are recognized
              within  string constants in a macro definition (and
              their values are stringified, though without  addi-
              tional quote marks, when they appear in such a con-
              text).  The preprocessor always considers a  string
              constant to end at a newline.

            *  The  predefined macro STDC is not defined when
              you use -traditional, but GNUC  is  (since  the
              GNU  extensions  which  GNUC  indicates are not
              affected by -traditional).  If you  need  to  write
              header  files  that  work  differently depending on
              whether -traditional is in use, by testing both  of
              these  predefined  macros  you can distinguish four
              situations: GNU C, traditional GNU C, other ANSI  C
              compilers, and other old C compilers.

       -O     Optimize.   Optimizing  compilation  takes somewhat
              more time, and a lot more memory for a large  func-
              tion.

              Without  -O,  the  compiler's goal is to reduce the
              cost of compilation and to make  debugging  produce
              the  expected results.  Statements are independent:
              if you stop the program with a  breakpoint  between
              statements,  you can then assign a new value to any
              variable or change the program counter to any other
              statement  in  the  function  and  get  exactly the
              results you would expect from the source code.



Version 1.40               May 9, 1991                          6




CC(1)                                                       CC(1)


              Without -O, only variables  declared  register  are
              allocated  in  registers.   The  resulting compiled
              code is a little worse than produced by PCC without
              -O.

              With -O, the compiler tries to reduce code size and
              execution time.

              Some of the -f options described  below  turn  spe-
              cific kinds of optimization on or off.

       -g     Produce debugging information in the operating sys-
              tem's native format (for DBX or SDB).  GDB also can
              work with this debugging information.

              Unlike most other C compilers, GNU CC allows you to
              use -g with -O.  The shortcuts taken  by  optimized
              code  may  occasionally produce surprising results:
              some variables you declared may not exist  at  all;
              flow  of control may briefly move where you did not
              expect it; some  statements  may  not  be  executed
              because they compute constant results or their val-
              ues were already at hand; some statements may  exe-
              cute  in  different  places because they were moved
              out of loops.  Nevertheless it proves  possible  to
              debug  optimized  output.  This makes it reasonable
              to use the optimizer for programs that  might  have
              bugs.

       -w     Inhibit all warning messages.

       -W     Print extra warning messages for these events:

            *  An  automatic variable is used without first being
              initialized.

              These warnings are possible only in optimizing com-
              pilation,  because  they require data flow informa-
              tion that is computed only when optimizing.  If you
              don't  specify -O, you simply won't get these warn-
              ings.

              These warnings occur only for  variables  that  are
              candidates  for  register  allocation.   Therefore,
              they do not occur for a variable that  is  declared
              volatile,  or whose address is taken, or whose size
              is other than 1, 2, 4 or 8 bytes.   Also,  they  do
              not  occur  for  structures, unions or arrays, even
              when they are in registers.

              Note that there may be no warning about a  variable
              that is used only to compute a value that itself is
              never  used,  because  such  computations  may   be
              deleted  by  data flow analysis before the warnings



Version 1.40               May 9, 1991                          7




CC(1)                                                       CC(1)


              are printed.

              These warnings are made optional because GNU CC  is
              not  smart  enough  to  see all the reasons why the
              code might be correct despite appearing to have  an
              error.  Here is one example of how this can happen:

                   {
                     int x;
                     switch (y)
                       {
                       case 1: x = 1;
                         break;
                       case 2: x = 4;
                         break;
                       case 3: x = 5;
                       }
                     foo (x);
                   }

              If the value of y is always 1, 2 or 3,  then  x  is
              always  initialized,  but GNU CC doesn't know this.
              Here is another common case:

                   {
                     int save_y;
                     if (change_y) save_y = y, y = new_y;
                     ...
                     if (change_y) y = save_y;
                   }

              This has no bug because savey is used only  if  it
              is set.

              Some  spurious  warnings  can  be  avoided  if  you
              declare as volatile all the functions you use  that
              never return.

            *  A  nonvolatile automatic variable might be changed
              by a call to longjmp(3C).  These warnings  as  well
              are possible only in optimizing compilation.

              The compiler sees only the calls to setjmp(3C).  It
              cannot know where longjmp(3C) will  be  called;  in
              fact,  a  signal handler could call it at any point
              in the code.  As a result, you may  get  a  warning
              even  when  there  is  in  fact  no problem because
              longjmp(3C) cannot in fact be called at  the  place
              which would cause a problem.

            *  A  function  can  return  either with or without a
              value.  (Falling off the end of the  function  body
              is  considered  returning  without  a  value.)  For
              example, this function would evoke such a warning:



Version 1.40               May 9, 1991                          8




CC(1)                                                       CC(1)


                   foo (a)
                   {
                     if (a > 0)
                       return a;
                   }

              Spurious warnings can occur because GNU CC does not
              realize that certain functions (including abort(3C)
              and longjmp(3C)) will never return.

            * An expression-statement contains no side effects.

              In the future, other useful warnings  may  also  be
              enabled by this option.

       -Wimplicit
              Warn whenever a function is implicitly declared.

       -Wreturn-type
              Warn  whenever a function is defined with a return-
              type that defaults to int.   Also  warn  about  any
              return statement with no return-value in a function
              whose return-type is not void.

       -Wunused
              Warn whenever a local variable is unused aside from
              its   declaration,   and  whenever  a  function  is
              declared static but never defined.

       -Wswitch
              Warn whenever a switch statement has  an  index  of
              enumeral  type  and lacks a case for one or more of
              the named codes of that enumeration.  (The presence
              of  a  default  label prevents this warning.)  case
              labels outside the enumeration range  also  provoke
              warnings when this option is used.

       -Wcomment
              Warn  whenever  a comment-start sequence /* appears
              in a comment.

       -Wtrigraphs
              Warn if any  trigraphs  are  encountered  (assuming
              they are enabled).

       -Wall  All  of  the  above -W options combined.  These are
              all the options which pertain to usage that  we  do
              not recommend and that we believe is always easy to
              avoid, even in conjunction with macros.

              The other -W...  options below are not  implied  by
              -Wall  because  certain  kinds of useful macros are
              almost impossible to write  without  causing  those
              warnings.



Version 1.40               May 9, 1991                          9




CC(1)                                                       CC(1)


       -Wshadow
              Warn  whenever  a  local  variable  shadows another
              local variable.

       -Wid-clash-len
              Warn whenever two distinct identifiers match in the
              first  len characters.  This may help you prepare a
              program that will compile  with  certain  obsolete,
              brain-damaged compilers.

       -Wpointer-arith
              Warn  about  anything that depends on the size of a
              function type or of  void.   GNU  C  assigns  these
              types  a size of 1, for convenience in calculations
              with void * pointers and pointers to functions.

       -Wcast-qual
              Warn whenever a pointer is cast so as to  remove  a
              type  qualifier from the target type.  For example,
              warn if a const char * is cast to an ordinary  char
              *.

       -Wwrite-strings
              Give  string  constants the type const char[length]
              so that copying the address of one into a non-const
              char  * pointer will get a warning.  These warnings
              will help you find at compile time  code  that  can
              try  to  write  into a string constant, but only if
              you have been very careful  about  using  const  in
              declarations  and  prototypes.   Otherwise, it will
              just be a nuisance; this is why  we  did  not  make
              -Wall request these warnings.

       -p     Generate  extra  code  to write profile information
              suitable for the analysis program prof(1).

       -pg    Generate extra code to  write  profile  information
              suitable for the analysis program gprof(1).

       -a     Generate  extra  code  to write profile information
              for basic blocks, suitable for the analysis program
              tcov(1).    Eventually   GNU   gprof(1)  should  be
              extended to process this data.

       -llibrary
              Search a standard list of directories for a library
              named  library, which is actually a file named lib-
              library.a.  The linker uses this file as if it  had
              been specified precisely by name.

              The  directories  searched include several standard
              system directories plus any that you  specify  with
              -L.




Version 1.40               May 9, 1991                         10




CC(1)                                                       CC(1)


              Normally  the  files  found  this  way  are library
              files--archive  files  whose  members  are   object
              files.  The linker handles an archive file by scan-
              ning through it for members  which  define  symbols
              that  have  so far been referenced but not defined.
              But if the file that is found is an ordinary object
              file,  it is linked in the usual fashion.  The only
              difference between using an -l option and  specify-
              ing  a file name is that -l searches several direc-
              tories.

       -Ldir  Add directory dir to the list of directories to  be
              searched for -l.

       -nostdlib
              Don't use the standard system libraries and startup
              files when linking.  Only  the  files  you  specify
              (plus gnulib) will be passed to the linker.

       -mmachinespec
              Machine-dependent option specifying something about
              the type of  target  machine.   These  options  are
              defined by the macro TARGETSWITCHES in the machine
              description.  The default for the options  is  also
              defined  by that macro, which enables you to change
              the defaults.

              These are the  -m  options  defined  in  the  68000
              machine description:

              -m68020
              -mc68020
                   Generate  output  for  a  68020 (rather than a
                   68000).  This is the default if  you  use  the
                   unmodified sources.

              -m68000
              -mc68000
                   Generate  output  for  a  68000 (rather than a
                   68020).

              -m68881
                   Generate output containing 68881  instructions
                   for  floating  point.   This is the default if
                   you use the unmodified sources.

              -mfpa
                   Generate output containing  Sun  FPA  instruc-
                   tions for floating point.

              -msoft-float
                   Generate  output  containing library calls for
                   floating point.




Version 1.40               May 9, 1991                         11




CC(1)                                                       CC(1)


              -mshort
                   Consider type int to be  16  bits  wide,  like
                   short int.

              -mnobitfield
                   Do   not   use   the  bit-field  instructions.
                   -m68000 implies -mnobitfield.

              -mbitfield
                   Do use the  bit-field  instructions.   -m68020
                   implies  -mbitfield.   This  is the default if
                   you use the unmodified sources.

              -mrtd
                   Use a different  function-calling  convention,
                   in which functions that take a fixed number of
                   arguments return  with  the  rtd  instruction,
                   which  pops  their  arguments while returning.
                   This saves one instruction in the caller since
                   there is no need to pop the arguments there.

                   This  calling  convention is incompatible with
                   the one normally used on Unix, so  you  cannot
                   use  it if you need to call libraries compiled
                   with the Unix compiler.

                   Also, you must provide function prototypes for
                   all  functions  that  take variable numbers of
                   arguments  (including  printf(3S));  otherwise
                   incorrect  code will be generated for calls to
                   those functions.

                   In addition,  seriously  incorrect  code  will
                   result  if  you  call a function with too many
                   arguments.   (Normally,  extra  arguments  are
                   harmlessly ignored.)

                   The  rtd instruction is supported by the 68010
                   and 68020 processors, but not by the 68000.

              These -m options are defined  in  the  Vax  machine
              description:

              -munix
                   Do   not   output  certain  jump  instructions
                   (aobleq and so on) that the Unix assembler for
                   the Vax cannot handle across long ranges.

              -mgnu
                   Do  output  those  jump  instructions,  on the
                   assumption that you will assemble with the GNU
                   assembler.

              -mg



Version 1.40               May 9, 1991                         12




CC(1)                                                       CC(1)


                   Output  code  for g-format floating point num-
                   bers instead of d-format.

              These -m switches are supported on the Sparc:

              -mfpu
                   Generate  output  containing  floating   point
                   instructions.   This is the default if you use
                   the unmodified sources.

              -msoft-float
                   Generate output containing library  calls  for
                   floating point.

              -mno-epilogue
                   Generate   separate  return  instructions  for
                   return statements.  This has  both  advantages
                   and  disadvantages;  I  don't recall what they
                   are.

              These -m options are defined in the Convex  machine
              description:

              -mc1
                   Generate output for a C1.  This is the default
                   when the compiler is configured for a C1.

              -mc2
                   Generate output for a C2.  This is the default
                   when the compiler is configured for a C2.

              -margcount
                   Generate  code which puts an argument count in
                   the word preceding each argument  list.   Some
                   nonportable  Convex and Vax programs need this
                   word.  (Debuggers don't; this info is  in  the
                   symbol table.)

              -mnoargcount
                   Omit  the  argument  count  word.  This is the
                   default if you use the unmodified sources.

       -fflag Specify machine-independent flags.  Most flags have
              both positive and negative forms; the negative form
              of -ffoo would be -fno-foo.  In  the  table  below,
              only  one  of the forms is listed--the one which is
              not the default.  You can figure out the other form
              by either removing no- or adding it.

       -fpcc-struct-return
              Use  the  same  convention for returning struct and
              union values that is used by the usual  C  compiler
              on  your system.  This convention is less efficient
              for small structures, and on many machines it fails



Version 1.40               May 9, 1991                         13




CC(1)                                                       CC(1)


              to be reentrant; but it has the advantage of allow-
              ing intercallability between GCC-compiled code  and
              PCC-compiled code.

       -ffloat-store
              Do not store floating-point variables in registers.
              This  prevents  undesirable  excess  precision   on
              machines  such as the 68000 where the floating reg-
              isters (of the 68881) keep more  precision  than  a
              double is supposed to have.

              For  most  programs, the excess precision does only
              good, but a few programs rely on the precise  defi-
              nition  of  IEEE floating point.  Use -ffloat-store
              for such programs.

       -fno-asm
              Do not recognize asm, inline or typeof  as  a  key-
              word.  These words may then be used as identifiers.
              You can  use  asm,  inline  and  typeof
              instead.

       -fno-defer-pop
              Always  pop  the arguments to each function call as
              soon as that function returns.  Normally  the  com-
              piler  (when  optimizing) lets arguments accumulate
              on the stack for several function  calls  and  pops
              them all at once.

       -fstrength-reduce
              Perform  the  optimizations of loop strength reduc-
              tion and elimination of iteration variables.

       -fcombine-regs
              Allow the combine pass to  combine  an  instruction
              that  copies one register into another.  This might
              or might not produce better code when used in addi-
              tion  to  -O.  I am interested in hearing about the
              difference this makes.

       -fforce-mem
              Force memory operands to be copied  into  registers
              before  doing arithmetic on them.  This may produce
              better code by making all memory references  poten-
              tial common subexpressions.  When they are not com-
              mon subexpressions, instruction combination  should
              eliminate  the separate register-load.  I am inter-
              ested in hearing about the difference this makes.

       -fforce-addr
              Force memory address constants to  be  copied  into
              registers  before  doing  arithmetic on them.  This
              may produce better code just as -fforce-mem may.  I
              am  interested in hearing about the difference this



Version 1.40               May 9, 1991                         14




CC(1)                                                       CC(1)


              makes.

       -fomit-frame-pointer
              Don't keep the frame  pointer  in  a  register  for
              functions  that  don't  need  one.  This avoids the
              instructions to save,  set  up  and  restore  frame
              pointers; it also makes an extra register available
              in many functions.  It also makes debugging  impos-
              sible.

              On some machines, such as the Vax, this flag has no
              effect, because the standard calling sequence auto-
              matically  handles the frame pointer and nothing is
              saved by pretending it doesn't exist.  The machine-
              description  macro  FRAMEPOINTERREQUIRED controls
              whether a target machine supports this flag.

       -finline-functions
              Integrate all simple functions into their  callers.
              The  compiler heuristically decides which functions
              are simple enough to be worth integrating  in  this
              way.

              If  all  calls  to a given function are integrated,
              and the function is declared static, then the func-
              tion  is  normally  not output as assembler code in
              its own right.

       -fcaller-saves
              Enable values to be  allocated  in  registers  that
              will  be  clobbered  by function calls, by emitting
              extra instructions to save and restore  the  regis-
              ters  around  such  calls.  Such allocation is done
              only when it seems to result in  better  code  than
              would otherwise be produced.

              This  option  is  enabled  by  default  on  certain
              machines,  usually  those  which  have   no   call-
              preserved registers to use instead.

       -fkeep-inline-functions
              Even  if  all  calls  to a given function are inte-
              grated, and the function is declared static, never-
              theless output a separate run-time callable version
              of the function.

       -fwritable-strings
              Store string constants in the writable data segment
              and don't uniquize them.  This is for compatibility
              with old programs which assume they can write  into
              string constants.  Writing into string constants is
              a very bad idea; constants should be constant.





Version 1.40               May 9, 1991                         15




CC(1)                                                       CC(1)


       -fcond-mismatch
              Allow conditional expressions with mismatched types
              in  the  second  and third arguments.  The value of
              such an expression is void.

       -fno-function-cse
              Do not put function addresses  in  registers;  make
              each  instruction  that  calls  a constant function
              contain the function's address explicitly.

              This option results in  less  efficient  code,  but
              some  strange hacks that alter the assembler output
              may be confused by the optimizations performed when
              this option is not used.

       -fvolatile
              Consider  all memory references through pointers to
              be volatile.

       -fshared-data
              Requests that the data and non-const  variables  of
              this compilation be shared data rather than private
              data.  The distinction makes sense only on  certain
              operating  systems,  where  shared  data  is shared
              between processes running the same  program,  while
              private data exists in one copy per process.

       -funsigned-char
              Let  the  type  char be the unsigned, like unsigned
              char.

              Each kind of machine has a default  for  what  char
              should  be.   It  is  either  like unsigned char by
              default or like signed char by default.  (Actually,
              at present, the default is always signed.)

              The type char is always a distinct type from either
              signed char  or  unsigned  char,  even  though  its
              behavior is always just like one of those two.

              Note  that  this is equivalent to -fno-signed-char,
              which is the negative form of -fsigned-char.

       -fsigned-char
              Let the type char be signed, like signed char.

              Note that this is equivalent to -fno-unsigned-char,
              which is the negative form of -funsigned-char.

       -fdelayed-branch
              If  supported  for  the  target machine, attempt to
              reorder instructions to exploit  instruction  slots
              available after delayed branch instructions.




Version 1.40               May 9, 1991                         16




CC(1)                                                       CC(1)


       -ffixed-reg
              Treat  the  register named reg as a fixed register;
              generated code should never  refer  to  it  (except
              perhaps  as  a  stack  pointer, frame pointer or in
              some other fixed role).

              reg must be the name of a register.   The  register
              names accepted are machine-specific and are defined
              in the REGISTERNAMES macro in the machine descrip-
              tion macro file.

              This flag does not have a negative form, because it
              specifies a three-way choice.

       -fcall-used-reg
              Treat the register named reg as an allocatable reg-
              ister  that is clobbered by function calls.  It may
              be allocated for temporaries or variables  that  do
              not  live  across  a call.  Functions compiled this
              way will not save and restore the register REG.

              Use of this flag for a register that  has  a  fixed
              pervasive  role  in  the machine's execution model,
              such as the stack pointer or  frame  pointer,  will
              produce disastrous results.

              This flag does not have a negative form, because it
              specifies a three-way choice.

       -fcall-saved-reg
              Treat the register named reg as an allocatable reg-
              ister saved by functions.  It may be allocated even
              for temporaries or variables  that  live  across  a
              call.   Functions  compiled  this way will save and
              restore the register reg if they use it.

              Use of this flag for a register that  has  a  fixed
              pervasive  role  in  the machine's execution model,
              such as the stack pointer or  frame  pointer,  will
              produce disastrous results.

              A  different  sort of disaster will result from the
              use of this flag for a register in  which  function
              values may be returned.

              This flag does not have a negative form, because it
              specifies a three-way choice.

       -dletters
              Says to make debugging dumps at times specified  by
              letters.  Here are the possible letters:

              r
                   Dump after RTL generation.



Version 1.40               May 9, 1991                         17




CC(1)                                                       CC(1)


              j
                   Dump after first jump optimization.
              J
                   Dump after last jump optimization.
              s
                   Dump  after  CSE (including the jump optimiza-
                   tion that sometimes follows CSE).
              L
                   Dump after loop optimization.
              f
                   Dump after flow analysis.
              c
                   Dump after instruction combination.
              l
                   Dump after local register allocation.
              g
                   Dump after global register allocation.
              d
                   Dump after delayed branch scheduling.
              m
                   Print statistics on memory usage, at  the  end
                   of the run.

       -pedantic
              Issue  all  the  warnings  demanded  by strict ANSI
              standard C; reject all programs that use  forbidden
              extensions.

              Valid ANSI standard C programs should compile prop-
              erly with or without this option (though a rare few
              will require -ansi).  However, without this option,
              certain GNU extensions and traditional  C  features
              are  supported as well.  With this option, they are
              rejected.  There is no reason to use  this  option;
              it exists only to satisfy pedants.

              -pedantic  does  not cause warning messages for use
              of the alternate keywords whose names begin and end
              with .

       -static
              On  Suns  running  version 4, this prevents linking
              with  the  shared  libraries.   (-g  has  the  same
              effect.)

       These  options control the C preprocessor, which is run on
       each C source file before actual compilation.  If you  use
       the  `-E'  option, nothing is done except C preprocessing.
       Some of these options make sense only together  with  `-E'
       because they request preprocessor output that is not suit-
       able for actual compilation.

       -C     Tell the  preprocessor  not  to  discard  comments.
              Used with the -E option.



Version 1.40               May 9, 1991                         18




CC(1)                                                       CC(1)


       -Idir  Search directory dir for include files.

       -I-    Any  directories  specified  with -I options before
              the -I- option are searched only for  the  case  of
              #include "file"; they are not searched for #include
              <file>.

              If additional directories  are  specified  with  -I
              options   after  the  -I-,  these  directories  are
              searched for all #include directives.   (Ordinarily
              all -I directories are used this way.)

              In addition, the -I- option inhibits the use of the
              current directory as the first search directory for
              #include  "file".  Therefore, the current directory
              is searched only if it is requested explicitly with
              -I..   Specifying  both  -I- and -I.  allows you to
              control precisely which  directories  are  searched
              before  the  current  one  and  which  are searched
              after.

       -nostdinc
              Do not search the standard system  directories  for
              header files.  Only the directories you have speci-
              fied with -I options (and the current directory, if
              appropriate) are searched.

              Between  -nostdinc  and  -I-, you can eliminate all
              directories from the search path except  those  you
              specify.

       -M     Tell the preprocessor to output a rule suitable for
              make(1) describing the dependencies of each  source
              file.   For each source file, the preprocessor out-
              puts one make-rule whose target is the object  file
              name  for  that  source file and whose dependencies
              are all the files #included in it.  This  rule  may
              be a single line or may be continued with \-newline
              if it is long.

              -M implies -E.

       -MM    Like -M but the  output  mentions  only  the  user-
              header files included with #include "file".  System
              header files  included  with  #include  <file>  are
              omitted.

              -MM implies -E.

       -Dmacro
              Define  macro  macro  with  the empty string as its
              definition.





Version 1.40               May 9, 1991                         19




CC(1)                                                       CC(1)


       -Dmacro=defn
              Define macro macro as defn.

       -Umacro
              Undefine macro macro.

       -trigraphs
              Support ANSI C trigraphs.  You don't want  to  know
              about this brain-damage.  The -ansi option also has
              this effect.

FILES
       file.c               C source file
       file.s               assembly language file
       file.o               object file
       a.out                link edited output
       /tmp/cc*             temporary files
       /usr/libexec/cpp     preprocessor
       /usr/libexec/cc1     compiler
       /usr/lib/libgnulib.a library  needed  by   GCC   on   some
       machines
       /usr/lib/crt0.o      start-up routine
       /usr/lib/libc.a      standard C library, see intro(3)
       /usr/include         standard directory for #include files

SEE ALSO
       as(1), ld(1), gdb(1)

BUGS
       This version of GCC is obsolete.

       Function prototypes don't entirely make up for the loss of
       lint(1).  Lint did type-checking automatically, while pro-
       totypes must be assembled  and  declared  by  hand.   Lint
       could  find type problems in files which failed to include
       the proper headers.  Alas, lint will never be replaced, so
       we must learn to write prototypes.

COPYING
       Copyright (c) 1988 Free Software Foundation, Inc.

       Permission  is  granted  to  make  and distribute verbatim
       copies of this manual provided the  copyright  notice  and
       this permission notice are preserved on all copies.

       Permission is granted to copy and distribute modified ver-
       sions of this manual under  the  conditions  for  verbatim
       copying,  provided  that the entire resulting derived work
       is distributed under the  terms  of  a  permission  notice
       identical to this one.

       Permission  is granted to copy and distribute translations
       of this manual into another language, under the above con-
       ditions for modified versions, except that this permission



Version 1.40               May 9, 1991                         20




CC(1)                                                       CC(1)


       notice may be included in  translations  approved  by  the
       Free  Software  Foundation  instead  of  in  the  original
       English.

AUTHORS
       See the GNU CC Manual for the contributors to GNU CC.



















































Version 1.40               May 9, 1991                         21


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026