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 >
Wrap
GNU Info File
|
1994-02-06
|
48KB
|
922 lines
This is Info file gcc.info, produced by Makeinfo-1.49 from the input
file gcc.texi.
This file documents the use and the internals of the GNU compiler.
Copyright (C) 1988, 1989, 1992 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 versions of
this manual under the conditions for verbatim copying, provided also
that the sections entitled "GNU General Public License" and "Protect
Your Freedom--Fight `Look And Feel'" are included exactly as in the
original, and provided that the entire resulting derived work is
distributed under the terms of a permission notice identical to this
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that the sections entitled "GNU General Public
License" and "Protect Your Freedom--Fight `Look And Feel'", and this
permission notice, may be included in translations approved by the Free
Software Foundation instead of in the original English.
File: gcc.info, Node: Dialect Options, Next: Warning Options, Prev: Overall Options, Up: Invoking GCC
Options Controlling Dialect
===========================
The following options control the dialect of C or C++ that the
compiler accepts:
`-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, and disallows `$' as part of
identifiers.
The alternate keywords `__asm__', `__extension__', `__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'. *Note Warning Options::.
The macro `__STRICT_ANSI__' is predefined when the `-ansi' option
is used. Some header files may notice this macro and refrain from
declaring certain functions or defining certain macros that the
ANSI standard doesn't call for; this is to avoid interfering with
any programs that might use these names for other things.
The functions `alloca', `abort', `exit', and `_exit' are not
builtin functions when `-ansi' is used.
`-fall-virtual'
Treat certain member functions as virtual, implicitly (C++ only).
This applies to all member functions declared in the same class
with a "method-call" operator method (except for constructor
functions and `new' or `delete' member operators). In effect, all
of these methods become "implicitly virtual."
This does not mean that all calls to these methods will be made
through the internal table of virtual functions. There are some
circumstances under which it is obvious that a call to a given
virtual function can be made directly, and in these cases the
calls still go direct.
The effect of making all methods of a class with a declared
`operator->()()' implicitly virtual using `-fall-virtual' extends
also to all non-constructor methods of any class derived from such
a class.
`-fdollars-in-identifiers'
Permit the use of `$' in identifiers (C++ only). You can also use
`-fno-dollars-in-identifiers' to explicitly prohibit use of `$'.
(GNU C++ allows `$' by default on some target systems but not
others.)
`-fenum-int-equiv'
Permit implicit conversion of `int' to enumeration types (C++
only). Normally GNU C++ allows conversion of `enum' to `int', but
not the other way around.
`-fno-asm'
Do not recognize `asm', `inline' or `typeof' as a keyword. These
words may then be used as identifiers. You can use `__asm__',
`__inline__' and `__typeof__' instead. `-ansi' implies `-fno-asm'.
`-fno-builtin'
Don't recognize built-in functions that do not begin with two
leading underscores. Currently, the functions affected include
`_exit', `abort', `abs', `alloca', `cos', `exit', `fabs', `labs',
`memcmp', `memcpy', `sin', `sqrt', `strcmp', `strcpy', and
`strlen'.
The `-ansi' option prevents `alloca' and `_exit' from being
builtin functions.
`-fno-strict-prototype'
Treat a function declaration with no arguments, such as `int foo
();', as C would treat it--as saying nothing about the number of
arguments or their types (C++ only). Normally, such a declaration
in C++ means that the function `foo' takes no arguments.
`-fthis-is-variable'
Permit assignment to `this' (C++ only). The incorporation of
user-defined free store management into C++ has made assignment to
`this' an anachronism. Therefore, by default it is invalid to
assign to `this' within a class member function. However, for
backwards compatibility, you can make it valid with
`-fthis-is-variable'.
`-trigraphs'
Support ANSI C trigraphs. You don't want to know about this
brain-damage. The `-ansi' option implies `-trigraphs'.
`-traditional'
Attempt to support some aspects of traditional C compilers.
Specifically:
* All `extern' declarations take effect globally even if they
are written inside of a function definition. This includes
implicit declarations of functions.
* The keywords `typeof', `inline', `signed', `const' and
`volatile' are not recognized. (You can still use the
alternative keywords such as `__typeof__', `__inline__', and
so on.)
* Comparisons between pointers and integers are always allowed.
* Integer types `unsigned short' and `unsigned char' promote to
`unsigned int'.
* Out-of-range floating point literals are not an error.
* String "constants" are not necessarily constant; they are
stored in writable space, and identical looking constants are
allocated separately. (This is the same as the effect of
`-fwritable-strings'.)
* All automatic variables not declared `register' are preserved
by `longjmp'. Ordinarily, GNU C follows 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 traditional token
concatenation.
* In the preprocessor, macro arguments are recognized within
string constants in a macro definition (and their values are
stringified, though without additional quote marks, when they
appear in such a context). 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.
You may wish to use `-fno-builtin' as well as `-traditional' if
your program uses names that are normally GNU C builtin functions
for other purposes of its own.
`-traditional-cpp'
Attempt to support some aspects of traditional C preprocessors.
This includes the last three items in the table immediately above,
but