home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / gcc-2.3.3-src.lha / GNU / src / amiga / gcc-2.3.3 / gcc.info-2 (.txt) < prev    next >
GNU Info File  |  1994-02-06  |  48KB  |  922 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.49 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc.
  5.    Permission is granted to make and distribute verbatim copies of this
  6. manual provided the copyright notice and this permission notice are
  7. preserved on all copies.
  8.    Permission is granted to copy and distribute modified versions of
  9. this manual under the conditions for verbatim copying, provided also
  10. that the sections entitled "GNU General Public License" and "Protect
  11. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  12. original, and provided that the entire resulting derived work is
  13. distributed under the terms of a permission notice identical to this
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions, except that the sections entitled "GNU General Public
  17. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  18. permission notice, may be included in translations approved by the Free
  19. Software Foundation instead of in the original English.
  20. File: gcc.info,  Node: Dialect Options,  Next: Warning Options,  Prev: Overall Options,  Up: Invoking GCC
  21. Options Controlling Dialect
  22. ===========================
  23.    The following options control the dialect of C or C++ that the
  24. compiler accepts:
  25. `-ansi'
  26.      Support all ANSI standard C programs.
  27.      This turns off certain features of GNU C that are incompatible
  28.      with ANSI C, such as the `asm', `inline' and `typeof' keywords, and
  29.      predefined macros such as `unix' and `vax' that identify the type
  30.      of system you are using.  It also enables the undesirable and
  31.      rarely used ANSI trigraph feature, and disallows `$' as part of
  32.      identifiers.
  33.      The alternate keywords `__asm__', `__extension__', `__inline__'
  34.      and `__typeof__' continue to work despite `-ansi'.  You would not
  35.      want to use them in an ANSI C program, of course, but it useful to
  36.      put them in header files that might be included in compilations
  37.      done with `-ansi'.  Alternate predefined macros such as `__unix__'
  38.      and `__vax__' are also available, with or without `-ansi'.
  39.      The `-ansi' option does not cause non-ANSI programs to be rejected
  40.      gratuitously.  For that, `-pedantic' is required in addition to
  41.      `-ansi'.  *Note Warning Options::.
  42.      The macro `__STRICT_ANSI__' is predefined when the `-ansi' option
  43.      is used.  Some header files may notice this macro and refrain from
  44.      declaring certain functions or defining certain macros that the
  45.      ANSI standard doesn't call for; this is to avoid interfering with
  46.      any programs that might use these names for other things.
  47.      The functions `alloca', `abort', `exit', and `_exit' are not
  48.      builtin functions when `-ansi' is used.
  49. `-fall-virtual'
  50.      Treat certain member functions as virtual, implicitly (C++ only). 
  51.      This applies to all member functions declared in the same class
  52.      with a "method-call" operator method (except for constructor
  53.      functions and `new' or `delete' member operators).  In effect, all
  54.      of these methods become "implicitly virtual."
  55.      This does not mean that all calls to these methods will be made
  56.      through the internal table of virtual functions.  There are some
  57.      circumstances under which it is obvious that a call to a given
  58.      virtual function can be made directly, and in these cases the
  59.      calls still go direct.
  60.      The effect of making all methods of a class with a declared
  61.      `operator->()()' implicitly virtual using `-fall-virtual' extends
  62.      also to all non-constructor methods of any class derived from such
  63.      a class.
  64. `-fdollars-in-identifiers'
  65.      Permit the use of `$' in identifiers (C++ only).  You can also use
  66.      `-fno-dollars-in-identifiers' to explicitly prohibit use of `$'. 
  67.      (GNU C++ allows `$' by default on some target systems but not
  68.      others.)
  69. `-fenum-int-equiv'
  70.      Permit implicit conversion of `int' to enumeration types (C++
  71.      only).  Normally GNU C++ allows conversion of `enum' to `int', but
  72.      not the other way around.
  73. `-fno-asm'
  74.      Do not recognize `asm', `inline' or `typeof' as a keyword.  These
  75.      words may then be used as identifiers.  You can use `__asm__',
  76.      `__inline__' and `__typeof__' instead. `-ansi' implies `-fno-asm'.
  77. `-fno-builtin'
  78.      Don't recognize built-in functions that do not begin with two
  79.      leading underscores. Currently, the functions affected include
  80.      `_exit', `abort', `abs', `alloca', `cos', `exit', `fabs', `labs',
  81.      `memcmp', `memcpy', `sin', `sqrt', `strcmp', `strcpy', and
  82.      `strlen'.
  83.      The `-ansi' option prevents `alloca' and `_exit' from being
  84.      builtin functions.
  85. `-fno-strict-prototype'
  86.      Treat a function declaration with no arguments, such as `int foo
  87.      ();', as C would treat it--as saying nothing about the number of
  88.      arguments or their types (C++ only).  Normally, such a declaration
  89.      in C++ means that the function `foo' takes no arguments.
  90. `-fthis-is-variable'
  91.      Permit assignment to `this' (C++ only).  The incorporation of
  92.      user-defined free store management into C++ has made assignment to
  93.      `this' an anachronism.  Therefore, by default it is invalid to
  94.      assign to `this' within a class member function.  However, for
  95.      backwards compatibility, you can make it valid with
  96.      `-fthis-is-variable'.
  97. `-trigraphs'
  98.      Support ANSI C trigraphs.  You don't want to know about this
  99.      brain-damage.  The `-ansi' option implies `-trigraphs'.
  100. `-traditional'
  101.      Attempt to support some aspects of traditional C compilers.
  102.      Specifically:
  103.         * All `extern' declarations take effect globally even if they
  104.           are written inside of a function definition.  This includes
  105.           implicit declarations of functions.
  106.         * The keywords `typeof', `inline', `signed', `const' and
  107.           `volatile' are not recognized.  (You can still use the
  108.           alternative keywords such as `__typeof__', `__inline__', and
  109.           so on.)
  110.         * Comparisons between pointers and integers are always allowed.
  111.         * Integer types `unsigned short' and `unsigned char' promote to
  112.           `unsigned int'.
  113.         * Out-of-range floating point literals are not an error.
  114.         * String "constants" are not necessarily constant; they are
  115.           stored in writable space, and identical looking constants are
  116.           allocated separately.  (This is the same as the effect of
  117.           `-fwritable-strings'.)
  118.         * All automatic variables not declared `register' are preserved
  119.           by `longjmp'.  Ordinarily, GNU C follows ANSI C: automatic
  120.           variables not declared `volatile' may be clobbered.
  121.         * In the preprocessor, comments convert to nothing at all,
  122.           rather than to a space.  This allows traditional token
  123.           concatenation.
  124.         * In the preprocessor, macro arguments are recognized within
  125.           string constants in a macro definition (and their values are
  126.           stringified, though without additional quote marks, when they
  127.           appear in such a context).  The preprocessor always considers
  128.           a string constant to end at a newline.
  129.         * The predefined macro `__STDC__' is not defined when you use
  130.           `-traditional', but `__GNUC__' is (since the GNU extensions
  131.           which `__GNUC__' indicates are not affected by
  132.           `-traditional').  If you need to write header files that work
  133.           differently depending on whether `-traditional' is in use, by
  134.           testing both of these predefined macros you can distinguish
  135.           four situations: GNU C, traditional GNU C, other ANSI C
  136.           compilers, and other old C compilers.
  137.      You may wish to use `-fno-builtin' as well as `-traditional' if
  138.      your program uses names that are normally GNU C builtin functions
  139.      for other purposes of its own.
  140. `-traditional-cpp'
  141.      Attempt to support some aspects of traditional C preprocessors.
  142.      This includes the last three items in the table immediately above,
  143.      but