These machine-independent options control the interface conventions used in code generation.
Most of them 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
struct
and union
values in memory like
longer ones, rather than in registers. This convention is less
efficient, but it has the advantage of allowing intercallability between
GNU CC-compiled files and files compiled with other compilers.
The precise convention for returning structures in memory depends on the target configuration macros.
Short structures and unions are those whose size and alignment match that of some integer type.
-freg-struct-return
struct
and union
values are
returned in registers when possible. This is more efficient for small
structures than `-fpcc-struct-return
'.
If you specify neither `-fpcc-struct-return
' nor its contrary
`-freg-struct-return
', GNU CC defaults to whichever convention is
standard for the target. If there is no standard convention, GNU CC
defaults to `-fpcc-struct-return
', except on targets where GNU CC
is the principal compiler. In those cases, we can choose the standard,
and we chose the more efficient register return alternative.
-fshort-enums
enum
type only as many bytes as it needs for the
declared range of possible values. Specifically, the enum
type
will be equivalent to the smallest integer type which has enough room.
-fshort-double
double
as for float
.
-fshared-data
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.
-fno-common
extern
) in
two different compilations, you will get an error when you link them.
The only reason this might be useful is if you wish to verify that the
program will work on other systems which always work this way.
-fno-ident
#ident
' directive.
-fno-gnu-linker
collect2
program to make sure the system linker includes
constructors and destructors. (collect2
is included in the GNU CC
distribution.) For systems which must use collect2
, the
compiler driver gcc
is configured to do this automatically.
-finhibit-size-directive
.size
assembler directive, or anything else that
would cause trouble if the function is split in the middle, and the
two halves are placed at locations far apart in memory. This option is
used when compiling `crtstuff.c
'; you should not need to use it
for anything else.
-fverbose-asm
-fvolatile
-fvolatile-global
-fpic
-fpic
' does
not work; in that case, recompile with `-fPIC
' instead. (These
maximums are 16k on the m88k, 8k on the Sparc, and 32k on the m68k and
RS/6000. The 386 has no such limit.)
Position-independent code requires special support, and therefore works only on certain machines. For the 386, GNU CC supports PIC for System V but not for the Sun 386i. Code generated for the IBM RS/6000 is always position-independent.
The GNU assembler does not fully support PIC. Currently, you must use some other assembler in order for PIC to work. We would welcome volunteers to upgrade GAS to handle this; the first part of the job is to figure out what the assembler must do differently.
-fPIC
Position-independent code requires special support, and therefore works only on certain machines.
-ffixed-reg
reg must be the name of a register. The register names accepted
are machine-specific and are defined in the REGISTER_NAMES
macro in the machine description macro file.
This flag does not have a negative form, because it specifies a three-way choice.
-fcall-used-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
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.
+e0
+e1
These options are provided for compatibility with cfront
1.x
usage; the recommended alternative GNU C++ usage is in flux. See C++ Interface.
With `+e0
', virtual function definitions in classes are declared
extern
; the declaration is used only as an interface
specification, not to generate code for the virtual functions (in this
compilation).
With `+e1
', G++ actually generates the code implementing virtual
functions defined in the code, and makes them publicly visible.