7.6.11 Options for Code Generation Conventions

Options of the form -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 that is not the default.)

Table 7-18. Code Generation Convention Options
OptionDefinition
-fargument-alias

-fargument-noalias

-fargument-
noalias-global

Specify the possible relationships among parameters and between parameters and global data.

-fargument-alias specifies that arguments (parameters) may alias each other and may alias global storage.

-fargument-noalias specifies that arguments do not alias each other, but may alias global storage.

-fargument-noalias-global specifies that arguments do not alias each other and do not alias global storage.

Each language will automatically use whatever option is required by the language standard. You should not need to use these options yourself.

-fcall-saved-regTreat the register named reg as an allocatable register 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.

It is an error to used this flag with the Frame Pointer or Stack Pointer. Use of this flag for other registers that have fixed pervasive roles in the machine’s execution model 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 should be used consistently through all modules.

-fcall-used-regTreat the register named reg as an allocatable register 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.

It is an error to use this flag with the Frame Pointer or Stack Pointer. Use of this flag for other registers that have fixed pervasive roles in the machine’s execution model will produce disastrous results.

This flag should be used consistently through all modules.

-ffixed-regTreat 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, e.g., -ffixed-w3.

-fno-identIgnore the #ident directive.
-fpack-structPack all structure members together without holes. Usually you would not want to use this option, since it makes the code sub-optimal, and the offsets of structure members won’t agree with system libraries.

The dsPIC® DSC device requires that words be aligned on even byte boundaries; so, care must be taken when using the packed attribute to avoid run time addressing errors.

-fpcc-struct-
returnReturn short 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 capability between the 16-bit compiler compiled files and files compiled with other compilers.

Short structures and unions are those whose size and alignment match that of an integer type.

-fno-short-doubleBy default, the compiler uses a double type equivalent to float. This option makes double equivalent to long double. Mixing this option across modules can have unexpected results if modules share double data either directly through argument passage or indirectly through shared buffer space. Libraries provided with the product function with either switch setting.
-fshort-enumsAllocate to an 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.
-fverbose-asm

-fno-verbose-asm

Put extra commentary information in the generated assembly code to make it more readable.

-fno-verbose-asm, the default, causes the extra information to be omitted and is useful when comparing two assembler files.