GCC
GCC
tion (GCC)
Website: www.gnupress.org
General: pressgnu.org
Orders: salesgnu.org
Tel 617-542-5942
Fax 617-542-2652
Short Contents
Introdu
tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 Programming Languages Supported by GCC . . . . . . . . . . . . 3
2 Language Standards Supported by GCC . . . . . . . . . . . . . . . 5
3 GCC Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 C Implementation-dened behavior . . . . . . . . . . . . . . . . . 193
5 Extensions to the C Language Family . . . . . . . . . . . . . . . . 201
6 Extensions to the C++ Language . . . . . . . . . . . . . . . . . . . 335
7 GNU Obje
tive-C runtime features . . . . . . . . . . . . . . . . . . 345
8 Binary Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
9 g
ov|a Test Coverage Program . . . . . . . . . . . . . . . . . . . 355
10 Known Causes of Trouble with GCC . . . . . . . . . . . . . . . . 363
11 Reporting Bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
12 How To Get Help with GCC . . . . . . . . . . . . . . . . . . . . . . 383
13 Contributing to GCC Development . . . . . . . . . . . . . . . . . 385
Funding Free Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
The GNU Proje
t and GNU/Linux . . . . . . . . . . . . . . . . . . . . . 389
GNU GENERAL PUBLIC LICENSE . . . . . . . . . . . . . . . . . . . 391
GNU Free Do
umentation Li
ense . . . . . . . . . . . . . . . . . . . . . 397
Contributors to GCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Option Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Keyword Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
ii
iii
Table of Contents
Introdu
tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 Programming Languages Supported by GCC
.........................................
iv
150
152
152
154
155
155
165
167
169
173
173
175
176
176
176
177
178
178
184
187
189
Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Identiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chara
ters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Floating point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Arrays and pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Stru
tures, unions, enumerations, and bit-elds . . . . . . . . . . . . . .
Qualiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
De
larators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Prepro
essing dire
tives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Library fun
tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ar
hite
ture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lo
ale-spe
i
behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
193
193
193
194
194
195
196
197
197
198
198
198
198
199
199
199
201
202
203
204
206
207
208
209
209
210
210
211
211
212
213
213
214
214
214
215
216
216
217
217
228
231
232
232
232
232
233
237
237
238
238
242
242
242
244
249
249
250
250
252
253
254
265
vi
266
266
267
268
269
269
270
271
272
272
279
279
280
282
282
283
283
285
286
290
290
291
292
294
326
327
327
327
327
327
328
328
328
329
330
330
331
331
332
vii
345
346
347
348
349
350
g ov|a
9.1
9.2
9.3
9.4
Introdu
tion to g
ov . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Invoking g
ov . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using g
ov with GCC Optimization . . . . . . . . . . . . . . . . . . . . . . . .
Brief des
ription of g
ov data les . . . . . . . . . . . . . . . . . . . . . . . . . .
355
355
360
361
363
363
363
365
368
369
369
370
370
371
372
373
374
375
378
viii
Introdu
tion
This manual do
uments how to use the GNU
ompilers, as well as their features and in
ompatibilities, and how to report bugs. It
orresponds to GCC version 4.0.0. The internals
of the GNU
ompilers, in
luding how to port them to new targets and some information
about how to write front ends for new languages, are do
umented in a separate manual.
See se
tion \Introdu
tion" in GNU Compiler Colle
tion (GCC) Internals.
standard also denes two environments for programs, a freestanding environment, required
of all implementations and whi
h may not have library fa
ilities beyond those required of
freestanding implementations, where the handling of program startup and termination are
implementation-dened, and a hosted environment, whi
h is not required, in whi
h all the
library fa
ilities are provided and startup is through a fun
tion int main (void) or int
main (int,
har *[). An OS kernel would be a freestanding environment; a program
using the fa
ilities of an operating system would normally be in a hosted implementation.
GCC aims towards being usable as a
onforming freestanding implementation, or as the
ompiler for a
onforming hosted implementation. By default, it will a
t as the
ompiler for a
hosted implementation, dening __STDC_HOSTED__ as 1 and presuming that when the names
of ISO C fun
tions are used, they have the semanti
s dened in the standard. To make it a
t
as a
onforming freestanding implementation for a freestanding environment, use the option
`-ffreestanding'; it will then dene __STDC_HOSTED__ to 0 and not make assumptions
about the meanings of fun
tion names from the standard library, with ex
eptions noted
below. To build an OS kernel, you may well still need to make your own arrangements for
linking and startup. See Se
tion 3.4 [Options Controlling C Diale
t, page 20.
GCC does not provide the library fa
ilities required only of hosted implementations, nor
yet all the fa
ilities required by C99 of freestanding implementations; to use the fa
ilities
of a hosted environment, you will need to nd them elsewhere (for example, in the GNU C
library). See Se
tion 10.6 [Standard Libraries, page 369.
Most of the
ompiler support routines used by GCC are present in `libg
', but there
are a few ex
eptions. GCC requires the freestanding environment provide mem
py, memmove,
memset and mem
mp. Finally, if __builtin_trap is used, and the target does not implement
the trap pattern, then GCC will emit a
all to abort.
For referen
es to Te
hni
al Corrigenda, Rationale do
uments and information
on
erning
the history of C that is available online, see http://g
.gnu.org/readings.html
There is no formal written standard for Obje
tive-C or Obje
tive-C++. The most authoritative manual is \Obje
t-Oriented Programming and the Obje
tive-C Language", available
at a number of web sites:
http://developer.apple.
om/do
umentation/Co
oa/Con
eptual/Obje
tiveC/ is
a re
ent (and periodi
ally updated) version;
http://www.toodarkpark.org/
omputers/obj
/ is an older example;
http://www.gnustep.org and http://g
.gnu.org/readings.html have additional
useful information.
There is no standard for treelang, whi
h is a sample language front end for GCC. Its only
purpose is as a sample for people wishing to write a new language for GCC. The language
is do
umented in `g
/treelang/treelang.texi' whi
h
an be turned into info or HTML
format.
See se
tion \About This Guide" in GNAT Referen
e Manual, for information on standard
onforman
e and
ompatibility of the Ada
ompiler.
See se
tion \Standards" in The GNU Fortran 95 Compiler, for details of standards supported by gfortran.
See se
tion \Compatibility with the Java Platform" in GNU g
j, for details of
ompatibility between g
j and the Java Platform.
C Language Options
See Se
tion 3.4 [Options Controlling C Diale
t, page 20.
-ansi -std=standard -aux-info filename
-fno-asm -fno-builtin -fno-builtin-fun
tion
-fhosted -ffreestanding -fms-extensions
-trigraphs -no-integrated-
pp -traditional -traditional-
pp
-fallow-single-pre
ision -f
ond-mismat
h
-fsigned-bitfields -fsigned-
har
-funsigned-bitfields -funsigned-
har
Warning Options
See Se
tion 3.8 [Options to Request or Suppress Warnings, page 34.
-fsyntax-only -pedanti
-pedanti
-errors
-w -Wextra -Wall -Waggregate-return
-W
ast-align -W
ast-qual -W
har-subs
ripts -W
omment
-W
onversion -Wno-depre
ated-de
larations
-Wdisabled-optimization -Wno-div-by-zero -Wno-endif-labels
-Werror -Werror-impli
it-fun
tion-de
laration
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2
-Wno-format-extra-args -Wformat-nonliteral
-Wformat-se
urity -Wformat-y2k
-Wimpli
it -Wimpli
it-fun
tion-de
laration -Wimpli
it-int
-Wimport -Wno-import -Winit-self -Winline
-Wno-invalid-offsetof -Winvalid-p
h
-Wlarger-than-len -Wlong-long
-Wmain -Wmissing-bra
es -Wmissing-field-initializers
-Wmissing-format-attribute -Wmissing-in
lude-dirs
-Wmissing-noreturn
-Wno-multi
har -Wnonnull -Wpa
ked -Wpadded
-Wparentheses -Wpointer-arith -Wredundant-de
ls
-Wreturn-type -Wsequen
e-point -Wshadow
Debugging Options
See Se
tion 3.9 [Options for Debugging Your Program or GCC, page 49.
Optimization Options
See Se
tion 3.10 [Options that Control Optimization, page 61.
10
-fdelayed-bran
h -fdelete-null-pointer-
he
ks
-fexpensive-optimizations -ffast-math -ffloat-store
-ffor
e-addr -ffor
e-mem -ffun
tion-se
tions
-fg
se -fg
se-lm -fg
se-sm -fg
se-las -fg
se-after-reload
-floop-optimize -f
rossjumping -fif-
onversion -fif-
onversion2
-finline-fun
tions -finline-limit=n -fkeep-inline-fun
tions
-fkeep-stati
-
onsts -fmerge-
onstants -fmerge-all-
onstants
-fmodulo-s
hed -fno-bran
h-
ount-reg
-fno-default-inline -fno-defer-pop -floop-optimize2 -fmove-loop-invariants
-fno-fun
tion-
se -fno-guess-bran
h-probability
-fno-inline -fno-math-errno -fno-peephole -fno-peephole2
-funsafe-math-optimizations -ffinite-math-only
-fno-trapping-math -fno-zero-initialized-in-bss
-fomit-frame-pointer -foptimize-register-move
-foptimize-sibling-
alls -fprefet
h-loop-arrays
-fprofile-generate -fprofile-use
-fregmove -frename-registers
-freorder-blo
ks -freorder-blo
ks-and-partition -freorder-fun
tions
-frerun-
se-after-loop -frerun-loop-opt
-frounding-math -fs
hedule-insns -fs
hedule-insns2
-fno-s
hed-interblo
k -fno-s
hed-spe
-fs
hed-spe
-load
-fs
hed-spe
-load-dangerous
-fs
hed-stalled-insns=n -s
hed-stalled-insns-dep=n
-fs
hed2-use-superblo
ks
-fs
hed2-use-tra
es -fres
hedule-modulo-s
heduled-loops
-fsignaling-nans -fsingle-pre
ision-
onstant -fspe
ulative-prefet
hing
-fstrength-redu
e -fstri
t-aliasing -ftra
er -fthread-jumps
-funroll-all-loops -funroll-loops -fpeel-loops
-fsplit-ivs-in-unroller -funswit
h-loops
-fvariable-expansion-in-unroller
-ftree-pre -ftree-
p -ftree-d
e -ftree-loop-optimize
-ftree-loop-linear -ftree-loop-im -ftree-loop-iv
anon -fivopts
-ftree-dominator-opts -ftree-dse -ftree-
opyrename
-ftree-
h -ftree-sra -ftree-ter -ftree-lrs -ftree-fre -ftree-ve
torize
-fweb
--param name =value -O -O0 -O1 -O2 -O3 -Os
Assembler Option
See Se
tion 3.12 [Passing Options to the Assembler, page 97.
-Wa,option -Xassembler option
Linker Options
See Se
tion 3.13 [Options for Linking, page 97.
Target Options
See Se
tion 3.16 [Target Options, page 108.
-V version -b ma
hine
ARM Options
AVR Options
CRIS Options
Darwin Options
11
12
FRV Options
H8/300 Options
HPPA Options
-mfixed-range=register-range
-mjump-in-delay -mlinker-opt -mlong-
alls
-mlong-load-store -mno-big-swit
h -mno-disable-fpregs
-mno-disable-indexing -mno-fast-indire
t-
alls -mno-gas
-mno-jump-in-delay -mno-long-load-store
-mno-portable-runtime -mno-soft-float
-mno-spa
e-regs -msoft-float -mpa-ris
-1-0
-mpa-ris
-1-1 -mpa-ris
-2-0 -mportable-runtime
-ms
hedule=
pu-type -mspa
e-regs -msio -mwsio
-munix=unix-std -nolibdld -stati
-threads
IA-64 Options
M32R/D Options
M680x0 Options
M68h 1x Options
13
14
MCore Options
MIPS Options
MMIX Options
MN10300 Options
-mmult-bug -mno-mult-bug
-mam33 -mno-am33
-mam33-2 -mno-am33-2
-mno-
rt0 -mrelax
NS32K Options
PDP-11 Options
-m32081 -m32381
-msoft-float -mrtd -mnortd
-msb -mnosb
-mhimem -mnohimem
15
SH Options
SPARC Options
-m
pu=
pu-type
-mtune=
pu-type
-m
model=
ode-model
-m32 -m64 -mapp-regs -mno-app-regs
-mfaster-stru
ts -mno-faster-stru
ts
-mfpu -mno-fpu -mhard-float -msoft-float
-mhard-quad-float -msoft-quad-float
-mimpure-text -mno-impure-text -mlittle-endian
16
System V Options
TMS320C3x/C4x Options
V850 Options
VAX Options
Xtensa Options
17
les either into several assembler input les, or into one assembler input le; then ea
h
assembler input le produ
es an obje
t le, and linking
ombines all the obje
t les (those
newly
ompiled, and those spe
ied as input) into an exe
utable le.
For any given input le, the le name sux determines what kind of
ompilation is done:
C sour
e
ode whi
h must be prepro
essed.
file.
file.i
file.ii
file.m
Obje
tive-C sour
e
ode. Note that you must link with the `libobj
' library
to make an Obje
tive-C program work.
file.mi
file.mm
file.M
file.mii
file.h
file.
file.
p
file.
xx
file.
pp
file.CPP
file.
++
file.C
Obje
tive-C++ sour
e
ode. Note that you must link with the `libobj
' library
to make an Obje
tive-C++ program work. Note that `.M' refers to a literal
apital M.
Obje
tive-C++ sour
e
ode whi
h should not be prepro
essed.
C, C++, Obje
tive-C or Obje
tive-C++ header le to be turned into a pre
ompiled header.
C++ sour
e
ode whi
h must be prepro
essed. Note that in `.
xx', the last two
letters must both be literally `x'. Likewise, `.C' refers to a literal
apital C.
file.hh
file.H
file.f
file.for
file.FOR
file.F
file.fpp
file.FPP
file.r
file.f90
file.f95
Fortran sour
e
ode whi
h must be prepro
essed (with the traditional prepro
essor).
Fortran sour
e
ode whi
h must be prepro
essed with a RATFOR prepro
essor
(not in
luded with GCC).
18
Assembler ode.
file.S
other
You
an spe
ify the input language expli
itly with the `-x' option:
-x language
Spe
ify expli
itly the language for the following input les (rather than letting
the
ompiler
hoose a default based on the le name sux). This option applies
to all following input les until the next `-x' option. Possible values for language
are:
-header
-
pp-output
++
++-header
++-
pp-output
obje
tive-
obje
tive-
-header obje
tive-
-
pp-output
obje
tive-
++ obje
tive-
++-header obje
tive-
++-
pp-output
assembler assembler-with-
pp
ada
f77 f77-
pp-input ratfor
f95
java
treelang
-x none
Turn o any spe
i
ation of a language, so that subsequent les are handled
a
ording to their le name suxes (as they are if `-x' has not been used at
all).
-pass-exit- odes
Normally the g
program will exit with the
ode of 1 if any phase of the
ompiler returns a non-su
ess return
ode. If you spe
ify `-pass-exit-
odes',
the g
program will instead return with numeri
ally highest error produ
ed
by any phase that returned an error indi
ation.
If you only want some of the stages of
ompilation, you
an use `-x' (or lename suxes)
to tell g
where to start, and one of the options `-
', `-S', or `-E' to say where g
is to
stop. Note that some
ombinations (for example, `-x
pp-output -E') instru
t g
to do
nothing at all.
-
Compile or assemble the sour
e les, but do not link. The linking stage simply
is not done. The ultimate output is in the form of an obje
t le for ea
h sour
e
le.
By default, the obje
t le name for a sour
e le is made by repla
ing the sux
`.
', `.i', `.s', et
., with `.o'.
Unre
ognized input les, not requiring
ompilation or assembly, are ignored.
-S
Stop after the stage of
ompilation proper; do not assemble. The output is in
the form of an assembler
ode le for ea
h non-assembler input le spe
ied.
19
By default, the assembler le name for a sour
e le is made by repla
ing the
sux `.
', `.i', et
., with `.s'.
Input les that don't require
ompilation are ignored.
-E
Stop after the prepro
essing stage; do not run the
ompiler proper. The output
is in the form of prepro
essed sour
e
ode, whi
h is sent to the standard output.
Input les whi
h don't require prepro
essing are ignored.
-o file
-v
Print (on standard error output) the
ommands exe
uted to run the stages of
ompilation. Also print the version number of the
ompiler driver program and
of the prepro
essor and the
ompiler proper.
-###
Like `-v' ex
ept the
ommands are not exe
uted and all
ommand arguments
are quoted. This is useful for shell s
ripts to
apture the driver-generated
ommand lines.
-pipe
Use pipes rather than temporary les for
ommuni
ation between the various
stages of
ompilation. This fails to work on some systems where the assembler
is unable to read from a pipe; but the GNU assembler has no trouble.
- ombine If you are ompiling multiple sour e les, this option tells the driver to pass
all the sour
e les to the
ompiler at on
e (for those languages for whi
h the
ompiler
an handle this). This will allow intermodule analysis (IMA) to be
performed by the
ompiler. Currently the only language for whi
h this is supported is C. If you pass sour
e les for multiple languages to the driver, using
this option, the driver will invoke the
ompiler(s) that support IMA on
e ea
h,
passing ea
h
ompiler all the sour
e les appropriate for it. For those languages
that do not support IMA this option will be ignored, and the
ompiler will be
invoked on
e for ea
h sour
e le in that language. If you use this option in
onjun
tion with `-save-temps', the
ompiler will generate multiple pre-pro
essed
les (one for ea
h sour
e le), but only one (
ombined) `.o' or `.s' le.
--help
Print (on the standard output) a des
ription of the
ommand line options understood by g
. If the `-v' option is also spe
ied then `--help' will also be
passed on to the various pro
esses invoked by g
, so that they
an display the
ommand line options they a
ept. If the `-Wextra' option is also spe
ied then
ommand line options whi
h have no do
umentation asso
iated with them will
also be displayed.
--target-help
Print (on the standard output) a des
ription of target spe
i
ommand line
options for ea
h tool.
20
--version
In C mode, support all ISO C90 programs. In C++ mode, remove GNU extensions that
on
i
t with ISO C++.
This turns o
ertain features of GCC that are in
ompatible with ISO C90
(when
ompiling C
ode), or of standard C++ (when
ompiling C++
ode), su
h
as the asm and typeof keywords, and predened ma
ros su
h as unix and vax
that identify the type of system you are using. It also enables the undesirable
and rarely used ISO trigraph feature. For the C
ompiler, it disables re
ognition
of C++ style `//'
omments as well as the inline keyword.
The alternate keywords __asm__, __extension__, __inline__ and __typeof_
_
ontinue to work despite `-ansi'. You would not want to use them in an ISO
C program, of
ourse, but it is useful to put them in header les that might be
in
luded in
ompilations done with `-ansi'. Alternate predened ma
ros su
h
as __unix__ and __vax__ are also available, with or without `-ansi'.
The `-ansi' option does not
ause non-ISO programs to be reje
ted gratuitously. For that, `-pedanti
' is required in addition to `-ansi'. See Se
tion 3.8
[Warning Options, page 34.
The ma
ro __STRICT_ANSI__ is predened when the `-ansi' option is used.
Some header les may noti
e this ma
ro and refrain from de
laring
ertain
21
fun
tions or dening
ertain ma
ros that the ISO standard doesn't
all for; this
is to avoid interfering with any programs that might use these names for other
things.
Fun
tions whi
h would normally be built in but do not have semanti
s dened
by ISO C (su
h as allo
a and ffs) are not built-in fun
tions with `-ansi' is
used. See Se
tion 5.44 [Other built-in fun
tions provided by GCC, page 272,
for details of the fun
tions ae
ted.
-std=
Determine the language standard. This option is
urrently only supported when
ompiling C or C++. A value for this option must be provided; possible values
are
`
89'
`iso9899:1990'
ISO C90 (same as `-ansi').
`iso9899:199409'
ISO C90 as modied in amendment 1.
`
99'
`
9x'
`iso9899:1999'
`iso9899:199x'
ISO C99. Note that this standard is not yet fully supported;
see http://g
.gnu.org/g
-4.0/
99status.html for more information. The names `
9x' and `iso9899:199x' are depre
ated.
`gnu89'
`gnu99'
`gnu9x'
`
++98'
Default, ISO C90 plus GNU extensions (in
luding some C99 features).
ISO C99 plus GNU extensions. When ISO C99 is fully implemented
in GCC, this will be
ome the default. The name `gnu9x' is depre
ated.
The 1998 ISO C++ standard plus amendments.
`gnu++98' The same as `-std=
++98' plus GNU extensions. This is the default
for C++
ode.
Even when this option is not spe
ied, you
an still use some of the features of
newer standards in so far as they do not
on
i
t with previous C standards. For
example, you may use __restri
t__ even when `-std=
99' is not spe
ied.
The `-std' options spe
ifying some version of ISO C have the same ee
ts as
`-ansi', ex
ept that features that were not in ISO C90 but are in the spe
ied
version (for example, `//'
omments and the inline keyword in ISO C99) are
not disabled.
See Chapter 2 [Language Standards Supported by GCC, page 5, for details of
these standard versions.
22
-aux-info filename
Output to the given lename prototyped de
larations for all fun
tions de
lared
and/or dened in a translation unit, in
luding those in header les. This option
is silently ignored in any language other than C.
Besides de
larations, the le indi
ates, in
omments, the origin of ea
h de
laration (sour
e le and line), whether the de
laration was impli
it, prototyped or
unprototyped (`I', `N' for new or `O' for old, respe
tively, in the rst
hara
ter
after the line number and the
olon), and whether it
ame from a de
laration
or a denition (`C' or `F', respe
tively, in the following
hara
ter). In the
ase
of fun
tion denitions, a K&R-style list of arguments followed by their de
larations is also provided, inside
omments, after the de
laration.
-fno-asm Do not re
ognize asm, inline or typeof as a keyword, so that
ode
an use
these words as identiers. You
an use the keywords __asm__, __inline__ and
__typeof__ instead. `-ansi' implies `-fno-asm'.
In C++, this swit
h only ae
ts the typeof keyword, sin
e asm and inline
are standard keywords. You may want to use the `-fno-gnu-keywords'
ag
instead, whi
h has the same ee
t. In C99 mode (`-std=
99' or `-std=gnu99'),
this swit
h only ae
ts the asm and typeof keywords, sin
e inline is a standard
-fno-builtin
-fno-builtin-fun
tion
Don't re
ognize built-in fun
tions that do not begin with `__builtin_' as prex.
See Se
tion 5.44 [Other built-in fun
tions provided by GCC, page 272, for
details of the fun
tions ae
ted, in
luding those whi
h are not built-in fun
tions
when `-ansi' or `-std' options for stri
t ISO C
onforman
e are used be
ause
they do not have an ISO standard meaning.
GCC normally generates spe
ial
ode to handle
ertain built-in fun
tions more
e
iently; for instan
e,
alls to allo
a may be
ome single instru
tions that
adjust the sta
k dire
tly, and
alls to mem
py may be
ome inline
opy loops.
The resulting
ode is often both smaller and faster, but sin
e the fun
tion
alls no longer appear as su
h, you
annot set a breakpoint on those
alls,
nor
an you
hange the behavior of the fun
tions by linking with a dierent
library. In addition, when a fun
tion is re
ognized as a built-in fun
tion, GCC
may use information about that fun
tion to warn about problems with
alls to
that fun
tion, or to generate more e
ient
ode, even if the resulting
ode still
ontains
alls to that fun
tion. For example, warnings are given with `-Wformat'
for bad
alls to printf, when printf is built in, and strlen is known not to
modify global memory.
With the `-fno-builtin-fun
tion ' option only the built-in fun
tion fun
tion
is disabled. fun
tion must not begin with `__builtin_'. If a fun
tion is named
this is not built-in in this version of GCC, this option is ignored. There is
no
orresponding `-fbuiltin-fun
tion ' option; if you wish to enable built-in
fun
tions sele
tively when using `-fno-builtin' or `-ffreestanding', you may
dene ma
ros su
h as:
#define abs(n)
__builtin_abs ((n))
-fhosted
23
-ffreestanding
-fms-extensions
-trigraphs
Support ISO C trigraphs. The `-ansi' option (and `-std' options for stri
t ISO
C
onforman
e) implies `-trigraphs'.
-no-integrated- pp
Performs a
ompilation in two passes: prepro
essing and
ompiling. This option
allows a user supplied "
1", "
1plus", or "
1obj" via the `-B' option. The
user supplied
ompilation step
an then add in an additional prepro
essing
step after normal prepro
essing but before
ompiling. The default is to use the
integrated
pp (internal
pp)
The semanti
s of this option will
hange if "
1", "
1plus", and "
1obj" are
merged.
-traditional
-traditional-
pp
-f ond-mismat h
Allow
onditional expressions with mismat
hed types in the se
ond and third
arguments. The value of su
h an expression is void. This option is not supported
for C++.
-funsigned- har
24
Ideally, a portable program should always use signed
har or unsigned
har
when it depends on the signedness of an obje
t. But many programs have been
written to use plain
har and expe
t it to be signed, or expe
t it to be unsigned,
depending on the ma
hines they were written for. This option, and its inverse,
let you make su
h a program work with the opposite default.
The type
har is always a distin
t type from ea
h of signed
har or unsigned
har, even though its behavior is always just like one of those two.
-fsigned-
har
-fsigned-bitfields
-funsigned-bitfields
-fno-signed-bitfields
-fno-unsigned-bitfields
These options
ontrol whether a bit-eld is signed or unsigned, when the de
laration does not use either signed or unsigned. By default, su
h a bit-eld is
signed, be
ause this is
onsistent: the basi
integer types su
h as int are signed
types.
In this example, only `-frepo' is an option meant only for C++ programs; you
an use the
other options with any language supported by GCC.
Here is a list of options that are only for
ompiling C++ programs:
-fabi-version=n
Use version n of the C++ ABI. Version 2 is the version of the C++ ABI that
rst appeared in G++ 3.4. Version 1 is the version of the C++ ABI that rst
appeared in G++ 3.2. Version 0 will always be the version that
onforms most
losely to the C++ ABI spe
i
ation. Therefore, the ABI obtained using version
0 will
hange as ABI bugs are xed.
The default is version 2.
Turn o all a
ess
he
king. This swit
h is mainly useful for working around
bugs in the a
ess
ontrol
ode.
-f he k-new
Che
k that the pointer returned by operator new is non-null before attempting
to modify the storage allo
ated. This
he
k is normally unne
essary be
ause
the C++ standard spe
ies that operator new will only return 0 if it is de
lared
25
`throw()', in whi
h
ase the
ompiler will always
he
k the return value even
without this option. In all other
ases, when operator new has a non-empty
ex
eption spe
i
ation, memory exhaustion is signalled by throwing std::bad_
allo
. See also `new (nothrow)'.
-f
onserve-spa
e
Put uninitialized or runtime-initialized global variables into the
ommon segment, as C does. This saves spa
e in the exe
utable at the
ost of not diagnosing
dupli
ate denitions. If you
ompile with this
ag and your program mysteriously
rashes after main() has
ompleted, you may have an obje
t that is being
destroyed twi
e be
ause two denitions were merged.
This option is no longer useful on most targets, now that support has been
added for putting variables into BSS without making them
ommon.
-fno- onst-strings
Give string
onstants type
har * instead of type
onst
har *. By default,
G++ uses type
onst
har * as required by the standard. Even if you use
`-fno-
onst-strings', you
annot a
tually modify the value of a string
onstant.
This option might be removed in a future release of G++. For maximum portability, you should stru
ture your
ode so that it works with string
onstants
that have type
onst
har *.
is only used to initialize another obje
t of the same type. Spe
ifying this option
disables that optimization, and for
es G++ to
all the
opy
onstru
tor in all
ases.
-fno-enfor e-eh-spe s
-ffor-s
ope
-fno-for-s
ope
If `-ffor-s
ope' is spe
ied, the s
ope of variables de
lared in a for-initstatement is limited to the `for' loop itself, as spe
ied by the C++ standard.
If `-fno-for-s
ope' is spe
ied, the s
ope of variables de
lared in a for-init-
statement extends to the end of the en
losing s
ope, as was the
ase in old
versions of G++, and other (traditional) implementations of C++.
The default if neither
ag is given to follow the standard, but to allow and give
a warning for old-style
ode that would otherwise be invalid, or have dierent
behavior.
-fno-gnu-keywords
26
-fno-impli it-templates
Never emit
ode for non-inline templates whi
h are instantiated impli
itly (i.e.
by use); only emit
ode for expli
it instantiations. See Se
tion 6.5 [Template
Instantiation, page 339, for more information.
-fno-impli it-inline-templates
Don't emit
ode for impli
it instantiations of inline templates, either. The
default is to handle inlines dierently so that
ompiles with and without optimization will need the same set of expli
it instantiations.
-fno-implement-inlines
To save spa
e, do not emit out-of-line
opies of inline fun
tions
ontrolled by
`#pragma implementation'. This will
ause linker errors if these fun
tions are
not inlined everywhere they are
alled.
-fms-extensions
-fno-nonansi-builtins
Disable built-in de
larations of fun
tions that are not mandated by ANSI/ISO
C. These in
lude ffs, allo
a, _exit, index, bzero,
onjf, and other related
fun
tions.
-fno-operator-names
Do not treat the operator name keywords and, bitand, bitor,
ompl, not, or
and xor as synonyms as keywords.
-fno-optional-diags
Disable diagnosti
s that the standard says a
ompiler does not need to issue.
Currently, the only su
h diagnosti
issued by G++ is the one for a name having
multiple meanings within a
lass.
-fpermissive
Downgrade some diagnosti s about non onformant ode from errors to warnings. Thus, using `-fpermissive' will allow some non onforming ode to ompile.
-frepo
-fno-rtti
-fstats
Enable automati
template instantiation at link time. This option also implies `-fno-impli
it-templates'. See Se
tion 6.5 [Template Instantiation,
page 339, for more information.
Disable generation of information about every
lass with virtual fun
tions
for use by the C++ runtime type identi
ation features (`dynami
_
ast'
and `typeid'). If you don't use those parts of the language, you
an save
some spa
e by using this
ag. Note that ex
eption handling uses the same
information, but it will generate it as needed.
Emit statisti
s about front-end pro
essing at the end of the
ompilation. This
information is generally only useful to the G++ development team.
27
-ftemplate-depth-n
-fno-threadsafe-stati s
Do not emit the extra
ode to use the routines spe
ied in the C++ ABI for
thread-safe initialization of lo
al stati
s. You
an use this option to redu
e
ode
size slightly in
ode that doesn't need to be thread-safe.
-fuse- xa-atexit
Register destru
tors for obje
ts with stati
storage duration with the __
xa_
atexit fun
tion rather than the atexit fun
tion. This option is required for
fully standards-
ompliant handling of stati
destru
tors, but will only work if
your C library supports __
xa_atexit.
-fvisibility-inlines-hidden
not require a PLT indire
tion when used within the DSO. Enabling this option
an have a dramati
ee
t on load and link times of a DSO as it massively
redu
es the size of the dynami
export table when the library makes heavy use
of templates. While it
an
ause bloating through dupli
ation of
ode within
ea
h DSO where it is used, often the wastage is less than the
onsiderable spa
e
o
upied by a long symbol name in the export table whi
h is typi
al when
using templates and namespa
es. For even more savings,
ombine with the
`-fvisibility=hidden' swit
h.
-fno-weak
-nostdin ++
Do not sear
h for header les in the standard dire
tories spe
i
to C++, but do
still sear
h the other standard dire
tories. (This option is used when building
the C++ library.)
In addition, these optimization, warning, and
ode generation options have meanings only
for C++ programs:
-fno-default-inline
Do not assume `inline' for fun
tions dened inside a
lass s
ope. See Se
tion 3.10 [Options That Control Optimization, page 61. Note that these fun
tions will have linkage like inline fun
tions; they just won't be inlined by default.
-Wabi (C++ only)
Warn when G++ generates
ode that is probably not
ompatible with the
vendor-neutral C++ ABI. Although an eort has been made to warn about
28
all su
h
ases, there are probably some
ases that are not warned about, even
though G++ is generating in
ompatible
ode. There may also be
ases where
warnings are emitted even though the
ode that is generated will be
ompatible.
You should rewrite your
ode to avoid these warnings if you are
on
erned about
the fa
t that
ode generated by G++ may not be binary
ompatible with
ode
generated by other
ompilers.
The known in
ompatibilities at this point in
lude:
In
orre
t handling of tail-padding for bit-elds. G++ may attempt to pa
k
data into the same byte as a base
lass. For example:
stru
t A { virtual void f(); int f1 : 1; };
stru
t B : publi
A { int f2 : 1; };
In this
ase, G++ will pla
e B::f2 into the same byte asA::f1; other
ompilers will not. You
an avoid this problem by expli
itly padding A so that
its size is a multiple of the byte size on your platform; that will
ause G++
and other
ompilers to layout B identi
ally.
In
orre
t handling of tail-padding for virtual bases. G++ does not use tail
padding when laying out virtual bases. For example:
stru
t A { virtual void f();
har
1; };
stru
t B { B();
har
2; };
stru
t C : publi
A, publi
virtual B {};
In this
ase, G++ will not pla
e B into the tail-padding for A; other
ompilers
will. You
an avoid this problem by expli
itly padding A so that its size is
a multiple of its alignment (ignoring virtual base
lasses); that will
ause
G++ and other
ompilers to layout C identi
ally.
In
orre
t handling of bit-elds with de
lared widths greater than that of
their underlying types, when the bit-elds appear in a union. For example:
union U { int i : 4096; };
Assuming that an int does not have 4096 bits, G++ will make the union
too small by the number of bits in an int.
Empty
lasses
an be pla
ed at in
orre
t osets. For example:
stru
t A {};
stru
t B {
A a;
virtual void f ();
};
stru
t C : publi
B, publi
A {};
G++ will pla
e the A base
lass of C at a nonzero oset; it should be pla
ed
at oset zero. G++ mistakenly believes that the A data member of B is
already at oset zero.
Names of template fun
tions whose types involve typename or template
template parameters
an be mangled in
orre
tly.
template <typename Q>
void f(typename Q::X) {}
template <template <typename>
lass Q>
29
The
ompiler will rearrange the member initializers for `i' and `j' to mat
h
the de
laration order of the members, emitting a warning to that ee
t. This
warning is enabled by `-Wall'.
The following `-W...' options are not ae
ted by `-Wall'.
-Weff
++ (C++ only)
Warn about violations of the following style guidelines from S
ott Meyers' Effe
tive C++ book:
Item 11: Dene a
opy
onstru
tor and an assignment operator for
lasses
with dynami
ally allo
ated memory.
Item 12: Prefer initialization to assignment in
onstru
tors.
Item 14: Make destru
tors virtual in base
lasses.
Item 15: Have operator= return a referen
e to *this.
Item 23: Don't try to return a referen
e when you must return an obje
t.
Also warn about violations of the following style guidelines from S
ott Meyers'
More Ee
tive C++ book:
Item 6: Distinguish between prex and postx forms of in
rement and
de
rement operators.
Item 7: Never overload &&, ||, or ,.
When sele
ting this option, be aware that the standard library headers do not
obey all of these guidelines; use `grep -v' to lter out those warnings.
-Wno-depre
ated (C++ only)
Do not warn about usage of depre
ated features. See Se
tion 6.10 [Depre
ated
Features, page 343.
-Wno-non-template-friend (C++ only)
Disable warnings when non-templatized friend fun
tions are de
lared within a
template. Sin
e the advent of expli
it template spe
i
ation support in G++,
30
if the name of the friend is an unqualied-id (i.e., `friend foo(int)'), the
C++ language spe
i
ation demands that the friend de
lare or dene an ordinary, nontemplate fun
tion. (Se
tion 14.5.3). Before G++ implemented expli
it
spe
i
ation, unqualied-ids
ould be interpreted as a parti
ular spe
ialization
of a templatized fun
tion. Be
ause this non-
onforming behavior is no longer
the default behavior for G++, `-Wnon-template-friend' allows the
ompiler to
he
k existing
ode for potential trouble spots and is on by default. This new
ompiler behavior
an be turned o with `-Wno-non-template-friend' whi
h
keeps the
onformant
ompiler
ode but disables the helpful warning.
-Wold-style-
ast (C++ only)
Warn if an old-style (C-style)
ast to a non-void type is used within a C++
program. The new-style
asts (`stati
_
ast', `reinterpret_
ast', and
`
onst_
ast') are less vulnerable to unintended ee
ts and mu
h easier to
sear
h for.
-Woverloaded-virtual (C++ only)
Warn when a fun
tion de
laration hides virtual fun
tions from a base
lass. For
example, in:
stru
t A {
virtual void f();
};
stru
t B: publi
A {
void f(int);
};
In this example, G++ will synthesize a default `A& operator = (
onst A&);',
while
front will use the user-dened `operator ='.
31
In this example, `-fgnu-runtime' is an option meant only for Obje
tive-C and Obje
tiveC++ programs; you
an use the other options with any language supported by GCC.
Note that sin
e Obje
tive-C is an extension of the C language, Obje
tive-C
ompilations may also use options spe
i
to the C front-end (e.g., `-Wtraditional'). Similarly,
Obje
tive-C++
ompilations may use C++-spe
i
options (e.g., `-Wabi').
Here is a list of options that are only for
ompiling Obje
tive-C and Obje
tive-C++
programs:
-f
onstant-string-
lass=
lass-name
Use
lass-name as the name of the
lass to instantiate for ea
h literal string
spe
ied with the syntax "...". The default
lass name is NXConstantString
if the GNU runtime is being used, and NSConstantString if the NeXT runtime
is being used (see below). The `-f
onstant-
fstrings' option, if also present,
will override the `-f
onstant-string-
lass' setting and
ause "..." literals
to be laid out as
onstant CoreFoundation strings.
-fgnu-runtime
Generate obje
t
ode
ompatible with the standard GNU Obje
tive-C runtime.
This is the default for most types of systems.
-fnext-runtime
Generate output
ompatible with the NeXT runtime. This is the default for
NeXT-based systems, in
luding Darwin and Ma
OS X. The ma
ro __NEXT_
RUNTIME__ is predened if (and only if) this option is used.
-fno-nil-re eivers
Assume that all Obje
tive-C message dispat
hes (e.g., [re
eiver
message:arg) in this translation unit ensure that the re
eiver is not nil.
This allows for more e
ient entry points in the runtime to be used. Currently,
this option is only available in
onjun
tion with the NeXT runtime on Ma
OS X 10.3 and later.
Enable synta
ti
support for stru
tured ex
eption handling in Obje
tive-C, similar to what is oered by C++ and Java. Currently, this option is only available
in
onjun
tion with the NeXT runtime on Ma
OS X 10.3 and later.
try {
...
throw expr;
...
}
at
h (AnObjCClass *ex
) {
32
...
throw expr;
...
throw;
...
}
at
h (AnotherClass *ex
) {
...
}
at
h (id allOthers) {
...
}
finally {
...
throw expr;
...
}
The throw statement may appear anywhere in an Obje
tive-C or Obje
tiveC++ program; when used inside of a
at
h blo
k, the throw may appear
without an argument (as shown above), in whi
h
ase the obje
t
aught by the
at
h will be rethrown.
Note that only (pointers to) Obje
tive-C obje
ts may be thrown and
aught
using this s
heme. When an obje
t is thrown, it will be
aught by the nearest
at
h
lause
apable of handling obje
ts of that type, analogously to how
at
h blo
ks work in C++ and Java. A
at
h(id ...)
lause (as shown
above) may also be provided to
at
h any and all Obje
tive-C ex
eptions not
aught by previous
at
h
lauses (if any).
The finally
lause, if present, will be exe
uted upon exit from the immediately pre
eding try ...
at
h se
tion. This will happen regardless of
whether any ex
eptions are thrown,
aught or rethrown inside the try ...
at
h se
tion, analogously to the behavior of the finally
lause in Java.
There are several
aveats to using the new ex
eption me
hanism:
Although
urrently designed to be binary
ompatible with NS_HANDLERstyle idioms provided by the NSEx
eption
lass, the new ex
eptions
an
only be used on Ma
OS X 10.3 (Panther) and later systems, due to additional fun
tionality needed in the (NeXT) Obje
tive-C runtime.
As mentioned above, the new ex
eptions do not support handling types
other than Obje
tive-C obje
ts. Furthermore, when used from Obje
tiveC++, the Obje
tive-C ex
eption model does not interoperate with C++
ex
eptions at this time. This means you
annot throw an ex
eption from
Obje
tive-C and
at
h it in C++, or vi
e versa (i.e., throw ...
at
h).
The `-fobj
-ex
eptions' swit
h also enables the use of syn
hronization blo
ks
for thread-safe exe
ution:
syn
hronized (ObjCClass *guard) {
...
}
Upon entering the syn
hronized blo
k, a thread of exe
ution shall rst
he
k
whether a lo
k has been pla
ed on the
orresponding guard obje
t by another
thread. If it has, the
urrent thread shall wait until the other thread relinquishes
33
its lo
k. On
e guard be
omes available, the
urrent thread will pla
e its own
lo
k on it, exe
ute the
ode
ontained in the syn
hronized blo
k, and nally
relinquish the lo
k (thereby making guard available to other threads).
Unlike Java, Obje
tive-C does not allow for entire methods to be marked
syn
hronized. Note that throwing ex
eptions out of syn
hronized blo
ks
is allowed, and will
ause the guarding obje
t to be unlo
ked properly.
-frepla
e-obj
-
lasses
Emit a spe
ial marker instru
ting ld(1) not to stati
ally link in the resulting
obje
t le, and allow dyld(1) to load it in at run time instead. This is used
in
onjun
tion with the Fix-and-Continue debugging mode, where the obje
t
le in question may be re
ompiled and dynami
ally reloaded in the
ourse of
program exe
ution, without the need to restart the program itself. Currently,
Fix-and-Continue fun
tionality is only available in
onjun
tion with the NeXT
runtime on Ma
OS X 10.3 and later.
-fzero-link
When
ompiling for the NeXT runtime, the
ompiler ordinarily repla
es
alls to
obj
_getClass("...") (when the name of the
lass is known at
ompile time)
with stati
lass referen
es that get initialized at load time, whi
h improves runtime performan
e. Spe
ifying the `-fzero-link'
ag suppresses this behavior
and
auses
alls to obj
_getClass("...") to be retained. This is useful in
Zero-Link debugging mode, sin
e it allows for individual
lass implementations
to be modied during program exe
ution.
-gen-de ls
Dump interfa
e de
larations for all
lasses seen in the sour
e le to a le named
`sour
ename.de
l'.
-Wno-proto ol
-Wsele tor
Warn if multiple methods of dierent types for the same sele
tor are found
during
ompilation. The
he
k is performed on the list of methods in the
nal stage of
ompilation. Additionally, a
he
k is performed for ea
h sele
tor
appearing in a sele
tor(...) expression, and a
orresponding method for
that sele
tor has been found during
ompilation. Be
ause these
he
ks s
an the
method table only at the end of
ompilation, these warnings are not produ
ed
if the nal stage of
ompilation is not rea
hed, for example be
ause an error
is found during
ompilation, or be
ause the `-fsyntax-only' option is being
used.
found. A sele tor is onsidered unde lared if no method with that name has
34
been de
lared before the sele
tor(...) expression, either expli
itly in an
interfa
e or proto
ol de
laration, or impli
itly in an implementation
se
tion. This option always performs its
he
ks as soon as a sele
tor(...)
expression is found, while `-Wsele
tor' only performs its
he
ks in the nal
stage of
ompilation. This also enfor
es the
oding style
onvention that methods and sele
tors must be de
lared before being used.
-print-obj
-runtime-info
Generate C header des
ribing the largest stru
ture that is passed by value, if
any.
Try to format error messages so that they t on lines of about n
hara
ters. The
default is 72
hara
ters for g++ and 0 for the rest of the front ends supported
by GCC. If n is zero, then no line-wrapping will be done; ea
h error message
will appear on a single line.
Only meaningful in line-wrapping mode. Instru
ts the diagnosti
messages reporter to emit on
e sour
e lo
ation information; that is, in
ase the message
is too long to t on a single physi
al line and has to be wrapped, the sour
e
lo
ation won't be emitted (as prex) again, over and over, in subsequent
ontinuation lines. This is the default behavior.
35
The following options
ontrol the amount and kinds of warnings produ
ed by GCC; for
further, language-spe
i
options also refer to Se
tion 3.5 [C++ Diale
t Options, page 24
and Se
tion 3.6 [Obje
tive-C and Obje
tive-C++ Diale
t Options, page 31.
-fsyntax-only
Che k the ode for syntax errors, but don't do anything beyond that.
-pedanti
Issue all the warnings demanded by stri
t ISO C and ISO C++; reje
t all programs that use forbidden extensions, and some other programs that do not
follow ISO C and ISO C++. For ISO C, follows the version of the ISO C standard spe
ied by any `-std' option used.
Valid ISO C and ISO C++ programs should
ompile properly with or without
this option (though a rare few will require `-ansi' or a `-std' option spe
ifying
the required version of ISO C). However, without this option,
ertain GNU
extensions and traditional C and C++ features are supported as well. With this
option, they are reje
ted.
`-pedanti
' does not
ause warning messages for use of the alternate keywords
whose names begin and end with `__'. Pedanti
warnings are also disabled in
the expression that follows __extension__. However, only system header les
should use these es
ape routes; appli
ation programs should avoid them. See
Se
tion 5.38 [Alternate Keywords, page 268.
Some users try to use `-pedanti
' to
he
k programs for stri
t ISO C
onforman
e. They soon nd that it does not do quite what they want: it nds
some non-ISO pra
ti
es, but not all|only those for whi
h ISO C requires a
diagnosti
, and some others for whi
h diagnosti
s have been added.
A feature to report any failure to
onform to ISO C might be useful in some
instan
es, but would require
onsiderable additional work and would be quite
dierent from `-pedanti
'. We don't have plans to support su
h a feature in
the near future.
Where the standard spe
ied with `-std' represents a GNU extended diale
t
of C, su
h as `gnu89' or `gnu99', there is a
orresponding base standard, the
version of ISO C on whi
h the GNU extended diale
t is based. Warnings from
`-pedanti
' are given where they are required by the base standard. (It would
not make sense for su
h warnings to be given only for features not in the spe
ied GNU C diale
t, sin
e by denition the GNU diale
ts of C in
lude all features the
ompiler supports with the given option, and there would be nothing
to warn about.)
-pedanti
-errors
Like `-pedanti
', ex
ept that errors are produ
ed rather than warnings.
-w
-Wno-import
36
-W har-subs ripts
Warn if an array subs
ript has type
har. This is a
ommon
ause of error,
as programmers often forget that this type is signed on some ma
hines. This
warning is enabled by `-Wall'.
-W omment
-Wfatal-errors
This option
auses the
ompiler to abort
ompilation on the rst error o
urred
rather than trying to keep going and printing further error messages.
-Wformat Che
k
alls to printf and s
anf, et
., to make sure that the arguments supplied
have types appropriate to the format string spe
ied, and that the
onversions
spe
ied in the format string make sense. This in
ludes standard fun
tions, and
others spe
ied by format attributes (see Se
tion 5.24 [Fun
tion Attributes,
page 217), in the printf, s
anf, strftime and strfmon (an X/Open extension, not in the C standard) families (or other target-spe
i
families). Whi
h
fun
tions are
he
ked without format attributes having been spe
ied depends
on the standard version sele
ted, and su
h
he
ks of fun
tions without the attribute spe
ied are disabled by `-ffreestanding' or `-fno-builtin'.
The formats are
he
ked against the format features supported by GNU lib
version 2.2. These in
lude all ISO C90 and C99 features, as well as features
from the Single Unix Spe
i
ation and some BSD and GNU extensions. Other
library implementations may not support all these features; GCC does not support warning about features that go beyond a parti
ular library's limitations.
However, if `-pedanti
' is used with `-Wformat', warnings will be given about
format features not in the sele
ted standard version (but not for strfmon formats, sin
e those are not in any version of the C standard). See Se
tion 3.4
[Options Controlling C Diale
t, page 20.
Sin
e `-Wformat' also
he
ks for null format arguments for several fun
tions,
`-Wformat' also implies `-Wnonnull'.
`-Wformat' is in
luded in `-Wall'. For more
ontrol over some aspe
ts of
format
he
king, the options `-Wformat-y2k', `-Wno-format-extra-args',
`-Wno-format-zero-length', `-Wformat-nonliteral', `-Wformat-se
urity',
and `-Wformat=2' are available, but are not in
luded in `-Wall'.
-Wformat-y2k
If `-Wformat' is spe
ied, also warn about strftime formats whi
h may yield
only a two-digit year.
-Wno-format-extra-args
If `-Wformat' is spe
ied, do not warn about ex
ess arguments to a printf
or s
anf format fun
tion. The C standard spe
ies that su
h arguments are
ignored.
Where the unused arguments lie between used arguments that are spe
ied
with `$' operand number spe
i
ations, normally warnings are still given, sin
e
37
the implementation
ould not know what type to pass to va_arg to skip the
unused arguments. However, in the
ase of s
anf formats, this option will
suppress the warning if the unused arguments are all pointers, sin
e the Single
Unix Spe
i
ation says that su
h unused arguments are allowed.
-Wno-format-zero-length
If `-Wformat' is spe
ied, do not warn about zero-length formats. The C stan-
-Wformat-nonliteral
If `-Wformat' is spe
ied, also warn if the format string is not a string literal and
so
annot be
he
ked, unless the format fun
tion takes its format arguments as
a va_list.
-Wformat-se
urity
If `-Wformat' is spe
ied, also warn about uses of format fun
tions that represent possible se
urity problems. At present, this warns about
alls to printf
and s
anf fun
tions where the format string is not a string literal and there
are no format arguments, as in printf (foo);. This may be a se
urity hole
if the format string
ame from untrusted input and
ontains `%n'. (This is
urrently a subset of what `-Wformat-nonliteral' warns about, but in future warnings may be added to `-Wformat-se
urity' that are not in
luded in
`-Wformat-nonliteral'.)
-Wformat=2
-Wnonnull
Warn about passing a null pointer for arguments marked as requiring a non-null
value by the nonnull fun
tion attribute.
`-Wnonnull' is in
luded in `-Wall' and `-Wformat'. It
an be disabled with the
`-Wno-nonnull' option.
Warn about uninitialized variables whi
h are initialized with themselves. Note
this option
an only be used with the `-Wuninitialized' option, whi
h in turn
only works with `-O1' and above.
For example, GCC will warn about i being uninitialized in the following snippet
only when `-Winit-self' has been spe
ied:
int f()
{
int i = i;
return i;
}
-Wimpli it-int
Warn when a de
laration does not spe
ify a type. This warning is enabled by
`-Wall'.
38
Give a warning (or error) whenever a fun
tion is used before being de
lared.
The form `-Wno-error-impli
it-fun
tion-de
laration' is not supported.
This warning is enabled by `-Wall' (as a warning, not an error).
-Wimpli it
-Wmain
Warn if the type of `main' is suspi
ious. `main' should be a fun
tion with
external linkage, returning int, taking either zero arguments, two, or three
arguments of appropriate types. This warning is enabled by `-Wall'.
-Wmissing-bra es
Warn if an aggregate or union initializer is not fully bra
keted. In the following
example, the initializer for `a' is not fully bra
keted, but that for `b' is fully
bra
keted.
int a[2[2 = { 0, 1, 2, 3 };
int b[2[2 = { { 0, 1 }, { 2, 3 } };
-Wparentheses
if (a)
if (b)
foo ();
else
bar ();
39
if (a)
{
if (b)
foo ();
else
bar ();
}
Warn about
ode that may have undened semanti
s be
ause of violations of
sequen
e point rules in the C standard.
The C standard denes the order in whi
h expressions in a C program are evaluated in terms of sequen
e points, whi
h represent a partial ordering between
the exe
ution of parts of the program: those exe
uted before the sequen
e point,
and those exe
uted after it. These o
ur after the evaluation of a full expression
(one whi
h is not part of a larger expression), after the evaluation of the rst
operand of a &&, ||, ? : or , (
omma) operator, before a fun
tion is
alled (but
after the evaluation of its arguments and the expression denoting the
alled
fun
tion), and in
ertain other pla
es. Other than as expressed by the sequen
e
point rules, the order of evaluation of subexpressions of an expression is not
spe
ied. All these rules des
ribe only a partial order rather than a total order,
sin
e, for example, if two fun
tions are
alled within one expression with no
sequen
e point between them, the order in whi
h the fun
tions are
alled is not
spe
ied. However, the standards
ommittee have ruled that fun
tion
alls do
not overlap.
It is not spe
ied when between sequen
e points modi
ations to the values of
obje
ts take ee
t. Programs whose behavior depends on this have undened
behavior; the C standard spe
ies that \Between the previous and next sequen
e point an obje
t shall have its stored value modied at most on
e by the
evaluation of an expression. Furthermore, the prior value shall be read only to
determine the value to be stored.". If a program breaks these rules, the results
on any parti
ular implementation are entirely unpredi
table.
Examples of
ode with undened behavior are a = a++;, a[n = b[n++ and
a[i++ = i;. Some more
ompli
ated
ases are not diagnosed by this option,
and it may give an o
asional false positive result, but in general it has been
found fairly ee
tive at dete
ting this sort of problem in programs.
The present implementation of this option only works for C programs. A future
implementation may also work for C++ programs.
The C standard is worded
onfusingly, therefore there is some debate over the
pre
ise meaning of the sequen
e point rules in subtle
ases. Links to dis
ussions
of the problem, in
luding proposed formal denitions, may be found on the GCC
readings page, at http://g
.gnu.org/readings.html.
This warning is enabled by `-Wall'.
40
-Wreturn-type
Warn whenever a fun
tion is dened with a return-type that defaults to int.
Also warn about any return statement with no return-value in a fun
tion whose
return-type is not void.
For C, also warn if the return type of a fun
tion has a type qualier su
h
as
onst. Su
h a type qualier has no ee
t, sin
e the value returned by
a fun
tion is not an lvalue. ISO C prohibits qualied void return types on
fun
tion denitions, so su
h return types always re
eive a warning even without
this option.
For C++, a fun
tion without return type always produ
es a diagnosti
message,
even when `-Wno-return-type' is spe
ied. The only ex
eptions are `main' and
fun
tions dened in system headers.
This warning is enabled by `-Wall'.
-Wswit
h Warn whenever a swit
h statement has an index of enumerated type and la
ks
a
ase for one or more of the named
odes of that enumeration. (The presen
e
of a default label prevents this warning.)
ase labels outside the enumeration
range also provoke warnings when this option is used. This warning is enabled
by `-Wall'.
-Wswit
h-default
-Wswit h-enum
-Wtrigraphs
Warn if any trigraphs are en
ountered that might
hange the meaning of the
program (trigraphs within
omments are not warned about). This warning is
enabled by `-Wall'.
-Wunused-fun tion
Warn whenever a stati
fun
tion is de
lared but not dened or a non\-inline
stati
fun
tion is unused. This warning is enabled by `-Wall'.
-Wunused-label
Warn whenever a label is de
lared but not used. This warning is enabled by
`-Wall'.
To suppress this warning use the `unused' attribute (see Se
tion 5.31 [Variable
Attributes, page 233).
-Wunused-parameter
Warn whenever a fun
tion parameter is unused aside from its de
laration.
To suppress this warning use the `unused' attribute (see Se
tion 5.31 [Variable
Attributes, page 233).
-Wunused-variable
41
To suppress this warning use the `unused' attribute (see Se
tion 5.31 [Variable
Attributes, page 233).
-Wunused-value
Warn whenever a statement
omputes a result that is expli
itly not used. This
warning is enabled by `-Wall'.
To suppress this warning
ast the expression to `void'.
-Wunused All the above `-Wunused' options
ombined.
In order to get a warning about an unused fun
tion parameter, you must either
spe
ify `-Wextra -Wunused' (note that `-Wall' implies `-Wunused'), or separately spe
ify `-Wunused-parameter'.
-Wuninitialized
int x;
swit
h (y)
{
ase 1: x = 1;
break;
ase 2: x = 4;
break;
ase 3: x = 5;
}
foo (x);
int save_y;
if (
hange_y) save_y = y, y = new_y;
...
if (
hange_y) y = save_y;
42
-Wstri t-aliasing
This option is only a
tive when `-fstri
t-aliasing' is a
tive. It warns about
ode whi
h might break the stri
t aliasing rules that the
ompiler is using for
optimization. The warning does not
at
h all
ases, but does attempt to
at
h
the more
ommon pitfalls. It is in
luded in `-Wall'.
-Wstri t-aliasing=2
This option is only a
tive when `-fstri
t-aliasing' is a
tive. It warns about
all
ode whi
h might break the stri
t aliasing rules that the
ompiler is using
for optimization. This warning
at
hes all
ases, but it will also give a warning
for some ambiguous
ases that are safe.
-Wall
All of the above `-W' options
ombined. This enables all the warnings about
onstru
tions that some users
onsider questionable, and that are easy to avoid
(or modify to prevent the warning), even in
onjun
tion with ma
ros. This
also enables some language-spe
i
warnings des
ribed in Se
tion 3.5 [C++ Diale
t Options, page 24 and Se
tion 3.6 [Obje
tive-C and Obje
tive-C++ Diale
t
Options, page 31.
The following `-W...' options are not implied by `-Wall'. Some of them warn about
onstru
tions that users generally do not
onsider questionable, but whi
h o
asionally you
might wish to
he
k for; others warn about
onstru
tions that are ne
essary or hard to
avoid in some
ases, and there is no simple way to modify the
ode to suppress the warning.
-Wextra (This option used to be
alled `-W'. The older name is still supported, but the
newer name is more des
riptive.) Print extra warning messages for these events:
A fun
tion
an return either with or without a value. (Falling o the end of
the fun
tion body is
onsidered returning without a value.) For example,
this fun
tion would evoke su
h a warning:
43
foo (a)
{
if (a > 0)
return a;
}
An expression-statement or the left-hand side of a
omma expression
ontains no side ee
ts. To suppress the warning,
ast the unused expression
to void. For example, an expression su
h as `x[i,j' will
ause a warning,
but `x[(void)i,j' will not.
An unsigned value is
ompared against zero with `<' or `>='.
Storage-
lass spe
iers like stati
are not the rst things in a de
laration.
A
ording to the C Standard, this usage is obsoles
ent.
If `-Wall' or `-Wunused' is also spe
ied, warn about unused arguments.
A
omparison between signed and unsigned values
ould produ
e an in
orre
t result when the signed value is
onverted to unsigned. (But don't
warn if `-Wno-sign-
ompare' is also spe
ied.)
An aggregate has an initializer whi
h does not initialize all
members.
This warning
an be independently
ontrolled by
`-Wmissing-field-initializers'.
A fun
tion parameter is de
lared without a type spe
ier in K&R-style
fun
tions:
void foo(bar) { }
-Wno-div-by-zero
Do not warn about
ompile-time integer division by zero. Floating point division by zero is not warned about, as it
an be a legitimate way of obtaining
innities and NaNs.
-Wsystem-headers
Print warning messages for
onstru
ts found in system header les. Warnings
from system headers are normally suppressed, on the assumption that they
44
usually do not indi
ate real problems and would only make the
ompiler output
harder to read. Using this
ommand line option tells GCC to emit warnings
from system headers as if they o
urred in user
ode. However, note that using
`-Wall' in
onjun
tion with this option will not warn about unknown pragmas
in system headers|for that, `-Wunknown-pragmas' must also be used.
-Wfloat-equal
45
-Wundef
-Wno-endif-labels
-Wlarger-than-len
-Wpointer-arith
Warn about anything that depends on the \size of" a fun
tion type or of void.
GNU C assigns these types a size of 1, for
onvenien
e in
al
ulations with void
* pointers and pointers to fun
tions.
Warn whenever a fun
tion
all is
ast to a non-mat
hing type. For example,
warn if int mallo
() is
ast to anything *.
46
-W ast-qual
Warn whenever a pointer is
ast so as to remove a type qualier from the target
type. For example, warn if a
onst
har * is
ast to an ordinary
har *.
-W ast-align
Warn whenever a pointer is
ast su
h that the required alignment of the target
is in
reased. For example, warn if a
har * is
ast to an int * on ma
hines
where integers
an only be a
essed at two- or four-byte boundaries.
-Wwrite-strings
When
ompiling C, give string
onstants the type
onst
har[length so that
opying the address of one into a non-
onst
har * pointer will get a warning;
when
ompiling C++, warn about the depre
ated
onversion from string
onstants to
har *. These warnings will help you nd at
ompile time
ode that
an try to write into a string
onstant, but only if you have been very
areful
about using
onst in de
larations and prototypes. Otherwise, it will just be a
nuisan
e; this is why we did not make `-Wall' request these warnings.
-W onversion
Warn if a prototype
auses a type
onversion that is dierent from what would
happen to the same argument in the absen
e of a prototype. This in
ludes
onversions of xed point to
oating and vi
e versa, and
onversions
hanging
the width or signedness of a xed point argument ex
ept when the same as the
default promotion.
Also, warn if a negative integer
onstant expression is impli
itly
onverted to an
unsigned type. For example, warn about the assignment x = -1 if x is unsigned.
But do not warn about expli
it
asts like (unsigned) -1.
-Wsign- ompare
Warn when a
omparison between signed and unsigned values
ould produ
e an
in
orre
t result when the signed value is
onverted to unsigned. This warning
is also enabled by `-Wextra'; to get the other warnings of `-Wextra' without
this warning, use `-Wextra -Wno-sign-
ompare'.
-Waggregate-return
Warn if any fun
tions that return stru
tures or unions are dened or
alled. (In
languages where you
an return an array, this also eli
its a warning.)
Warn if a fun
tion is de
lared or dened without spe
ifying the argument types.
(An old-style fun
tion denition is permitted without a warning if pre
eded by
a de
laration whi
h spe
ies the argument types.)
-Wold-style-definition (C only)
Warn if an old-style fun
tion denition is used. A warning is given even if there
is a previous prototype.
-Wmissing-prototypes (C only)
47
-Wmissing-field-initializers
Warn if a stru
ture's initializer has some elds missing. For example, the following
ode would
ause su
h a warning, be
ause x.h is impli
itly zero:
stru
t s { int f, g, h; };
stru
t s x = { 3, 4 };
This option does not warn about designated initializers, so the following modi
ation would not trigger a warning:
stru
t s { int f, g, h; };
stru
t s x = { .f = 3, .g = 4 };
Warn about fun
tions whi
h might be
andidates for attribute noreturn. Note
these are only possible
andidates, not absolute ones. Care should be taken
to manually verify fun
tions a
tually do not ever return before adding the
noreturn attribute, otherwise subtle
ode generation bugs
ould be introdu
ed.
You will not get a warning for main in hosted C environments.
-Wmissing-format-attribute
If `-Wformat' is enabled, also warn about fun
tions whi
h might be
andidates
for format attributes. Note these are only possible
andidates, not absolute
ones. GCC will guess that format attributes might be appropriate for any
fun
tion that
alls a fun
tion like vprintf or vs
anf, but this might not always
be the
ase, and some fun
tions for whi
h format attributes are appropriate
may not be dete
ted. This option has no ee
t unless `-Wformat' is enabled
(possibly by `-Wall').
-Wno-multi
har
Do not warn if a multi
hara
ter
onstant (`'FOOF'') is used. Usually they
indi
ate a typo in the user's
ode, as they have implementation-dened values,
and should not be used in portable
ode.
Do not warn about uses of fun
tions, variables, and types marked as depre
ated
by using the depre
ated attribute. (see Se
tion 5.24 [Fun
tion Attributes,
page 217, see Se
tion 5.31 [Variable Attributes, page 233, see Se
tion 5.32
[Type Attributes, page 238.)
-Wpa ked Warn if a stru ture is given the pa ked attribute, but the pa ked attribute has
no ee
t on the layout or size of the stru
ture. Su
h stru
tures may be misaligned for little benet. For instan
e, in this
ode, the variable f.x in stru
t
bar will be misaligned even though stru
t bar does not itself have the pa
ked
attribute:
48
stru
t foo {
int x;
har a, b,
, d;
} __attribute__((pa
ked));
stru
t bar {
har z;
stru
t foo f;
};
-Wpadded Warn if padding is in luded in a stru ture, either to align an element of the
stru
ture or to align the whole stru
ture. Sometimes when this happens it is
possible to rearrange the elds of the stru
ture to redu
e the padding and so
make the stru
ture smaller.
-Wredundant-de ls
Warn if anything is de
lared more than on
e in the same s
ope, even in
ases
where multiple de
laration is valid and
hanges nothing.
-Wnested-externs (C only)
Warn if an extern de
laration is en
ountered within a fun
tion.
-Wunrea
hable-
ode
Warn if the
ompiler dete
ts that
ode will never be exe
uted.
This option is intended to warn when the
ompiler dete
ts that at least a whole
line of sour
e
ode will never be exe
uted, be
ause some
ondition is never
satised or be
ause it is after a pro
edure that never returns.
It is possible for this option to produ
e a warning even though there are
ir
umstan
es under whi
h part of the ae
ted line
an be exe
uted, so
are should
be taken when removing apparently-unrea
hable
ode.
For instan
e, when a fun
tion is inlined, a warning may mean that the line is
unrea
hable in only one inlined
opy of the fun
tion.
This option is not made part of `-Wall' be
ause in a debugging version of a
program there is often substantial
ode whi
h
he
ks
orre
t fun
tioning of the
program and is, hopefully, unrea
hable be
ause the program does work. Another
ommon use of unrea
hable
ode is to provide behavior whi
h is sele
table
at
ompile-time.
-Winline Warn if a fun
tion
an not be inlined and it was de
lared as inline. Even with
this option, the
ompiler will not warn about failures to inline fun
tions de
lared
in system headers.
The
ompiler uses a variety of heuristi
s to determine whether or not to inline a
fun
tion. For example, the
ompiler takes into a
ount the size of the fun
tion
being inlined and the amount of inlining that has already been done in the
urrent fun
tion. Therefore, seemingly insigni
ant
hanges in the sour
e program
an
ause the warnings produ
ed by `-Winline' to appear or disappear.
-Wno-invalid-offsetof (C++ only)
Suppress warnings from applying the `offsetof' ma
ro to a non-POD type.
A
ording to the 1998 ISO C++ standard, applying `offsetof' to a non-POD
type is undened. In existing C++ implementations, however, `offsetof' typi
ally gives meaningful results even when applied to
ertain kinds of non-POD
49
types. (Su
h as a simple `stru
t' that fails to be a POD type only by virtue of
having a
onstru
tor.) This
ag is for users who are aware that they are writing nonportable
ode and who have deliberately
hosen to ignore the warning
about it.
The restri
tions on `offsetof' may be relaxed in a future version of the C++
standard.
-Winvalid-p
h
Warn if a pre
ompiled header (see Se
tion 3.20 [Pre
ompiled Headers,
page 187) is found in the sear
h path but
an't be used.
-Wlong-long
Warn if `long long' type is used. This is default. To inhibit the warning
messages, use `-Wno-long-long'. Flags `-Wlong-long' and `-Wno-long-long'
are taken into a
ount only when `-pedanti
'
ag is used.
Warn if variadi
ma
ros are used in pedanti
ISO C90 mode, or the GNU
alternate syntax when in pedanti
ISO C99 mode. This is default. To inhibit
the warning messages, use `-Wno-variadi
-ma
ros'.
-Wdisabled-optimization
Warn if a requested optimization pass is disabled. This warning does not generally indi
ate that there is anything wrong with your
ode; it merely indi
ates
that GCC's optimizers were unable to handle the
ode ee
tively. Often, the
problem is that your
ode is too big or too
omplex; GCC will refuse to optimize
programs when the optimization itself is likely to take inordinate amounts of
time.
-Wno-pointer-sign
-Werror
Don't warn for pointer argument passing or assignment with dierent signedness. Only useful in the negative form sin
e this warning is enabled by default.
This option is only supported for C and Obje
tive-C.
Make all warnings into errors.
50
not exist at all;
ow of
ontrol may brie
y move where you did not expe
t it;
some statements may not be exe
uted be
ause they
ompute
onstant results
or their values were already at hand; some statements may exe
ute in dierent
pla
es be
ause 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.
The following options are useful when GCC is generated with the
apability for
more than one debugging format.
-ggdb
Produ
e debugging information for use by GDB. This means to use the most
expressive format available (DWARF 2, stabs, or the native format if neither
of those are supported), in
luding GDB extensions if at all possible.
-gstabs
-feliminate-unused-debug-symbols
Produ
e debugging information in stabs format (if that is supported), for only
symbols that are a
tually used.
-gstabs+ Produ e debugging information in stabs format (if that is supported), using
GNU extensions understood only by the GNU debugger (GDB). The use of
these extensions is likely to make other debuggers
rash or refuse to read the
program.
-g off
-gx off
-gx off+ Produ e debugging information in XCOFF format (if that is supported), using
GNU extensions understood only by the GNU debugger (GDB). The use of
these extensions is likely to make other debuggers
rash or refuse to read the
program, and may
ause assemblers other than the GNU assembler (GAS) to
fail with an error.
-gdwarf-2
-gvms
Produ
e debugging information in DWARF version 2 format (if that is supported). This is the format used by DBX on IRIX 6. With this option, GCC
uses features of DWARF version 3 when they are useful; version 3 is upward
ompatible with version 2, but may still
ause problems for older debuggers.
Produ
e debugging information in VMS debug format (if that is supported).
This is the format used by DEBUG on VMS systems.
51
-glevel
-ggdblevel
-gstabslevel
-g
offlevel
-gx
offlevel
-gvmslevel
Request debugging information and also use level to spe
ify how mu
h information. The default level is 2.
Level 1 produ
es minimal information, enough for making ba
ktra
es in parts
of the program that you don't plan to debug. This in
ludes des
riptions of
fun
tions and external variables, but no information about lo
al variables and
no line numbers.
Level 3 in
ludes extra information, su
h as all the ma
ro denitions present in
the program. Some debuggers support ma
ro expansion when you use `-g3'.
`-gdwarf-2' does not a
ept a
on
atenated debug level, be
ause GCC used
to support an option `-gdwarf' that meant to generate debug information in
version 1 of the DWARF format (whi
h is very dierent from version 2), and
it would have been too
onfusing. That debug format is long obsolete, but the
option
annot be
hanged now. Instead use an additional `-glevel ' option to
hange the debug level for DWARF2.
-feliminate-dwarf2-dups
Compress DWARF2 debugging information by eliminating dupli
ated information about ea
h symbol. This option only makes sense when generating
DWARF2 debugging information with `-gdwarf-2'.
-p
Generate extra
ode to write prole information suitable for the analysis program prof. You must use this option when
ompiling the sour
e les you want
data about, and you must also use it when linking.
-pg
Generate extra
ode to write prole information suitable for the analysis program gprof. You must use this option when
ompiling the sour
e les you want
data about, and you must also use it when linking.
-Q
Makes the
ompiler print out ea
h fun
tion name as it is
ompiled, and print
some statisti
s about ea
h pass when it nishes.
-ftime-report
Makes the
ompiler print some statisti
s about the time
onsumed by ea
h pass
when it nishes.
-fmem-report
Makes the
ompiler print some statisti
s about permanent memory allo
ation
when it nishes.
-fprofile-ar s
Add
ode so that program
ow ar
s are instrumented. During exe
ution the
program re
ords how many times ea
h bran
h and
all is exe
uted and how
many times it is taken or returns. When the
ompiled program exits it saves
this data to a le
alled `auxname.g
da' for ea
h sour
e le. The data may be
52
used for prole-dire
ted optimizations (`-fbran
h-probabilities'), or for test
overage analysis (`-ftest-
overage'). Ea
h obje
t le's auxname is generated
from the name of the output le, if expli
itly spe
ied and it is not the nal
exe
utable, otherwise it is the basename of the sour
e le. In both
ases any
sux is removed (e.g. `foo.g
da' for input le `dir/foo.
', or `dir/foo.g
da'
for output le spe
ied as `-o dir/foo.o').
Compile the sour
e les with `-fprofile-ar
s' plus optimization and
ode generation options. For test
overage analysis, use the additional
`-ftest-
overage' option. You do not need to prole every sour
e le in
a program.
Link your obje
t les with `-lg
ov' or `-fprofile-ar
s' (the latter implies
the former).
For prole-dire
ted optimizations,
ompile the sour
e les again
with the same optimization and
ode generation options plus
`-fbran
h-probabilities' (see Se
tion 3.10 [Options that Control
Optimization, page 61).
With `-fprofile-ar
s', for ea
h fun
tion of your program GCC
reates a
program
ow graph, then nds a spanning tree for the graph. Only ar
s that
are not on the spanning tree have to be instrumented: the
ompiler adds
ode
to
ount the number of times that these ar
s are exe
uted. When an ar
is
the only exit or only entran
e to a blo
k, the instrumentation
ode
an be
added to the blo
k; otherwise, a new basi
blo
k must be
reated to hold the
instrumentation
ode.
-ftree-based-profiling
53
-ftest- overage
Produ
e a notes le that the g
ov
ode-
overage utility (see Chapter 9 [g
ov|a
Test Coverage Program, page 355)
an use to show program
overage. Ea
h
sour
e le's note le is
alled `auxname.g
no'. Refer to the `-fprofile-ar
s'
option above for a des
ription of auxname and instru
tions on how to generate
test
overage data. Coverage data will mat
h the sour
e les more
losely, if
you do not optimize.
-dletters
-fdump-rtl-pass
-dB
-fdump-rtl-bbro
-d
-fdump-rtl-
ombine
-dC
-fdump-rtl-
e1
-fdump-rtl-
e2
`-dC' and `-fdump-rtl-
e1' enable dumping after the rst if
onversion, to the le `file.11.
e1'. `-dC' and `-fdump-rtl-
e2'
-dd
-fdump-rtl-btl
-fdump-rtl-dbr
`-dd' and `-fdump-rtl-btl' enable dumping after bran
h target
load optimization, to `file.31.btl'. `-dd' and `-fdump-rtl-dbr'
enable dumping after delayed bran
h s
heduling, to `file.36.dbr'.
-dD
54
-dE
-fdump-rtl-
e3
-df
-fdump-rtl-
fg
-fdump-rtl-life
`-df' and `-fdump-rtl-
fg' enable dumping after
ontrol and data
ow analysis, to `file.08.
fg'. `-df' and `-fdump-rtl-
fg' enable dumping dump after life analysis, to `file.16.life'.
-dg
-fdump-rtl-greg
-dG
-fdump-rtl-g
se
-fdump-rtl-bypass
`-dG' and `-fdump-rtl-g
se' enable dumping after GCSE,
to `file.05.g
se'.
`-dG' and `-fdump-rtl-bypass' enable
-dh
-fdump-rtl-eh
-di
-fdump-rtl-sibling
-dj
-fdump-rtl-jump
-dk
-fdump-rtl-sta
k
-dl
-fdump-rtl-lreg
-dL
-fdump-rtl-loop
-fdump-rtl-loop2
`-dL' and
55
-dm
-fdump-rtl-sms
-dM
-fdump-rtl-ma
h
-dn
-fdump-rtl-rnreg
-dN
-fdump-rtl-regmove
-do
-fdump-rtl-postreload
-dr
-fdump-rtl-expand
-dR
-fdump-rtl-s
hed2
-ds
-fdump-rtl-
se
Dump after CSE (in
luding the jump optimization that sometimes
follows CSE), to `file.04.
se'.
-dS
-fdump-rtl-s
hed
-dt
-fdump-rtl-
se2
Dump after the se
ond CSE pass (in
luding the jump optimization
that sometimes follows CSE), to `file.15.
se2'.
-dT
-fdump-rtl-tra
er
-dV
-fdump-rtl-vpt
-fdump-rtl-vartra
k
`-dV' and
56
-dw
-fdump-rtl-flow2
-dz
-fdump-rtl-peephole2
-dZ
-fdump-rtl-web
-da
-fdump-rtl-all
-dH
-dm
-dp
-dP
-dv
For ea
h of the other indi
ated dump les (either with `-d' or
`-fdump-rtl-pass '), dump a representation of the
ontrol
ow
graph suitable for viewing with VCG to `file.pass.v
g'.
-dx
Just generate RTL for a fun
tion instead of
ompiling it. Usually
used with `r' (`-fdump-rtl-expand').
-dy
-fdump-unnumbered
When doing debugging dumps (see `-d' option above), suppress instru
tion
numbers and line number note output. This makes it more feasible to use
di on debugging dumps for
ompiler invo
ations with dierent options, in
parti
ular with and without `-g'.
Dump a representation of the tree stru
ture for the entire translation unit to a
le. The le name is made by appending `.tu' to the sour
e le name. If the
`-options ' form is used, options
ontrols the details of the dump as des
ribed
for the `-fdump-tree' options.
Dump a representation of ea
h
lass's hierar
hy and virtual fun
tion table layout
to a le. The le name is made by appending `.
lass' to the sour
e le name.
57
If the `-options ' form is used, options
ontrols the details of the dump as
des
ribed for the `-fdump-tree' options.
-fdump-ipa-swit
h
`all'
Enables all inter-pro edural analysis dumps; urrently the only produ ed dump is the ` graph' dump.
` graph'
Control the dumping at various stages of pro
essing the intermediate language
tree to a le. The le name is generated by appending a swit
h spe
i
sux
to the sour
e le name. If the `-options ' form is used, options is a list of
`-' separated options that
ontrol the details of the dump. Not all options are
appli
able to all dumps, those whi
h are not meaningful will be ignored. The
following options are available
`address' Print the address of ea
h node. Usually this is not meaningful as it
hanges a
ording to the environment and sour
e le. Its primary
use is for tying up a dump le with a debug environment.
`slim'
`raw'
Print a raw representation of the tree. By default, trees are prettyprinted into a C-like representation.
`details' Enable more detailed dumps (not honored by every dump option).
`stats'
`blo ks'
`vops'
`lineno'
`uid'
`all'
58
`optimized'
Dump after all tree based optimization, to `file.optimized'.
`inlined' Dump after fun
tion inlining, to `file.inlined'.
`gimple'
Dump ea
h fun
tion before and after the gimpli
ation pass to a
le. The le name is made by appending `.gimple' to the sour
e
le name.
` fg'
`v g'
` h'
`ssa'
`alias'
` p'
Dump ea h fun tion after CCP. The le name is made by appending `. p' to the sour e le name.
`pre'
`fre'
`d e'
Dump ea
h fun
tion after performing s
alar repla
ement of aggregates. The le name is made by appending `.sra' to the sour
e le
name.
`dom'
`dse'
`phiopt'
`forwprop'
59
`
opyrename'
Dump ea
h fun
tion after applying the
opy rename optimization.
The le name is made by appending `.
opyrename' to the sour
e
le name.
`nrv'
Dump ea
h fun
tion after applying the named return value optimization on generi
trees. The le name is made by appending
`.nrv' to the sour
e le name.
`ve t'
`all'
Enable all the available tree dumps with the
ags provided in this
option.
-ftree-ve torizer-verbose=n
This option
ontrols the amount of debugging output the ve
torizer prints.
This information is written to standard error, unless `-fdump-tree-all' or
`-fdump-tree-ve
t' is spe
ied, in whi
h
ase it is output to the usual dump
listing le, `.ve
t'.
-frandom-seed=string
This option provides a seed that GCC uses when it would otherwise use random
numbers. It is used to generate
ertain symbol names that have to be dierent
in every
ompiled le. It is also used to pla
e unique stamps in
overage data
les and the obje
t les that produ
e them. You
an use the `-frandom-seed'
option to produ
e reprodu
ibly identi
al obje
t les.
The string should be dierent for every le you
ompile.
-fs hed-verbose=n
On targets that use instru
tion s
heduling, this option
ontrols the amount of
debugging output the s
heduler prints. This information is written to standard
error, unless `-dS' or `-dR' is spe
ied, in whi
h
ase it is output to the usual
dump listing le, `.s
hed' or `.s
hed2' respe
tively. However for n greater
than nine, the output is always printed to standard error.
For n greater than zero, `-fs
hed-verbose' outputs the same information as
`-dRS'. For n greater than one, it also output basi
blo
k probabilities, detailed ready list information and unit/insn info. For n greater than two, it
in
ludes RTL at abort point,
ontrol-
ow and regions info. And for n over four,
`-fs
hed-verbose' also in
ludes dependen
e info.
-save-temps
Store the usual \temporary" intermediate les permanently; pla
e them in the
urrent dire
tory and name them based on the sour
e le. Thus,
ompiling
`foo.
' with `-
-save-temps' would produ
e les `foo.i' and `foo.s', as well
60
-time
as `foo.o'. This
reates a prepro
essed `foo.i' output le even though the
ompiler now normally uses an integrated prepro
essor.
When used in
ombination with the `-x'
ommand line option, `-save-temps'
is sensible enough to avoid over writing an input sour
e le with the same
extension as an intermediate le. The
orresponding intermediate le may be
obtained by renaming the sour
e le before using `-save-temps'.
Report the CPU time taken by ea
h subpro
ess in the
ompilation sequen
e.
For C sour
e les, this is the
ompiler proper and assembler (plus the linker if
linking is done). The output looks like this:
#
1 0.12 0.01
# as 0.00 0.01
The rst number on ea
h line is the \user time", that is time spent exe
uting
the program itself. The se
ond number is \system time", time spent exe
uting
operating system routines on behalf of the program. Both numbers are in
se
onds.
-fvar-tra
king
Run variable tra
king pass. It
omputes where variables are stored at ea
h position in
ode. Better debugging information is then generated (if the debugging
information format supports this information).
It is enabled by default when
ompiling with optimization (`-Os', `-O', `-O2',
...), debugging information (`-g') and the debug info format supports it.
-print-file-name=library
Print the full absolute name of the library le library that would be used when
linking|and don't do anything else. With this option, GCC does not
ompile
or link anything; it just prints the le name.
-print-multi-dire tory
Print the dire
tory name
orresponding to the multilib sele
ted by any other
swit
hes present in the
ommand line. This dire
tory is supposed to exist in
GCC_EXEC_PREFIX.
-print-multi-lib
Print the mapping from multilib dire
tory names to
ompiler swit
hes that
enable them. The dire
tory name is separated from the swit
hes by `;', and
ea
h swit
h starts with an `' instead of the `-', without spa
es between multiple
swit
hes. This is supposed to ease shell-pro
essing.
-print-prog-name=program
Like `-print-file-name', but sear
hes for a program su
h as `
pp'.
-print-libg
-file-name
Same as `-print-file-name=libg
.a'.
This is useful when you use `-nostdlib' or `-nodefaultlibs' but you do want
to link with `libg
.a'. You
an do
g
-nostdlib files ... `g
-print-libg
-file-name`
-print-sear h-dirs
Print the name of the
ongured installation dire
tory and a list of program
and library dire
tories g
will sear
h|and don't do anything else.
61
-dumpversion
Print the ompiler version (for example, `3.0')|and don't do anything else.
-dumpspe s
Print the
ompiler's built-in spe
s|and don't do anything else. (This is used
when GCC itself is being built.) See Se
tion 3.15 [Spe
Files, page 101.
-feliminate-unused-debug-types
Normally, when produ
ing DWARF2 output, GCC will emit debugging information for all types de
lared in a
ompilation unit, regardless of whether or not
they are a
tually used in that
ompilation unit. Sometimes this is useful, su
h
as if, in the debugger, you want to
ast a value to a type that is not a
tually
used in your program (but is de
lared). More often, however, this results in
a signi
ant amount of wasted spa
e. With this option, GCC will avoid produ
ing debug symbol output for types that are nowhere used in the sour
e le
being
ompiled.
62
-O
-O1
Optimize. Optimizing
ompilation takes somewhat more time, and a lot more
memory for a large fun
tion.
With `-O', the
ompiler tries to redu
e
ode size and exe
ution time, without
performing any optimizations that take a great deal of
ompilation time.
`-O' turns on the following optimization
ags:
-fdefer-pop
-fdelayed-bran
h
-fguess-bran
h-probability
-f
prop-registers
-floop-optimize
-fif-
onversion
-fif-
onversion2
-ftree-
p
-ftree-d
e
-ftree-dominator-opts
-ftree-dse
-ftree-ter
-ftree-lrs
-ftree-sra
-ftree-
opyrename
-ftree-fre
-ftree-
h
-fmerge-
onstants
-O2
63
Please note the warning under `-fg
se' about invoking `-O2' on programs that
use
omputed gotos.
-O3
-O0
-Os
Optimize for size. `-Os' enables all `-O2' optimizations that do not typi
ally
in
rease
ode size. It also performs further optimizations designed to redu
e
ode size.
`-Os' disables the following optimization
ags:
-falign-fun
tions -falign-jumps -falign-loops
-falign-labels -freorder-blo
ks -freorder-blo
ks-and-partition -fprefet
hloop-arrays
If you use multiple `-O' options, with or without level numbers, the last su
h
option is the one that is ee
tive.
Options of the form `-fflag ' spe
ify ma
hine-independent
ags. Most
ags 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 you typi
ally will use. You
an gure out
the other form by either removing `no-' or adding it.
The following options
ontrol spe
i
optimizations. They are either a
tivated by `-O'
options or are related to ones that are. You
an use the following
ags in the rare
ases
when \ne-tuning" of optimizations to be performed is desired.
-fno-default-inline
Do not make member fun
tions inline by default merely be
ause they are dened
inside the
lass s
ope (C++ only). Otherwise, when you spe
ify `-O', member
fun
tions dened inside
lass s
ope are
ompiled inline by default; i.e., you don't
need to add `inline' in front of the member fun
tion name.
-fno-defer-pop
Always pop the arguments to ea
h fun
tion
all as soon as that fun
tion returns.
For ma
hines whi
h must pop arguments after a fun
tion
all, the
ompiler
normally lets arguments a
umulate on the sta
k for several fun
tion
alls and
pops them all at on
e.
Disabled at levels `-O', `-O2', `-O3', `-Os'.
-ffor e-mem
64
-ffor e-addr
For e memory address onstants to be opied into registers before doing arithmeti on them. This may produ e better ode just as `-ffor e-mem' may.
-fomit-frame-pointer
Don't keep the frame pointer in a register for fun
tions that don't need one.
This avoids the instru
tions to save, set up and restore frame pointers; it also
makes an extra register available in many fun
tions. It also makes debugging
impossible on some ma
hines.
On some ma
hines, su
h as the VAX, this
ag has no ee
t, be
ause the standard
alling sequen
e automati
ally handles the frame pointer and nothing is
saved by pretending it doesn't exist. The ma
hine-des
ription ma
ro FRAME_
POINTER_REQUIRED
ontrols whether a target ma
hine supports this
ag. See
se
tion \Register Usage" in GNU Compiler Colle
tion (GCC) Internals.
Enabled at levels `-O', `-O2', `-O3', `-Os'.
-foptimize-sibling-
alls
-fno-inline
Don't pay attention to the inline keyword. Normally this option is used to
keep the
ompiler from expanding any fun
tions inline. Note that if you are
not optimizing, no fun
tions
an be expanded inline.
-finline-fun tions
Integrate all simple fun
tions into their
allers. The
ompiler heuristi
ally de
ides whi
h fun
tions are simple enough to be worth integrating in this way.
If all
alls to a given fun
tion are integrated, and the fun
tion is de
lared
stati
, then the fun
tion is normally not output as assembler
ode in its own
right.
Enabled at level `-O3'.
-finline-limit=n
By default, GCC limits the size of fun
tions that
an be inlined. This
ag allows
the
ontrol of this limit for fun
tions that are expli
itly marked as inline (i.e.,
marked with the inline keyword or dened within the
lass denition in
++).
n is the size of fun
tions that
an be inlined in number of pseudo instru
tions
(not
ounting parameter handling). The default value of n is 600. In
reasing
this value
an result in more inlined
ode at the
ost of
ompilation time and
memory
onsumption. De
reasing usually makes the
ompilation faster and less
ode will be inlined (whi
h presumably means slower programs). This option
is parti
ularly useful for programs that use inlining heavily su
h as those based
on re
ursive templates with C++.
Inlining is a
tually
ontrolled by a number of parameters, whi
h may be spe
ied individually by using `--param name =value '. The `-finline-limit=n '
option sets some of these parameters as follows:
max-inline-insns-single
is set to n/2.
65
max-inline-insns-auto
is set to n/2.
min-inline-insns
max-inline-insns-rtl
is set to n.
See below for a do
umentation of the individual parameters
ontrolling inlining.
Note: pseudo instru
tion represents, in this parti
ular
ontext, an abstra
t
measurement of fun
tion's size. In no way, it represents a
ount of assembly
instru
tions and as su
h its exa
t meaning might
hange from one release to an
another.
-fkeep-inline-fun
tions
In C, emit stati
fun
tions that are de
lared inline into the obje
t le, even
if the fun
tion has been inlined into all of its
allers. This swit
h does not ae
t
fun
tions using the extern inline extension in GNU C. In C++, emit any and
all inline fun
tions into the obje
t le.
-fkeep-stati - onsts
Emit variables de
lared stati
onst when optimization isn't turned on, even
if the variables aren't referen
ed.
GCC enables this option by default. If you want to for
e the
ompiler to
he
k if
the variable was referen
ed, regardless of whether or not optimization is turned
on, use the `-fno-keep-stati
-
onsts' option.
-fmerge- onstants
Attempt to merge identi
al
onstants (string
onstants and
oating point
onstants) a
ross
ompilation units.
This option is the default for optimized
ompilation if the assembler and linker
support it. Use `-fno-merge-
onstants' to inhibit this behavior.
Enabled at levels `-O', `-O2', `-O3', `-Os'.
-fmerge-all- onstants
-fmodulo-s hed
Perform swing modulo s
heduling immediately before the rst s
heduling pass.
This pass looks at innermost loops and reorders their instru
tions by overlapping dierent iterations.
-fno-bran h- ount-reg
Do not use \de
rement and bran
h" instru
tions on a
ount register, but instead
generate a sequen
e of instru
tions that de
rement a register,
ompare it against
66
zero, then bran
h based upon the result. This option is only meaningful on
ar
hite
tures that support su
h instru
tions, whi
h in
lude x86, PowerPC, IA64 and S/390.
The default is `-fbran
h-
ount-reg', enabled when `-fstrength-redu
e' is
enabled.
-fno-fun
tion-
se
Do not put fun
tion addresses in registers; make ea
h instru
tion that
alls a
onstant fun
tion
ontain the fun
tion's address expli
itly.
This option results in less e
ient
ode, but some strange ha
ks that alter the
assembler output may be
onfused by the optimizations performed when this
option is not used.
The default is `-ffun
tion-
se'
-fno-zero-initialized-in-bss
If the target supports a BSS se
tion, GCC by default puts variables that are
initialized to zero into BSS. This
an save spa
e in the resulting
ode.
This option turns o this behavior be
ause some programs expli
itly rely on
variables going to the data se
tion. E.g., so that the resulting exe
utable
an
nd the beginning of that se
tion and/or make assumptions based on that.
The default is `-fzero-initialized-in-bss'.
-fbounds- he k
For front-ends that support it, generate additional
ode to
he
k that indi
es
used to a
ess arrays are within the de
lared range. This is
urrently only
supported by the Java and Fortran front-ends, where this option defaults to
true and false respe
tively.
For front-ends that support it (C and C++), instrument all risky pointer/array
dereferen
ing operations, some standard library string/heap fun
tions, and
some other asso
iated
onstru
ts with range/validity tests. Modules so instrumented should be immune to buer over
ows, invalid heap use, and some
other
lasses of C/C++ programming errors. The instrumentation relies on a
separate runtime library (`libmudflap'), whi
h will be linked into a program
if `-fmudflap' is given at link time. Run-time behavior of the instrumented
program is
ontrolled by the MUDFLAP_OPTIONS environment variable. See env
MUDFLAP_OPTIONS=-help a.out for its options.
Use `-fmudflapth' instead of `-fmudflap' to
ompile and to link if your program is multi-threaded. Use `-fmudflapir', in addition to `-fmudflap' or
`-fmudflapth', if instrumentation should ignore pointer reads. This produ
es
less instrumentation (and therefore faster exe
ution) and still provides some
prote
tion against outright memory
orrupting writes, but allows erroneously
read data to propagate within a program.
-fstrength-redu e
Perform the optimizations of loop strength redu
tion and elimination of iteration variables.
Enabled at levels `-O2', `-O3', `-Os'.
67
-fthread-jumps
-f se-follow-jumps
-f se-skip-blo ks
This is similar to `-f
se-follow-jumps', but
auses CSE to follow jumps whi
h
onditionally skip over blo
ks. When CSE en
ounters a simple if statement
with no else
lause, `-f
se-skip-blo
ks'
auses CSE to follow the jump around
the body of the if.
Enabled at levels `-O2', `-O3', `-Os'.
-frerun- se-after-loop
-frerun-loop-opt
-fg se
-fg se-lm
-fg se-sm
68
-fg
se-after-reload
When `-fg
se-after-reload' is enabled, a redundant load elimination pass
-floop-optimize
-floop-optimize2
Perform loop optimizations using the new loop optimizer. The optimizations
(loop unrolling, peeling and unswit
hing, loop invariant motion) are enabled by
separate
ags.
-f rossjumping
-fif- onversion
-fif- onversion2
Use
onditional exe
ution (where available) to transform
onditional jumps into
bran
h-less equivalents.
Enabled at levels `-O', `-O2', `-O3', `-Os'.
-fdelete-null-pointer- he ks
Use global data
ow analysis to identify and eliminate useless
he
ks for null
pointers. The
ompiler assumes that dereferen
ing a null pointer would have
halted the program. If a pointer is
he
ked after it has already been dereferen
ed, it
annot be null.
In some environments, this assumption is not true, and programs
an safely
dereferen
e null pointers. Use `-fno-delete-null-pointer-
he
ks' to disable
this optimization for programs whi
h depend on that behavior.
Enabled at levels `-O2', `-O3', `-Os'.
69
-fexpensive-optimizations
-foptimize-register-move
-fregmove
-fdelayed-bran h
If supported for the target ma
hine, attempt to reorder instru
tions to exploit
instru
tion slots available after delayed bran
h instru
tions.
Enabled at levels `-O', `-O2', `-O3', `-Os'.
-fs hedule-insns
If supported for the target ma
hine, attempt to reorder instru
tions to eliminate
exe
ution stalls due to required data being unavailable. This helps ma
hines
that have slow
oating point or memory load instru
tions by allowing other
instru
tions to be issued until the result of the load or
oating point instru
tion
is required.
Enabled at levels `-O2', `-O3', `-Os'.
-fs hedule-insns2
-fno-s hed-interblo k
Don't s
hedule instru
tions a
ross basi
blo
ks. This is normally enabled by
default when s
heduling before register allo
ation, i.e. with `-fs
hedule-insns'
or at `-O2' or higher.
-fno-s hed-spe
Don't allow spe
ulative motion of non-load instru
tions. This is normally
enabled by default when s
heduling before register allo
ation, i.e. with
`-fs
hedule-insns' or at `-O2' or higher.
Allow spe
ulative motion of some load instru
tions. This only makes sense
when s
heduling before register allo
ation, i.e. with `-fs
hedule-insns' or at
`-O2' or higher.
70
Allow spe
ulative motion of more load instru
tions. This only makes sense
when s
heduling before register allo
ation, i.e. with `-fs
hedule-insns' or at
`-O2' or higher.
-fs hed-stalled-insns=n
Dene how many insns (if any)
an be moved prematurely from the queue of
stalled insns into the ready list, during the se
ond s
heduling pass.
-fs hed-stalled-insns-dep=n
-fs hed2-use-superblo ks
When s
heduling after register allo
ation, do use superblo
k s
heduling algorithm. Superblo
k s
heduling allows motion a
ross basi
blo
k boundaries resulting on faster s
hedules. This option is experimental, as not all ma
hine
des
riptions used by GCC model the CPU
losely enough to avoid unreliable
results from the algorithm.
This only makes sense when s
heduling after register allo
ation, i.e. with
`-fs
hedule-insns2' or at `-O2' or higher.
-fs
hed2-use-tra
es
Use `-fs
hed2-use-superblo
ks' algorithm when s
heduling after register al-
lo
ation and additionally perform
ode dupli
ation in order to in
rease the size
of superblo
ks using tra
er pass. See `-ftra
er' for details on tra
e formation.
This mode should produ
e faster but signi
antly longer programs. Also without `-fbran
h-probabilities' the tra
es
onstru
ted may not mat
h the reality and hurt the performan
e. This only makes sense when s
heduling after
register allo
ation, i.e. with `-fs
hedule-insns2' or at `-O2' or higher.
The modulo s
heduling
omes before the traditional s
heduling, if a loop was
modulo s
heduled we may want to prevent the later s
heduling passes from
hanging its s
hedule, we use this option to
ontrol that.
-f aller-saves
Enable values to be allo
ated in registers that will be
lobbered by fun
tion
alls, by emitting extra instru
tions to save and restore the registers around
su
h
alls. Su
h allo
ation is done only when it seems to result in better
ode
than would otherwise be produ
ed.
This option is always enabled by default on
ertain ma
hines, usually those
whi
h have no
all-preserved registers to use instead.
Enabled at levels `-O2', `-O3', `-Os'.
-ftree-pre
71
-ftree-fre
-ftree- p
-ftree-d e
-ftree-dominator-opts
-ftree- h
Perform loop header
opying on trees. This is bene
ial sin
e it in
reases effe
tiveness of
ode motion optimizations. It also saves one jump. This
ag is
enabled by default at `-O' and higher. It is not enabled for `-Os', sin
e it usually
in
reases
ode size.
-ftree-loop-optimize
-ftree-loop-linear
Perform linear loop transformations on tree. This ag an improve a he performan e and allow further loop optimizations to take pla e.
-ftree-loop-im
Perform loop invariant motion on trees. This pass moves only invariants that
would be hard to handle at RTL level (fun
tion
alls, operations that expand
to nontrivial sequen
es of insns). With `-funswit
h-loops' it also moves
operands of
onditions that are invariant out of the loop, so that we
an use
just trivial invariantness analysis in loop unswit
hing. The pass also in
ludes
store motion.
-ftree-loop-iv anon
Create a
anoni
al
ounter for number of iterations in the loop for that determining number of iterations requires
ompli
ated analysis. Later optimizations
then may determine the number easily. Useful espe
ially in
onne
tion with
unrolling.
-fivopts Perform indu tion variable optimizations (strength redu tion, indu tion vari-
72
-ftree-sra
Perform s
alar repla
ement of aggregates. This pass repla
es stru
ture referen
es with s
alars to prevent
ommitting stru
tures to memory too early. This
ag is enabled by default at `-O' and higher.
-ftree- opyrename
Perform
opy renaming on trees. This pass attempts to rename
ompiler temporaries to other variables at
opy lo
ations, usually resulting in variable names
whi
h more
losely resemble the original variables. This
ag is enabled by default at `-O' and higher.
-ftree-ter
Perform temporary expression repla
ement during the SSA->normal phase. Single use/single def temporaries are repla
ed at their use lo
ation with their dening expression. This results in non-GIMPLE
ode, but gives the expanders
mu
h more
omplex trees to work on resulting in better RTL generation. This
is enabled by default at `-O' and higher.
-ftree-lrs
Perform live range splitting during the SSA->normal phase. Distin
t live ranges
of a variable are split into unique variables, allowing for better optimization
later. This is enabled by default at `-O' and higher.
-ftree-ve torize
-funroll-loops
-funroll-all-loops
Unroll all loops, even if their number of iterations is un
ertain when the loop is
entered. This usually makes programs run more slowly. `-funroll-all-loops'
implies the same options as `-funroll-loops',
-fsplit-ivs-in-unroller
73
-fvariable-expansion-in-unroller
With this option, the
ompiler will
reate multiple
opies of some lo
al variables
when unrolling a loop whi
h
an result in superior
ode.
-fprefet h-loop-arrays
-fno-peephole
-fno-peephole2
-fno-guess-bran h-probability
-freorder-blo ks
Reorder basi
blo
ks in the
ompiled fun
tion in order to redu
e number of
taken bran
hes and improve
ode lo
ality.
Enabled at levels `-O2', `-O3'.
-freorder-blo ks-and-partition
-freorder-fun tions
Reorder fun
tions in the obje
t le in order to improve
ode lo
ality. This is implemented by using spe
ial subse
tions .text.hot for most frequently exe
uted
fun
tions and .text.unlikely for unlikely exe
uted fun
tions. Reordering is
74
done by the linker so obje
t le format must support named se
tions and linker
must pla
e them in a reasonable way.
Also prole feedba
k must be available in to make this option ee
tive. See
`-fprofile-ar
s' for details.
Enabled at levels `-O2', `-O3', `-Os'.
-fstri
t-aliasing
Allows the
ompiler to assume the stri
test aliasing rules appli
able to the
language being
ompiled. For C (and C++), this a
tivates optimizations based
on the type of expressions. In parti
ular, an obje
t of one type is assumed never
to reside at the same address as an obje
t of a dierent type, unless the types
are almost the same. For example, an unsigned int
an alias an int, but not
a void* or a double. A
hara
ter type may alias any other type.
Pay spe
ial attention to
ode like this:
union a_union {
int i;
double d;
};
int f() {
a_union t;
t.d = 3.0;
return t.i;
}
The pra
ti
e of reading from a dierent union member than the one
most re
ently written to (
alled \type-punning") is
ommon. Even with
`-fstri
t-aliasing', type-punning is allowed, provided the memory is
a
essed through the union type. So, the
ode above will work as expe
ted.
However, this
ode might not:
int f() {
a_union t;
int* ip;
t.d = 3.0;
ip = &t.i;
return *ip;
}
Align the start of fun
tions to the next power-of-two greater than n, skipping
up to n bytes. For instan
e, `-falign-fun
tions=32' aligns fun
tions to the
next 32-byte boundary, but `-falign-fun
tions=24' would align to the next
32-byte boundary only if this
an be done by skipping 23 bytes or less.
`-fno-align-fun
tions' and `-falign-fun
tions=1' are equivalent and mean
that fun
tions will not be aligned.
75
Some assemblers only support this
ag when n is a power of two; in that
ase,
it is rounded up.
If n is not spe
ied or is zero, use a ma
hine-dependent default.
Enabled at levels `-O2', `-O3'.
-falign-labels
-falign-labels=n
-falign-loops
-falign-loops=n
-falign-jumps
-falign-jumps=n
-funit-at-a-time
Parse the whole
ompilation unit before starting to produ
e
ode. This allows
some extra optimizations to take pla
e but
onsumes more memory (in general).
There are some
ompatibility issues with unit-at-at-time mode:
enabling unit-at-a-time mode may
hange the order in whi
h fun
tions,
variables, and top-level asm statements are emitted, and will likely break
ode relying on some parti
ular ordering. The majority of su
h top-level
asm statements, though,
an be repla
ed by se
tion attributes.
76
Constru
ts webs as
ommonly used for register allo
ation purposes and assign
ea
h web individual pseudo register. This allows the register allo
ation pass
to operate on pseudos dire
tly, but also strengthens several other optimization
passes, su
h as CSE, loop optimizer and trivial dead
ode remover. It
an,
however, make debugging impossible, sin
e variables will no longer stay in a
\home register".
Enabled at levels `-O2', `-O3', `-Os', on targets where the default format for
debugging information supports variable tra
king.
-fno- prop-registers
After register allo
ation and post-register allo
ation instru
tion splitting, we
perform a
opy-propagation pass to try to redu
e s
heduling dependen
ies and
o
asionally eliminate the
opy.
Disabled at levels `-O', `-O2', `-O3', `-Os'.
-fprofile-generate
Enable options usually used for instrumenting appli
ation to produ
e prole
useful for later re
ompilation with prole feedba
k based optimization. You
must use `-fprofile-generate' both when
ompiling and when linking your
program.
The following options are enabled: -fprofile-ar
s, -fprofile-values, fvpt.
-fprofile-use
The following options
ontrol
ompiler behavior regarding
oating point arithmeti
.
These options trade o between speed and
orre
tness. All must be spe
i
ally enabled.
-ffloat-store
Do not store
oating point variables in registers, and inhibit other options that
might
hange whether a
oating point value is taken from a register or memory.
77
This option prevents undesirable ex
ess pre
ision on ma
hines su
h as the 68000
where the
oating registers (of the 68881) keep more pre
ision than a double
is supposed to have. Similarly for the x86 ar
hite
ture. For most programs,
the ex
ess pre
ision does only good, but a few programs rely on the pre
ise
denition of IEEE
oating point. Use `-ffloat-store' for su
h programs, after
modifying them to store all pertinent intermediate
omputations into variables.
-ffast-math
-fno-math-errno
Do not set ERRNO after
alling math fun
tions that are exe
uted with a single
instru
tion, e.g., sqrt. A program that relies on IEEE ex
eptions for math error
handling may want to use this
ag for speed while maintaining IEEE arithmeti
ompatibility.
This option should never be turned on by any `-O' option sin
e it
an result
in in
orre
t output for programs whi
h depend on an exa
t implementation of
IEEE or ISO rules/spe
i
ations for math fun
tions.
The default is `-fmath-errno'.
-funsafe-math-optimizations
Allow optimizations for
oating-point arithmeti
that (a) assume that arguments and results are valid and (b) may violate IEEE or ANSI standards.
When used at link-time, it may in
lude libraries or startup les that
hange the
default FPU
ontrol word or other similar optimizations.
This option should never be turned on by any `-O' option sin
e it
an result
in in
orre
t output for programs whi
h depend on an exa
t implementation of
IEEE or ISO rules/spe
i
ations for math fun
tions.
The default is `-fno-unsafe-math-optimizations'.
-ffinite-math-only
-fno-trapping-math
Compile ode assuming that oating-point operations annot generate uservisible traps. These traps in lude division by zero, over ow, under ow, inexa t result and invalid operation. This option implies `-fno-signaling-nans'.
78
Setting this option may allow faster
ode if one relies on \non-stop" IEEE
arithmeti
, for example.
This option should never be turned on by any `-O' option sin
e it
an result
in in
orre
t output for programs whi
h depend on an exa
t implementation of
IEEE or ISO rules/spe
i
ations for math fun
tions.
The default is `-ftrapping-math'.
-frounding-math
-fsignaling-nans
Compile
ode assuming that IEEE signaling NaNs may generate user-visible
traps during
oating-point operations. Setting this option disables optimizations that may
hange the number of ex
eptions visible with signaling NaNs.
This option implies `-ftrapping-math'.
This option
auses the prepro
essor ma
ro __SUPPORT_SNAN__ to be dened.
The default is `-fno-signaling-nans'.
This option is experimental and does not
urrently guarantee to disable all
GCC optimizations that ae
t signaling NaN behavior.
Treat
oating point
onstant as single pre
ision
onstant instead of impli
itly
onverting it to double pre
ision
onstant.
-f
x-limited-range
-fno-
x-limited-range
When enabled, this option states that a range redu
tion step is not needed
when performing
omplex division. The default is `-fno-
x-limited-range',
but is enabled by `-ffast-math'.
This option
ontrols the default setting of the ISO C99 CX_LIMITED_RANGE
pragma. Nevertheless, the option applies to all languages.
The following options
ontrol optimizations that may improve performan
e, but are not
enabled by any `-O' options. This se
tion in
ludes experimental options that may produ
e
broken
ode.
79
-fbran h-probabilities
After running a program
ompiled with `-fprofile-ar
s' (see Se
tion 3.9 [Options for Debugging Your Program or g
, page 49), you
an
ompile it a se
ond time using `-fbran
h-probabilities', to improve optimizations based
on the number of times ea
h bran
h was taken. When the program
ompiled with `-fprofile-ar
s' exits it saves ar
exe
ution
ounts to a le
alled
`sour
ename.g
da' for ea
h sour
e le The information in this data le is very
dependent on the stru
ture of the generated
ode, so you must use the same
sour
e
ode and the same optimization options for both
ompilations.
With `-fbran
h-probabilities', GCC puts a `REG_BR_PROB' note on ea
h
`JUMP_INSN' and `CALL_INSN'. These
an be used to improve optimization.
Currently, they are only used in one pla
e: in `reorg.
', instead of guessing
whi
h path a bran
h is mostly to take, the `REG_BR_PROB' values are used to
exa
tly determine whi
h path is taken more often.
-fprofile-values
-fvpt
If
ombined with `-fprofile-ar
s', it adds
ode so that some data about
values of expressions in the program is gathered.
With `-fbran
h-probabilities', it reads ba
k the data gathered from proling values of expressions and adds `REG_VALUE_PROFILE' notes to instru
tions
for their later usage in optimizations.
Enabled with `-fprofile-generate' and `-fprofile-use'.
If
ombined with `-fprofile-ar
s', it instru
ts the
ompiler to add a
ode to
gather information about values of expressions.
With `-fbran
h-probabilities', it reads ba
k the data gathered and a
tually
performs the optimizations based on them. Currently the optimizations in
lude
spe
ialization of division operation using the knowledge about the value of the
denominator.
-frename-registers
Attempt to avoid false dependen
ies in s
heduled
ode by making use of registers
left over after register allo
ation. This optimization will most benet pro
essors
with lots of registers. Depending on the debug information format adopted by
the target, however, it
an make debugging impossible, sin
e variables will no
longer stay in a \home register".
80
plies the
ontrol
ow of the fun
tion allowing other optimizations to do better
job.
Enabled with `-fprofile-use'.
-funroll-loops
-funroll-all-loops
Unroll all loops, even if their number of iterations is un
ertain when the loop is
entered. This usually makes programs run more slowly. `-funroll-all-loops'
implies the same options as `-funroll-loops'.
-fpeel-loops
Peels the loops for that there is enough information that they do not roll mu
h
(from prole feedba
k). It also turns on
omplete loop peeling (i.e.
omplete
removal of loops with small
onstant number of iterations).
Enabled with `-fprofile-use'.
-fmove-loop-invariants
Enables the loop invariant motion pass in the new loop optimizer. Enabled at
level `-O1'
-funswit h-loops
Move bran
hes with loop invariant
onditions out of the loop, with dupli
ates
of the loop on both bran
hes (modied a
ording to result of the
ondition).
-fprefet h-loop-arrays
Pla
e ea
h fun
tion or data item into its own se
tion in the output le if the
target supports arbitrary se
tions. The name of the fun
tion or the name of
the data item determines the se
tion's name in the output le.
Use these options on systems where the linker
an perform optimizations to
improve lo
ality of referen
e in the instru
tion spa
e. Most systems using the
ELF obje
t format and SPARC pro
essors running Solaris 2 have linkers with
su
h optimizations. AIX may have these optimizations in the future.
Only use these options when there are signi
ant benets from doing so. When
you spe
ify these options, the assembler and linker will
reate larger obje
t and
81
exe
utable les and will also be slower. You will not be able to use gprof on all
systems if you spe
ify this option and you may have problems with debugging
if you spe
ify both this option and `-g'.
-fbran
h-target-load-optimize
-fbran h-target-load-optimize2
-fbtr-bb-ex lusive
When performing bran
h target register load optimization, don't reuse bran
h
target registers in within any basi
blo
k.
In some pla
es, GCC uses various
onstants to
ontrol the amount of optimization that is done. For example, GCC will not inline fun
tions that
ontain more
that a
ertain number of instru
tions. You
an
ontrol some of these
onstants
on the
ommand-line using the `--param' option.
The names of spe
i
parameters, and the meaning of the values, are tied to
the internals of the
ompiler, and are subje
t to
hange without noti
e in future
releases.
In ea
h
ase, the value is an integer. The allowable
hoi
es for name are given
in the following table:
sra-max-stru
ture-size
The maximum stru
ture size, in bytes, at whi
h the s
alar repla
ement of aggregates (SRA) optimization will perform blo
k
opies.
The default value, 0, implies that GCC will sele
t the most appropriate size itself.
sra-field-stru ture-ratio
max- rossjump-edges
The maximum number of in
oming edges to
onsider for
rossjumping. The algorithm used by `-f
rossjumping' is O(N 2 ) in the
number of edges in
oming to ea
h blo
k. In
reasing values mean
more aggressive optimization, making the
ompile time in
rease
with probably small improvement in exe
utable size.
min- rossjump-insns
82
them. This value is ignored in the
ase where all instru
tions in
the blo
k being
rossjumped from are mat
hed. The default value
is 5.
max-goto-dupli
ation-insns
max-delay-slot-insn-sear h
max-delay-slot-live-sear h
When trying to ll delay slots, the maximum number of instru
tions to
onsider when sear
hing for a blo
k with valid live register
information. In
reasing this arbitrarily
hosen value means more
aggressive optimization, in
reasing the
ompile time. This parameter should be removed when the delay slot
ode is rewritten to
maintain the
ontrol-
ow graph.
max-g se-memory
The approximate maximum amount of memory that will be allo
ated in order to perform the global
ommon subexpression elimination optimization. If more memory than spe
ied is required,
the optimization will not be done.
max-g se-passes
max-pending-list-length
The maximum number of pending dependen
ies s
heduling will allow before
ushing the
urrent state and starting over. Large fun
tions with few bran
hes or
alls
an
reate ex
essively large lists
whi
h needlessly
onsume memory and resour
es.
max-inline-insns-single
Several parameters
ontrol the tree inliner used in g
. This number sets the maximum number of instru
tions (
ounted in GCC's
internal representation) in a single fun
tion that the tree inliner
will
onsider for inlining. This only ae
ts fun
tions de
lared inline and methods implemented in a
lass de
laration (C++). The
default value is 450.
83
max-inline-insns-auto
large-fun tion-insns
large-fun tion-growth
Spe
ies maximal growth of large fun
tion
aused by inlining in per
ents. This parameter is ignored when `-funit-at-a-time' is not
used. The default value is 100 whi
h limits large fun
tion growth
to 2.0 times the original size.
inline-unit-growth
max-inline-insns-re
ursive
max-inline-insns-re
ursive-auto
max-inline-re
ursive-depth
max-inline-re
ursive-depth-auto
Spe ify ost of all instru tion relative to simple arithmeti s operations (having ost of 1). In reasing this ost disqualify inlinining
84
of non-leaf fun
tions and at same time in
rease size of leaf fun
tion
that is believed to redu
e fun
tion size by being inlined. In effe
t it in
rease amount of inlining for
ode having large abstra
tion
penalty (many fun
tions that just pass the argumetns to other fun
tions) and de
rease inlining for
ode with low abstra
tion penalty.
Default value is 16.
max-unrolled-insns
max-average-unrolled-insns
max-unroll-times
max-peeled-insns
max-peel-times
max- ompletely-peeled-insns
max- ompletely-peel-times
max-unswit h-insns
max-unswit h-level
lim-expensive
iv-max- onsidered-uses
85
iv-always-prune- and-set-bound
max-iterations-to-tra k
The maximum number of iterations of a loop the brute for e algorithm for analysis of # of iterations of the loop tries to evaluate.
Sele
t fra
tion of the maximal frequen
y of exe
utions of basi
blo
k
in fun
tion given basi
blo
k needs to have to be
onsidered hot
This value is used to limit superblo
k formation on
e the given per
entage of exe
uted instru
tions is
overed. This limits unne
essary
ode size expansion.
The `tra
er-dynami
-
overage-feedba
k' is used only when prole feedba
k is available. The real proles (as opposed to stati
ally
estimated ones) are mu
h less balan
ed allowing the threshold to
be larger value.
Stop tail dupli
ation on
e
ode growth has rea
hed given per
entage. This is rather hokey argument, as most of the dupli
ates will
be eliminated later in
ross jumping, so it may be set to mu
h
higher values than is the desired
ode growth.
Stop forward growth if the best edge do have probability lower than
this threshold.
Similarly to `tra
er-dynami
-
overage' two values are present,
one for
ompilation for prole feedba
k and one for
ompilation
without. The value for
ompilation with prole feedba
k needs to
be more
onservative (higher) in order to make tra
er ee
tive.
max- se-path-length
86
global-var-threshold
Counts the number of fun
tion
alls (n) and the number of
all
lobbered variables (v). If nxv is larger than this limit, a single
arti
ial variable will be
reated to represent all the
all-
lobbered
variables at fun
tion
all sites. This arti
ial variable will then be
made to alias every
all-
lobbered variable. (done as int * size_t
on the host ma
hine; beware over
ow).
max-aliased-vops
gg -min-expand
GCC uses a garbage
olle
tor to manage its own memory allo
ation. This parameter spe
ies the minimum per
entage by whi
h
the garbage
olle
tor's heap should be allowed to expand between
olle
tions. Tuning this may improve
ompilation speed; it has no
ee
t on
ode generation.
The default is 30% + 70% * (RAM/1GB) with an upper bound
of 100% when RAM >= 1GB. If getrlimit is available, the notion of "RAM" is the smallest of a
tual RAM and RLIMIT_DATA or
RLIMIT_AS. If GCC is not able to
al
ulate RAM on a parti
ular
platform, the lower bound of 30% is used. Setting this parameter
and `gg
-min-heapsize' to zero
auses a full
olle
tion to o
ur
at every opportunity. This is extremely slow, but
an be useful for
debugging.
gg -min-heapsize
max-reload-sear h-insns
87
Used by basi
blo
k reordering pass to de
ide whether to use un
onditional bran
h or dupli
ate the
ode on its destination. Code
is dupli
ated when its estimated size is smaller than this value multiplied by the estimated size of un
onditional jump in the hot spots
of the program.
The `reorder-blo
k-dupli
ate-feedba
k' is used only when prole feedba
k is available and may be set to higher values than
`reorder-blo
k-dupli
ate' sin
e information about the hot spots
is more a
urate.
max-s hed-region-blo ks
max-s hed-region-insns
max-last-value-rtl
integer-share-limit
Small integer
onstants
an use a shared data stru
ture, redu
ing
the
ompiler's memory usage and in
reasing its speed. This sets the
maximum value of a shared integer
onstant's. The default value
is 256.
88
undo
umented and subje
t to
hange, so whenever possible you should avoid
using `-Wp' and let the driver handle the options instead.
-Xprepro
essor option
-D name
Pass option as an option to the prepro
essor. You
an use this to supply systemspe
i
prepro
essor options whi
h GCC does not know how to re
ognize.
If you want to pass an option that takes an argument, you must use
`-Xprepro
essor' twi
e, on
e for the option and on
e for the argument.
Predene name as a ma
ro, with denition 1.
-D name =definition
-U name
-undef
-I dir
-o file
-Wall
The
ontents of denition are tokenized and pro
essed as if they appeared during translation phase three in a `#define' dire
tive. In parti
ular, the denition
will be trun
ated by embedded newline
hara
ters.
If you are invoking the prepro
essor from a shell or shell-like program you may
need to use the shell's quoting syntax to prote
t
hara
ters su
h as spa
es that
have a meaning in the shell syntax.
If you wish to dene a fun
tion-like ma
ro on the
ommand line, write its
argument list with surrounding parentheses before the equals sign (if any).
Parentheses are meaningful to most shells, so you will need to quote the option.
With sh and
sh, `-D'name (args...)=definition '' works.
`-D' and `-U' options are pro
essed in the order they are given on the
ommand
line. All `-ima
ros file ' and `-in
lude file ' options are pro
essed after all
`-D' and `-U' options.
Can
el any previous denition of name, either built in or provided with a `-D'
option.
Do not predene any system-spe
i
or GCC-spe
i
ma
ros. The standard
predened ma
ros remain dened.
Add the dire
tory dir to the list of dire
tories to be sear
hed for header les.
Dire
tories named by `-I' are sear
hed before the standard system in
lude dire
tories. If the dire
tory dir is a standard system in
lude dire
tory, the option
is ignored to ensure that the default sear
h order for system dire
tories and the
spe
ial treatment of system headers are not defeated .
Write output to le. This is the same as spe
ifying le as the se
ond non-option
argument to
pp. g
has a dierent interpretation of a se
ond non-option
argument, so you must use `-o' to spe
ify the output le.
Turns on all optional warnings whi
h are desirable for normal
ode. At present
this is `-W
omment', `-Wtrigraphs', `-Wmulti
har' and a warning about integer
promotion
ausing a
hange of sign in #if expressions. Note that many of the
prepro
essor's warnings are on by default and have no options to
ontrol them.
-W
omment
-W
omments
89
-Wtrigraphs
Most trigraphs in
omments
annot ae
t the meaning of the program. However, a trigraph that would form an es
aped newline (`??/' at the end of a line)
an, by
hanging where the
omment begins or ends. Therefore, only trigraphs
that would form es
aped newlines produ
e warnings inside a
omment.
This option is implied by `-Wall'. If `-Wall' is not given, this option
is still enabled unless trigraphs are enabled. To get trigraph
onversion
without warnings, but get the other `-Wall' warnings, use `-trigraphs -Wall
-Wno-trigraphs'.
-Wtraditional
Warn about
ertain
onstru
ts that behave dierently in traditional and ISO
C. Also warn about ISO C
onstru
ts that have no traditional C equivalent,
and problemati
onstru
ts whi
h should be avoided.
-Wimport Warn the rst time `#import' is used.
-Wundef Warn whenever an identier whi
h is not a ma
ro is en
ountered in an `#if'
dire
tive, outside of `defined'. Su
h identiers are repla
ed with zero.
-Wunused-ma
ros
Warn about ma
ros dened in the main le that are unused. A ma
ro is used if
it is expanded or tested for existen
e at least on
e. The prepro
essor will also
warn if the ma
ro has not been used at the time it is redened or undened.
Built-in ma
ros, ma
ros dened on the
ommand line, and ma
ros dened in
in
lude les are not warned about.
Note: If a ma
ro is a
tually used, but only used in skipped
onditional blo
ks,
then CPP will report it as unused. To avoid the warning in su
h a
ase, you
might improve the s
ope of the ma
ro's denition by, for example, moving it
into the rst skipped blo
k. Alternatively, you
ould provide a dummy use with
something like:
#if defined the_ma
ro_
ausing_the_warning
#endif
-Wendif-labels
-Werror
The se
ond and third FOO should be in
omments, but often are not in older
programs. This warning is on by default.
Make all warnings into hard errors. Sour
e
ode whi
h triggers warnings will
be reje
ted.
-Wsystem-headers
Issue warnings for
ode in system headers. These are normally unhelpful in
nding bugs in your own
ode, therefore suppressed. If you are responsible for
the system library, you may want to see them.
90
-w
-pedanti
Suppress all warnings, in
luding those whi
h GNU CPP issues by default.
Issue all the mandatory diagnosti
s listed in the C standard. Some of them are
left out by default, sin
e they trigger frequently on harmless
ode.
-pedanti -errors
Issue all the mandatory diagnosti
s, and make all mandatory diagnosti
s
into errors. This in
ludes mandatory diagnosti
s that GCC issues without
`-pedanti
' but treats as warnings.
-M
-MM
-MF file
-MG
Instead of outputting the result of prepro
essing, output a rule suitable for make
des
ribing the dependen
ies of the main sour
e le. The prepro
essor outputs
one make rule
ontaining the obje
t le name for that sour
e le, a
olon, and
the names of all the in
luded les, in
luding those
oming from `-in
lude' or
`-ima
ros'
ommand line options.
Unless spe
ied expli
itly (with `-MT' or `-MQ'), the obje
t le name
onsists of
the basename of the sour
e le with any sux repla
ed with obje
t le sux.
If there are many in
luded les then the rule is split into several lines using
`\'-newline. The rule has no
ommands.
This option does not suppress the prepro
essor's debug output, su
h as `-dM'.
To avoid mixing su
h debug output with the dependen
y rules you should expli
itly spe
ify the dependen
y output le with `-MF', or use an environment
variable like DEPENDENCIES_OUTPUT (see Se
tion 3.19 [Environment Variables,
page 184). Debug output will still be sent to the regular output stream as
normal.
Passing `-M' to the driver implies `-E', and suppresses warnings with an impli
it
`-w'.
Like `-M' but do not mention header les that are found in system header
dire
tories, nor header les that are in
luded, dire
tly or indire
tly, from su
h
a header.
This implies that the
hoi
e of angle bra
kets or double quotes in an `#in
lude'
dire
tive does not in itself determine whether that header will appear in `-MM'
dependen
y output. This is a slight
hange in semanti
s from GCC versions
3.0 and earlier.
When used with `-M' or `-MM', spe
ies a le to write the dependen
ies to. If
no `-MF' swit
h is given the prepro
essor sends the rules to the same pla
e it
would have sent prepro
essed output.
When used with the driver options `-MD' or `-MMD', `-MF' overrides the default
dependen
y output le.
In
onjun
tion with an option su
h as `-M' requesting dependen
y generation,
`-MG' assumes missing header les are generated les and adds them to the
dependen
y list without raising an error. The dependen
y lename is taken
dire
tly from the #in
lude dire
tive without prepending any path. `-MG' also
suppresses prepro
essed output, as a missing header le renders this useless.
This feature is used in automati
updating of makeles.
91
This option instru
ts CPP to add a phony target for ea
h dependen
y other
than the main le,
ausing ea
h to depend on nothing. These dummy rules
work around errors make gives if you remove header les without updating the
`Makefile' to mat
h.
This is typi
al output:
-MP
-MT target
-MQ target
Same as `-MT', but it quotes any
hara
ters whi
h are spe
ial to Make.
`-MQ '$(objpfx)foo.o'' gives
$$(objpfx)foo.o: foo.
The default target is automati
ally quoted, as if it were given with `-MQ'.
-MD
`-MD' is equivalent to `-M -MF file ', ex
ept that `-E' is not implied. The driver
determines le based on whether an `-o' option is given. If it is, the driver uses
its argument but with a sux of `.d', otherwise it take the basename of the
input le and applies a `.d' sux.
If `-MD' is used in
onjun
tion with `-E', any `-o' swit
h is understood to spe
ify
the dependen
y output le (but see [-MF, page 90), but if used without `-E',
ea
h `-o' is understood to spe
ify a target obje
t le.
Sin
e `-E' is not implied, `-MD'
an be used to generate a dependen
y output
le as a side-ee
t of the
ompilation pro
ess.
-MMD
Like `-MD' ex ept mention only user header les, not system header les.
-fp h-deps
When using pre
ompiled headers (see Se
tion 3.20 [Pre
ompiled Headers,
page 187), this
ag will
ause the dependen
y-output
ags to also list the
les from the pre
ompiled header's dependen
ies. If not spe
ied only the
pre
ompiled header would be listed and not the les that were used to
reate
it be
ause those les are not
onsulted when a pre
ompiled header is used.
This option allows use of a pre
ompiled header (see Se
tion 3.20 [Pre
ompiled
Headers, page 187) together with `-E'. It inserts a spe
ial #pragma, #pragma
GCC p
h_prepro
ess "<filename>" in the output to mark the pla
e where the
92
pre
ompiled header was found, and its lename. When `-fprepro
essed' is in
use, GCC re
ognizes this #pragma and loads the PCH.
This option is o by default, be
ause the resulting prepro
essed output is only
really suitable as input to GCC. It is swit
hed on by `-save-temps'.
You should not write this #pragma in your own
ode, but it is safe to edit the
lename if the PCH le is available in a dierent lo
ation. The lename may
be absolute or it may be relative to GCC's
urrent dire
tory.
-x
-x
-x
-x
++
obje
tive-
assembler-with-
pp
Spe
ify the sour
e language: C, C++, Obje
tive-C, or assembly. This has nothing to do with standards
onforman
e or extensions; it merely sele
ts whi
h
base syntax to expe
t. If you give none of these options,
pp will dedu
e the
language from the extension of the sour
e le: `.
', `.
', `.m', or `.S'. Some
other
ommon extensions for C++ and assembly are also re
ognized. If
pp does
not re
ognize the extension, it will treat the le as C; this is the most generi
mode.
Note: Previous versions of
pp a
epted a `-lang' option whi
h sele
ted both
the language and the standards
onforman
e level. This option has been removed, be
ause it
on
i
ts with the `-l' option.
-std=standard
-ansi
Spe
ify the standard to whi
h the
ode should
onform. Currently CPP knows
about C and C++ standards; others may be added in the future.
iso9899:1990
89
The ISO C standard from 1990. `
89' is the
ustomary shorthand
iso9899:199409
iso9899:1999
99
iso9899:199x
9x
The revised ISO C standard, published in De
ember 1999. Before
gnu89
gnu99
gnu9x
++98
gnu++98
-I-
-nostdin
93
Split the in
lude path. Any dire
tories spe
ied with `-I' options before `-I-'
are sear
hed only for headers requested with #in
lude "file "; they are not
sear
hed for #in
lude <file >. If additional dire
tories are spe
ied with `-I'
options after the `-I-', those dire
tories are sear
hed for all `#in
lude' dire
tives.
In addition, `-I-' inhibits the use of the dire
tory of the
urrent le dire
tory as the rst sear
h dire
tory for #in
lude "file ". This option has been
depre
ated.
Do not sear
h the standard system dire
tories for header les. Only the dire
tories you have spe
ied with `-I' options (and the dire
tory of the
urrent le,
if appropriate) are sear
hed.
-nostdin ++
Do not sear
h for header les in the C++-spe
i
standard dire
tories, but do
still sear
h the other standard dire
tories. (This option is used when building
the C++ library.)
Pro
ess le as if #in
lude "file" appeared as the rst line of the primary
sour
e le. However, the rst dire
tory sear
hed for le is the prepro
essor's
working dire
tory instead of the dire
tory
ontaining the main sour
e le. If
not found there, it is sear
hed for in the remainder of the #in
lude "..."
sear
h
hain as normal.
If multiple `-in
lude' options are given, the les are in
luded in the order they
appear on the
ommand line.
Exa
tly like `-in
lude', ex
ept that any output produ
ed by s
anning le is
thrown away. Ma
ros it denes remain dened. This allows you to a
quire all
the ma
ros from a header without also pro
essing its de
larations.
All les spe
ied by `-ima
ros' are pro
essed before all les spe
ied by
`-in
lude'.
-idirafter dir
Sear
h dir for header les, but do it after all dire
tories spe
ied with `-I' and
the standard system dire
tories have been exhausted. dir is treated as a system
in
lude dire
tory.
-iprefix prefix
Spe
ify prex as the prex for subsequent `-iwithprefix' options. If the prex
represents a dire
tory, you should in
lude the nal `/'.
-iwithprefix dir
-iwithprefixbefore dir
Append dir to the prex spe
ied previously with `-iprefix', and add the
resulting dire
tory to the in
lude sear
h path. `-iwithprefixbefore' puts it
in the same pla
e `-I' would; `-iwithprefix' puts it where `-idirafter' would.
94
-isystem dir
Sear
h dir for header les, after all dire
tories spe
ied by `-I' but before the
standard system dire
tories. Mark it as a system dire
tory, so that it gets the
same spe
ial treatment as is applied to the standard system dire
tories.
-iquote dir
Sear
h dir only for header les requested with #in
lude "file "; they are not
sear
hed for #in
lude <file >, before all dire
tories spe
ied by `-I' and before
the standard system dire
tories.
-fdollars-in-identifiers
A
ept `$' in identiers.
-fprepro
essed
Indi
ate to the prepro
essor that the input le has already been prepro
essed.
This suppresses things like ma
ro expansion, trigraph
onversion, es
aped newline spli
ing, and pro
essing of most dire
tives. The prepro
essor still re
ognizes
and removes
omments, so that you
an pass a le prepro
essed with `-C' to the
ompiler without problems. In this mode the integrated prepro
essor is little
more than a tokenizer for the front ends.
`-fprepro
essed' is impli
it if the input le has one of the extensions `.i',
`.ii' or `.mi'. These are the extensions that GCC uses for prepro
essed les
reated by `-save-temps'.
-ftabstop=width
Set the distan
e between tab stops. This helps the prepro
essor report
orre
t
olumn numbers in warnings or errors, even if tabs appear on the line. If the
value is less than 1 or greater than 100, the option is ignored. The default is 8.
Set the exe
ution
hara
ter set, used for string and
hara
ter
onstants. The
default is UTF-8.
harset
an be any en
oding supported by the system's i
onv
library routine.
Set the wide exe
ution
hara
ter set, used for wide string and
hara
ter
onstants. The default is UTF-32 or UTF-16, whi
hever
orresponds to the width
of w
har_t. As with `-fexe
-
harset',
harset
an be any en
oding supported
by the system's i
onv library routine; however, you will have problems with
en
odings that do not t exa
tly in w
har_t.
Set the input
hara
ter set, used for translation from the
hara
ter set of the
input le to the sour
e
hara
ter set used by GCC. If the lo
ale does not spe
ify,
or GCC
annot get this information from the lo
ale, the default is UTF-8. This
an be overridden by either the lo
ale or this
ommand line option. Currently
the
ommand line option takes pre
eden
e if there's a
on
i
t.
harset
an be
any en
oding supported by the system's i
onv library routine.
-fworking-dire tory
Enable generation of linemarkers in the prepro
essor output that will let the
ompiler know the
urrent working dire
tory at the time of prepro
essing.
95
When this option is enabled, the prepro
essor will emit, after the initial linemarker, a se
ond linemarker with the
urrent working dire
tory followed by
two slashes. GCC will use this dire
tory, when it's present in the prepro
essed input, as the dire
tory emitted as the
urrent working dire
tory in some
debugging information formats. This option is impli
itly enabled if debugging information is enabled, but this
an be inhibited with the negated form
`-fno-working-dire
tory'. If the `-P'
ag is present in the
ommand line,
this option has no ee
t, sin
e no #line dire
tives are emitted whatsoever.
-fno-show-
olumn
Do not print
olumn numbers in diagnosti
s. This may be ne
essary if diagnosti
s are being s
anned by a program that does not understand the
olumn
numbers, su
h as dejagnu.
Make an assertion with the predi
ate predi
ate and answer answer. This form is
preferred to the older form `-A predi
ate (answer )', whi
h is still supported,
be
ause it does not use shell spe
ial
hara
ters.
Can el an assertion with the predi ate predi ate and answer answer.
-dCHARS
CHARS is a sequen
e of one or more of the following
hara
ters, and must
not be pre
eded by a spa
e. Other
hara
ters are interpreted by the
ompiler
proper, or reserved for future versions of GCC, and so are silently ignored. If
you spe
ify
hara
ters whose behavior
on
i
ts, the result is undened.
`M'
Like `M' ex
ept in two respe
ts: it does not in
lude the predened
ma
ros, and it outputs both the `#define' dire
tives and the result
of prepro
essing. Both kinds of output go to the standard output
le.
`N'
Like `D', but emit only the ma ro names, not their expansions.
`I'
Output `#in lude' dire tives in addition to the result of prepro essing.
-P
Inhibit generation of linemarkers in the output from the prepro
essor. This
might be useful when running the prepro
essor on something that is not C
ode,
and will be sent to a program whi
h might be
onfused by the linemarkers.
-C
Do not dis
ard
omments. All
omments are passed through to the output le,
ex
ept for
omments in pro
essed dire
tives, whi
h are deleted along with the
dire
tive.
96
You should be prepared for side ee
ts when using `-C'; it
auses the prepro
essor to treat
omments as tokens in their own right. For example,
omments
appearing at the start of what would be a dire
tive line have the ee
t of turning that line into an ordinary sour
e line, sin
e the rst token on the line is no
longer a `#'.
-CC
Do not dis
ard
omments, in
luding during ma
ro expansion. This is like `-C',
ex
ept that
omments
ontained within ma
ros are also passed through to the
output le where the ma
ro is expanded.
In addition to the side-ee
ts of the `-C' option, the `-CC' option
auses all
C++-style
omments inside a ma
ro to be
onverted to C-style
omments. This
is to prevent later use of that ma
ro from inadvertently
ommenting out the
remainder of the sour
e line.
The `-CC' option is generally used to support lint
omments.
-traditional- pp
-trigraphs
Pro
ess trigraph sequen
es. These are three-
hara
ter sequen
es, all starting
with `??', that are dened by ISO C to stand for single
hara
ters. For example,
`??/' stands for `\', so `'??/n'' is a
hara
ter
onstant for a newline. By default,
GCC ignores trigraphs, but in standard-
onforming modes it
onverts them. See
the `-std' and `-ansi' options.
The nine trigraphs and their repla
ements are
Trigraph:
Repla
ement:
-remap
??(
[
??)
??<
{
??!
|
??~
Enable spe
ial
ode to work around le systems whi
h only permit very short
le names, su
h as MS-DOS.
--help
--target-help
Print text des
ribing all the
ommand line options instead of prepro
essing
anything.
-v
Verbose mode. Print out GNU CPP's version number at the beginning of
exe
ution, and report the nal form of the in
lude path.
-H
-version
--version
Print out GNU CPP's version number. With one dash, pro
eed to prepro
ess
as normal. With two dashes, exit immediately.
97
-Xassembler option
Pass option as an option to the assembler. You
an use this to supply systemspe
i
assembler options whi
h GCC does not know how to re
ognize.
If you want to pass an option that takes an argument, you must use
`-Xassembler' twi
e, on
e for the option and on
e for the argument.
A le name that does not end in a spe
ial re
ognized sux is
onsidered to
name an obje
t le or library. (Obje
t les are distinguished from libraries by
the linker a
ording to the le
ontents.) If linking is done, these obje
t les
are used as input to the linker.
-
-S
-E
-llibrary
-l library
If any of these options is used, then the linker is not run, and obje
t le names
should not be used as arguments. See Se
tion 3.2 [Overall Options, page 16.
Sear
h the library named library when linking. (The se
ond alternative with
the library as a separate argument is only for POSIX
omplian
e and is not
re
ommended.)
It makes a dieren
e where in the
ommand you write this option; the linker
sear
hes and pro
esses libraries and obje
t les in the order they are spe
ied. Thus, `foo.o -lz bar.o' sear
hes library `z' after le `foo.o' but before
`bar.o'. If `bar.o' refers to fun
tions in `z', those fun
tions may not be loaded.
The linker sear
hes a standard list of dire
tories for the library, whi
h is a
tually
a le named `liblibrary.a'. The linker then uses this le as if it had been
spe
ied pre
isely by name.
The dire
tories sear
hed in
lude several standard system dire
tories plus any
that you spe
ify with `-L'.
Normally the les found this way are library les|ar
hive les whose members
are obje
t les. The linker handles an ar
hive le by s
anning through it for
members whi
h dene symbols that have so far been referen
ed but not dened.
But if the le that is found is an ordinary obje
t le, it is linked in the usual
fashion. The only dieren
e between using an `-l' option and spe
ifying a le
98
-lobj
name is that `-l' surrounds library with `lib' and `.a' and sear
hes several
dire
tories.
You need this spe
ial
ase of the `-l' option in order to link an Obje
tive-C or
Obje
tive-C++ program.
-nostartfiles
Do not use the standard system startup les when linking. The standard system
libraries are used normally, unless `-nostdlib' or `-nodefaultlibs' is used.
-nodefaultlibs
Do not use the standard system libraries when linking. Only the libraries you
spe
ify will be passed to the linker. The standard startup les are used normally,
unless `-nostartfiles' is used. The
ompiler may generate
alls to mem
mp,
memset, mem
py and memmove. These entries are usually resolved by entries in
lib
. These entry points should be supplied through some other me
hanism
when this option is spe
ied.
-nostdlib
-pie
-s
-stati
-shared
Do not use the standard system startup les or libraries when linking. No
startup les and only the libraries you spe
ify will be passed to the linker. The
ompiler may generate
alls to mem
mp, memset, mem
py and memmove. These
entries are usually resolved by entries in lib
. These entry points should be
supplied through some other me
hanism when this option is spe
ied.
One of the standard libraries bypassed by `-nostdlib' and `-nodefaultlibs'
is `libg
.a', a library of internal subroutines that GCC uses to over
ome
short
omings of parti
ular ma
hines, or spe
ial needs for some languages. (See
se
tion \Interfa
ing to GCC Output" in GNU Compiler Colle
tion (GCC) Internals, for more dis
ussion of `libg
.a'.) In most
ases, you need `libg
.a'
even when you want to avoid other standard libraries. In other words, when you
spe
ify `-nostdlib' or `-nodefaultlibs' you should usually spe
ify `-lg
' as
well. This ensures that you have no unresolved referen
es to internal GCC
library subroutines. (For example, `__main', used to ensure C++
onstru
tors
will be
alled; see se
tion \
olle
t2" in GNU Compiler Colle
tion (GCC) Internals.)
Produ
e a position independent exe
utable on targets whi
h support it. For
predi
table results, you must also spe
ify the same set of options that were
used to generate
ode (`-fpie', `-fPIE', or model suboptions) when you spe
ify
this option.
Remove all symbol table and relo
ation information from the exe
utable.
On systems that support dynami
linking, this prevents linking with the shared
libraries. On other systems, this option has no ee
t.
Produ
e a shared obje
t whi
h
an then be linked with other obje
ts to form
an exe
utable. Not all systems support this option. For predi
table results,
you must also spe
ify the same set of options that were used to generate
ode
(`-fpi
', `-fPIC', or model suboptions) when you spe
ify this option.1
On some systems, `g
-shared' needs to build supplementary stub
ode for
onstru
tors to work. On
multi-libbed systems, `g
-shared' must sele
t the
orre
t support libraries to link against. Failing to
99
-shared-libg
-stati
-libg
On systems that provide `libg
' as a shared library, these options for
e the
use of either the shared or stati
version respe
tively. If no shared version of
`libg
' was built when the
ompiler was
ongured, these options have no
ee
t.
There are several situations in whi
h an appli
ation should use the shared
`libg
' instead of the stati
version. The most
ommon of these is when
the appli
ation wishes to throw and
at
h ex
eptions a
ross dierent shared libraries. In that
ase, ea
h of the libraries as well as the appli
ation itself should
use the shared `libg
'.
Therefore, the G++ and GCJ drivers automati
ally add `-shared-libg
'
whenever you build a shared library or a main exe
utable, be
ause C++ and
Java programs typi
ally use ex
eptions, so this is the right thing to do.
If, instead, you use the GCC driver to
reate shared libraries, you may nd
that they will not always be linked with the shared `libg
'. If GCC nds, at
its
onguration time, that you have a non-GNU linker or a GNU linker that
does not support option `--eh-frame-hdr', it will link the shared version of
`libg
' into shared libraries by default. Otherwise, it will take advantage of
the linker and optimize away the linking with the shared version of `libg
',
linking with the stati
version of libg
by default. This allows ex
eptions to
propagate through su
h shared libraries, without in
urring relo
ation
osts at
library load time.
However, if a library or main exe
utable is supposed to throw or
at
h ex
eptions, you must link it using the G++ or GCJ driver, as appropriate for the
languages used in the program, or using the option `-shared-libg
', su
h
that it is linked with the shared `libg
'.
-symboli
Bind referen
es to global symbols when building a shared obje
t. Warn about
any unresolved referen
es (unless overridden by the link editor option `-Xlinker
-z -Xlinker defs'). Only a few systems support this option.
-Xlinker option
Pass option as an option to the linker. You
an use this to supply system-spe
i
linker options whi
h GCC does not know how to re
ognize.
If you want to pass an option that takes an argument, you must use `-Xlinker'
twi
e, on
e for the option and on
e for the argument. For example, to
pass `-assert definitions', you must write `-Xlinker -assert -Xlinker
definitions'. It does not work to write `-Xlinker "-assert definitions"',
be
ause this passes the entire string as a single argument, whi
h is not what
the linker expe
ts.
supply the
orre
t
ags may lead to subtle defe
ts. Supplying them in
ases where they are not ne
essary
is inno
uous.
100
-Wl,option
-u symbol
Pretend the symbol symbol is undened, to for
e linking of library modules
to dene it. You
an use `-u' multiple times with dierent symbols to for
e
loading of additional library modules.
Add the dire
tory dir to the head of the list of dire
tories to be sear
hed for
header les only for the
ase of `#in
lude "file "'; they are not sear
hed for
`#in
lude <file >', otherwise just like `-I'.
-Ldir
Add dire
tory dir to the list of dire
tories to be sear
hed for `-l'.
-Bprefix This option spe
ies where to nd the exe
utables, libraries, in
lude les, and
data les of the
ompiler itself.
The
ompiler driver program runs one or more of the subprograms `
pp', `
1',
`as' and `ld'. It tries prex as a prex for ea
h program it tries to run, both with
and without `ma
hine /version /' (see Se
tion 3.16 [Target Options, page 108).
For ea
h subprogram to be run, the
ompiler driver rst tries the `-B' prex, if
any. If that name is not found, or if `-B' was not spe
ied, the driver tries two
standard prexes, whi
h are `/usr/lib/g
/' and `/usr/lo
al/lib/g
/'. If
neither of those results in a le name that is found, the unmodied program
name is sear
hed for using the dire
tories spe
ied in your PATH environment
variable.
The
ompiler will
he
k to see if the path provided by the `-B' refers to a
dire
tory, and if ne
essary it will add a dire
tory separator
hara
ter at the end
of the path.
101
`-B' prexes that ee
tively spe
ify dire
tory names also apply to libraries in
the linker, be
ause the
ompiler translates these options into `-L' options for
the linker. They also apply to in
ludes les in the prepro
essor, be
ause the
ompiler translates these options into `-isystem' options for the prepro
essor.
In this
ase, the
ompiler appends `in
lude' to the prex.
The run-time support le `libg
.a'
an also be sear
hed for using the `-B'
prex, if needed. If it is not found there, the two standard prexes above are
tried, and that is all. The le is left out of the link if it is not found by those
means.
Another way to spe
ify a prex mu
h like the `-B' prex is to use the environment variable GCC_EXEC_PREFIX. See Se
tion 3.19 [Environment Variables,
page 184.
As a spe
ial kludge, if the path provided by `-B' is `[dir/stageN /', where N
is a number in the range 0 to 9, then it will be repla
ed by `[dir/in
lude'.
This is to help with boot-strapping the
ompiler.
-spe
s=file
Pro
ess le after the
ompiler reads in the standard `spe
s' le, in order
to override the defaults that the `g
' driver program uses when determining what swit
hes to pass to `
1', `
1plus', `as', `ld', et
. More than one
`-spe
s=file '
an be spe
ied on the
ommand line, and they are pro
essed
in order, from left to right.
-I-
This option has been depre
ated. Please use `-iquote' instead for `-I' dire
tories before the `-I-' and remove the `-I-'. Any dire
tories you spe
ify with
`-I' options before the `-I-' option are sear
hed only for the
ase of `#in
lude
"file "'; they are not sear
hed for `#in
lude <file >'.
If additional dire
tories are spe
ied with `-I' options after the `-I-', these
dire
tories are sear
hed for all `#in
lude' dire
tives. (Ordinarily all `-I' dire
tories are used this way.)
In addition, the `-I-' option inhibits the use of the
urrent dire
tory (where
the
urrent input le
ame from) as the rst sear
h dire
tory for `#in
lude
"file "'. There is no way to override this ee
t of `-I-'. With `-I.' you
an spe
ify sear
hing the dire
tory whi
h was
urrent when the
ompiler was
invoked. That is not exa
tly the same as what the prepro
essor does by default,
but it is often satisfa
tory.
`-I-' does not inhibit the use of the standard system dire
tories for header les.
Thus, `-I-' and `-nostdin
' are independent.
3.15 Spe
ifying subpro
esses and the swit
hes to pass to
them
g
is a driver program. It performs its job by invoking a sequen
e of other programs to do
the work of
ompiling, assembling and linking. GCC interprets its
ommand-line parameters
and uses these to dedu
e whi
h programs it should invoke, and whi
h
ommand-line options
it ought to pla
e on their
ommand lines. This behavior is
ontrolled by spe
strings. In
most
ases there is one spe
string for ea
h program that GCC
an invoke, but a few
102
programs have multiple spe
strings to
ontrol their behavior. The spe
strings built into
GCC
an be overridden by using the `-spe
s='
ommand-line swit
h to spe
ify a spe
le.
Spe
les are plaintext les that are used to
onstru
t spe
strings. They
onsist of a
sequen
e of dire
tives separated by blank lines. The type of dire
tive is determined by the
rst non-whitespa
e
hara
ter on the line and it
an be one of the following:
%
ommand Issues a
ommand to the spe
le pro
essor. The
ommands that
an appear
here are:
%in
lude <file >
Sear
h for le and insert its text at the
urrent point in the spe
s
le.
*[spe _name :
This tells the
ompiler to
reate, override or delete the named spe
string. All
lines after this dire
tive up to the next dire
tive or blank line are
onsidered
to be the text for the spe
string. If this results in an empty string then the
spe
will be deleted. (Or, if the spe
did not exist, then nothing will happened.)
Otherwise, if the spe
does not
urrently exist a new spe
will be
reated. If the
spe
does exist then its
ontents will be overridden by the text of this dire
tive,
unless the rst
hara
ter of that text is the `+'
hara
ter, in whi
h
ase the text
will be appended to the spe
.
[suffix :
Creates a new `[suffix spe
' pair. All lines after this dire
tive and up to the
next dire
tive or blank line are
onsidered to make up the spe
string for the
indi
ated sux. When the
ompiler en
ounters an input le with the named
sux, it will pro
esses the spe
string in order to work out how to
ompile that
le. For example:
.ZZ:
z-
ompile -input %i
This says that any input le whose name ends in `.ZZ' should be passed to the
program `z-
ompile', whi
h should be invoked with the
ommand-line swit
h
`-input' and with the result of performing the `%i' substitution. (See below.)
As an alternative to providing a spe
string, the text that follows a sux dire
tive
an be one of the following:
language
This says that the sux is an alias for a known language. This is
similar to using the `-x'
ommand-line swit
h to GCC to spe
ify a
language expli
itly. For example:
.ZZ:
++
#name
103
GCC already has an extensive list of suxes built into it. This dire
tive will
add an entry to the end of the list of suxes, but sin
e the list is sear
hed from
the end ba
kwards, it is ee
tively possible to override earlier entries using this
te
hnique.
GCC has the following spe
strings built into it. Spe
les
an override these strings or
reate their own. Note that individual targets
an also add their own spe
strings to this
list.
asm
asm_final
pp
1
1plus
endfile
link
lib
libg
linker
predefines
signed_
har
startfile
old_lib
*lib:
--start-group -lg
-l
-leval1 --end-group %(old_lib)
This example renames the spe
alled `lib' to `old_lib' and then overrides the previous
denition of `lib' with a new one. The new denition adds in some extra
ommand-line
options before in
luding the text of the old denition.
Spe
strings are a list of
ommand-line options to be passed to their
orresponding program. In addition, the spe
strings
an
ontain `%'-prexed sequen
es to substitute variable
text or to
onditionally insert text into the
ommand line. Using these
onstru
ts it is
possible to generate quite
omplex
ommand lines.
Here is a table of all dened `%'-sequen
es for spe
strings. Note that spa
es are not
generated automati
ally around the results of expanding these sequen
es. Therefore you
an
on
atenate them together or
ombine them with
onstant text in a single argument.
%%
%i
%b
Substitute the basename of the input le being pro
essed. This is the substring
up to (and not in
luding) the last period and not in
luding the dire
tory.
%B
This is the same as `%b', but in lude the le sux (text after the last period).
%d
104
%gsuffix Substitute a le name that has sux sux and is
hosen on
e per
ompilation,
and mark the argument in the same way as `%d'. To redu
e exposure to denial-
of-servi
e atta
ks, the le name is now
hosen in a way that is hard to predi
t
even when previously
hosen le names are known. For example, `%g.s ...
%g.o ... %g.s' might turn into `
UVUUAU.s
XYAXZ12.o
UVUUAU.s'. sux
mat
hes the regexp `[.A-Za-z*' or the spe
ial string `%O', whi
h is treated
exa
tly as if `%O' had been prepro
essed. Previously, `%g' was simply substituted
with a le name
hosen on
e per
ompilation, without regard to any appended
sux (whi
h was therefore treated just like ordinary text), making su
h atta
ks
more likely to su
eed.
%usuffix Like `%g', but generates a new temporary le name even if `%usuffix ' was
already seen.
%Usuffix Substitutes the last le name generated with `%usuffix ', generating a new one
if there is no su
h last le name. In the absen
e of any `%usuffix ', this is
just like `%gsuffix ', ex
ept they don't share the same sux spa
e, so `%g.s
... %U.s ... %g.s ... %U.s' would involve the generation of two distin
t le
names, one for ea
h `%g.s' and another for ea
h `%U.s'. Previously, `%U' was
simply substituted with a le name
hosen for the previous `%u', without regard
%jsuffix Substitutes the name of the HOST_BIT_BUCKET, if any, and if it is writable, and
%|suffix
%msuffix Like `%g', ex
ept if `-pipe' is in ee
t. In that
ase `%|' substitutes a single
dash and `%m' substitutes nothing at all. These are the two most
ommon
ways to instru
t a program that it should read from standard input or write
to standard output. If you need something more elaborate you
an use an
`%{pipe:X}'
onstru
t: see for example `f/lang-spe
s.h'.
%.SUFFIX Substitutes .SUFFIX for the suxes of a mat
hed swit
h's args when it is
subsequently output with `%*'. SUFFIX is terminated by the next spa
e or %.
%w
Marks the argument
ontaining or following the `%w' as the designated output
le of this
ompilation. This puts the argument into the sequen
e of arguments
that `%o' will substitute later.
%o
Substitutes the names of all the output les, with spa
es automati
ally pla
ed
around them. You should write spa
es around the `%o' as well or the results are
undened. `%o' is for use in the spe
s for running the linker. Input les whose
names have no re
ognized sux are not
ompiled at all, but they are in
luded
among the output les, so they will be linked.
%O
Substitutes the sux for obje
t les. Note that this is handled spe
ially when
it immediately follows `%g, %u, or %U', be
ause of the need for those to form
omplete le names. The handling is su
h that `%O' is treated exa
tly as if it
had already been substituted, ex
ept that `%g, %u, and %U' do not
urrently
%p
%P
%I
%s
%estr
%(name )
%[name
support additional sux
hara
ters following `%O' as they would following, for
example, `.o'.
Substitutes the standard ma
ro predenitions for the
urrent target ma
hine.
Use this when running
pp.
Like `%p', but puts `__' before and after the name of ea
h predened ma
ro,
ex
ept for ma
ros that start with `__' or with `_L ', where L is an upper
ase
letter. This is for ISO C.
Substitute any of `-iprefix' (made from GCC_EXEC_PREFIX), `-isysroot'
(made from TARGET_SYSTEM_ROOT), and `-isystem' (made from
COMPILER_PATH and `-B' options) as ne
essary.
Current argument is the name of a library or startup le of some sort. Sear
h
for that le in a standard list of dire
tories and substitute the full name found.
Print str as an error message. str is terminated by a newline. Use this when
in
onsistent options are dete
ted.
Substitute the
ontents of spe
string name at this point.
Like `%(...)' but put `__' around `-D' arguments.
%x{option }
%X
%Y
%Z
%a
%A
%l
%D
%L
%G
%S
%E
105
106
%C
%1
%2
%*
%<S
Pro
ess the
pp spe
. This is used to
onstru
t the arguments to be passed to
the C prepro
essor.
Pro
ess the
1 spe
. This is used to
onstru
t the options to be passed to the
a
tual C
ompiler (`
1').
Pro
ess the
1plus spe
. This is used to
onstru
t the options to be passed
to the a
tual C++
ompiler (`
1plus').
Substitute the variable part of a mat
hed option. See below. Note that ea
h
omma in the substituted string is repla
ed by a single spa
e.
Remove all o
urren
es of -S from the
ommand line. Note|this
ommand is
position dependent. `%'
ommands in the spe
string before this one will see -S,
`%'
ommands in the spe
string after this one will not.
Call the named fun
tion fun
tion, passing it args. args is rst pro
essed as a
nested spe
string, then split into an argument ve
tor in the usual fashion. The
fun
tion returns a string whi
h is pro
essed as if it had appeared literally as
part of the
urrent spe
.
The following built-in spe
fun
tions are provided:
if-exists
if-exists-else
The if-exists-else spe
fun
tion is similar to the if-exists spe
fun
tion, ex
ept that it takes two arguments. The rst argument is
an absolute pathname to a le. If the le exists, if-exists-else
returns the pathname. If it does not exist, it returns the se
ond
argument. This way, if-exists-else
an be used to sele
t one
le or another, based on the existen
e of the rst. Here is a small
example of its usage:
*startfile:
rt0%O%s %:if-exists(
rti%O%s) \
%:if-exists-else(
rtbeginT%O%s
rtbegin%O%s)
repla
e-outfile
The repla
e-outfile spe
fun
tion takes two arguments. It looks
for the rst argument in the outles array and repla
es it with the
se
ond argument. Here is a small example of its usage:
%{fgnu-runtime:%:repla
e-outfile(-lobj
-lobj
-gnu)}
%{S}
Substitutes the -S swit
h, if that swit
h was given to GCC. If that swit
h was
not spe
ied, this substitutes nothing. Note that the leading dash is omitted
when spe
ifying this option, and it is automati
ally inserted if the substitution
is performed. Thus the spe
string `%{foo}' would mat
h the
ommand-line
option `-foo' and would output the
ommand line option `-foo'.
107
will output the following
ommand-line options from the following input
ommand-line options:
fred.
jim.d
-d fred.
-d jim.d
-foo
-bar
-foo
-bar
-baz
-boggle
-baz -boggle
-baz -boggle
The
onditional text X in a %{S:X} or similar
onstru
t may
ontain other nested `%'
onstru
ts or spa
es, or even newlines. They are pro
essed as usual, as des
ribed above.
Trailing white spa
e in X is ignored. White spa
e may also appear anywhere on the left side
of the
olon in these
onstru
ts, ex
ept between . or * and the
orresponding word.
The `-O', `-f', `-m', and `-W' swit
hes are handled spe
i
ally in these
onstru
ts. If
another value of `-O' or the negated form of a `-f', `-m', or `-W' swit
h is found later in
the
ommand line, the earlier swit
h value is ignored, ex
ept with {S*} where S is just one
letter, whi
h passes all mat
hing options.
108
The
hara
ter `|' at the beginning of the predi
ate text is used to indi
ate that a
ommand
should be piped to the following
ommand, but only if `-pipe' is spe
ied.
It is built into GCC whi
h swit
hes take arguments and whi
h do not. (You might think
it would be useful to generalize this to allow ea
h
ompiler's spe
to say whi
h swit
hes
take arguments. But this
annot be done in a
onsistent fashion. GCC
annot even de
ide
whi
h input les have been spe
ied without knowing whi
h swit
hes take arguments, and
it must know whi
h input les to
ompile in order to tell whi
h
ompilers to run).
GCC also knows impli
itly that arguments starting in `-l' are to be treated as
ompiler
output les, and passed to the linker in their proper position among the other output les.
-V version
The `-V' and `-b' options work by running the `<ma
hine>-g
-<version>' exe
utable,
so there's no real reason to use them if you
an just run that dire
tly.
109
-EL
-EB
-mmangle- pu
Prepend the name of the
pu to all publi
symbol names. In multiple-pro
essor
systems, there are many ARC variants with dierent instru
tion and register
set
hara
teristi
s. This
ag prevents
ode
ompiled for one
pu to be linked
with
ode
ompiled for another. No fa
ility exists for handling variants that
are \almost identi
al". This is an all or nothing option.
-m pu= pu
Compile
ode for ARC variant
pu. Whi
h variants are supported depend on
the
onguration. All variants support `-m
pu=base', this is the default.
-mtext=text-se
tion
-mdata=data-se
tion
-mrodata=readonly-data-se
tion
Put fun
tions, data, and readonly data in text-se
tion, data-se
tion, and
readonly-data-se
tion respe
tively by default. This
an be overridden with the
se
tion attribute. See Se
tion 5.31 [Variable Attributes, page 233.
These `-m' options are dened for Advan
ed RISC Ma
hines (ARM) ar
hite
tures:
-mabi=name
Generate
ode for the spe
ied ABI. Permissible values are: `ap
s-gnu',
`atp
s', `aap
s' and `iwmmxt'.
-map s-frame
-map s
Generate a sta
k frame that is
ompliant with the ARM Pro
edure Call Standard for all fun
tions, even if this is not stri
tly ne
essary for
orre
t exe
ution of the
ode. Spe
ifying `-fomit-frame-pointer' with this option will
ause the sta
k frames not to be generated for leaf fun
tions. The default is
`-mno-ap
s-frame'.
This is a synonym for `-map
s-frame'.
-mthumb-interwork
Generate
ode whi
h supports
alling between the ARM and Thumb instru
tion
sets. Without this option the two instru
tion sets
annot be reliably used inside
one program. The default is `-mno-thumb-interwork', sin
e slightly larger
ode
is generated when `-mthumb-interwork' is spe
ied.
-mno-s hed-prolog
Prevent the reordering of instru
tions in the fun
tion prolog, or the merging of
those instru
tion with the instru
tions in the fun
tion's body. This means that
all fun
tions will start with a re
ognizable set of instru
tions (or in fa
t one of
a
hoi
e from a small set of dierent fun
tion prologues), and this information
110
an be used to lo
ate the start if fun
tions inside an exe
utable pie
e of
ode.
The default is `-ms
hed-prolog'.
-mhard-float
Generate output ontaining oating point instru tions. This is the default.
-msoft-float
Generate output
ontaining library
alls for
oating point. Warning: the requisite libraries are not available for all ARM targets. Normally the fa
ilities of
the ma
hine's usual C
ompiler are used, but this
annot be done dire
tly in
ross-
ompilation. You must make your own arrangements to provide suitable
library fun
tions for
ross-
ompilation.
`-msoft-float'
hanges the
alling
onvention in the output le; therefore, it
is only useful if you
ompile all of a program with this option. In parti
ular, you need to
ompile `libg
.a', the library that
omes with GCC, with
`-msoft-float' in order for this to work.
-mfloat-abi=name
Spe
ies whi
h ABI to use for
oating point values. Permissible values are:
`soft', `softfp' and `hard'.
`soft' and `hard' are equivalent to `-msoft-float' and `-mhard-float' respe
tively. `softfp' allows the generation of
oating point instru
tions, but
still uses the soft-
oat
alling
onventions.
-mlittle-endian
Generate
ode for a pro
essor running in little-endian mode. This is the default
for all standard
ongurations.
-mbig-endian
Generate
ode for a pro
essor running in big-endian mode; the default is to
ompile
ode for a little-endian pro
essor.
-mwords-little-endian
This option only applies when generating
ode for big-endian pro
essors. Generate
ode for a little-endian word order but a big-endian byte order. That is,
a byte order of the form `32107654'. Note: this option should only be used if
you require
ompatibility with
ode for big-endian ARM pro
essors generated
by versions of the
ompiler prior to 2.8.
-m pu=name
This spe
ies the name of the target ARM pro
essor. GCC uses this name to
determine what kind of instru
tions it
an emit when generating assembly
ode. Permissible names are: `arm2', `arm250', `arm3', `arm6', `arm60',
`arm600', `arm610', `arm620', `arm7', `arm7m', `arm7d', `arm7dm', `arm7di',
`arm7dmi', `arm70', `arm700', `arm700i', `arm710', `arm710
', `arm7100',
`arm7500', `arm7500fe', `arm7tdmi', `arm7tdmi-s', `arm8', `strongarm',
`strongarm110', `strongarm1100', `arm8', `arm810', `arm9', `arm9e',
`arm920', `arm920t', `arm922t', `arm946e-s', `arm966e-s', `arm968e-s',
`arm926ej-s', `arm940t', `arm9tdmi', `arm10tdmi', `arm1020t', `arm1026ej-s',
111
This option is very similar to the `-m
pu=' option, ex
ept that instead of spe
ifying the a
tual target pro
essor type, and hen
e restri
ting whi
h instru
tions
an be used, it spe
ies that GCC should tune the performan
e of the
ode as
if the target were of the type spe
ied in this option, but still
hoosing the instru
tions that it will generate based on the
pu spe
ied by a `-m
pu=' option.
For some ARM implementations better performan
e
an be obtained by using
this option.
-mar h=name
This spe
ies the name of the target ARM ar
hite
ture. GCC uses this name
to determine what kind of instru
tions it
an emit when generating assembly
ode. This option
an be used in
onjun
tion with or instead of the `-m
pu='
option. Permissible names are: `armv2', `armv2a', `armv3', `armv3m', `armv4',
`armv4t', `armv5', `armv5t', `armv5te', `armv6', `armv6j', `iwmmxt', `ep9312'.
-mfpu=name
-mfpe=number
-mfp=number
This spe
ies what
oating point hardware (or hardware emulation) is available
on the target. Permissible names are: `fpa', `fpe2', `fpe3', `maveri
k', `vfp'.
`-mfp' and `-mfpe' are synonyms for `-mfpu'=`fpe'number, for
ompatibility
with older versions of GCC.
If `-msoft-float' is spe
ied this spe
ies the format of
oating point values.
-mstru ture-size-boundary=n
The size of all stru
tures and unions will be rounded up to a multiple of the
number of bits set by this option. Permissible values are 8, 32 and 64. The
default value varies for dierent tool
hains. For the COFF targeted tool
hain
the default value is 8. A value of 64 is only allowed if the underlying ABI
supports it.
Spe
ifying the larger number
an produ
e faster, more e
ient
ode, but
an
also in
rease the size of the program. Dierent values are potentially in
ompatible. Code
ompiled with one value
annot ne
essarily expe
t to work with
ode
or libraries
ompiled with another value, if they ex
hange information using
stru
tures or unions.
-mabort-on-noreturn
Generate a
all to the fun
tion abort at the end of a noreturn fun
tion. It
will be exe
uted if the fun
tion tries to return.
-mlong-
alls
-mno-long-
alls
Tells the
ompiler to perform fun
tion
alls by rst loading the address of the
fun
tion into a register and then performing a subroutine
all on this register.
This swit
h is needed if the target fun
tion will lie outside of the 64 megabyte
addressing range of the oset based version of subroutine
all instru
tion.
112
Even if this swit
h is enabled, not all fun
tion
alls will be turned into long
alls.
The heuristi
is that stati
fun
tions, fun
tions whi
h have the `short-
all'
attribute, fun
tions that are inside the s
ope of a `#pragma no_long_
alls'
dire
tive and fun
tions whose denitions have already been
ompiled within
the
urrent
ompilation unit, will not be turned into long
alls. The ex
eption
to this rule is that weak fun
tion denitions, fun
tions with the `long-
all'
attribute or the `se
tion' attribute, and fun
tions that are within the s
ope of
a `#pragma long_
alls' dire
tive, will always be turned into long
alls.
This feature is not enabled by default. Spe
ifying `-mno-long-
alls' will restore the default behavior, as will pla
ing the fun
tion
alls within the s
ope of
a `#pragma long_
alls_off' dire
tive. Note these swit
hes have no ee
t on
how the
ompiler generates
ode to handle fun
tion
alls via fun
tion pointers.
-mnop-fun-dllimport
-msingle-pi -base
Treat the register used for PIC addressing as read-only, rather than loading
it in the prologue for ea
h fun
tion. The run-time system is responsible for
initializing this register with an appropriate value before exe
ution begins.
-mpi -register=reg
Spe
ify the register to be used for PIC addressing. The default is R10 unless
sta
k-
he
king is enabled, when R9 is used.
-m irrus-fix-invalid-insns
Insert NOPs into the instru
tion stream to in order to work around problems
with invalid Maveri
k instru
tion
ombinations. This option is only valid if the
`-m
pu=ep9312' option has been used to enable generation of instru
tions for
the Cirrus Maveri
k
oating point
o-pro
essor. This option is not enabled by
default, sin
e the problem is only present in older Maveri
k implementations.
The default
an be re-enabled by use of the `-mno-
irrus-fix-invalid-insns'
swit
h.
-mpoke-fun tion-name
Write the name of ea
h fun
tion into the text se
tion, dire
tly pre
eding the
fun
tion prologue. The generated
ode is similar to this:
t0
t1
-mthumb
113
Generate
ode for the 16-bit Thumb instru
tion set. The default is to use the
32-bit ARM instru
tion set.
-mtp s-frame
Generate a sta
k frame that is
ompliant with the Thumb Pro
edure Call Standard for all non-leaf fun
tions. (A leaf fun
tion is one that does not
all any
other fun
tions.) The default is `-mno-tp
s-frame'.
-mtp s-leaf-frame
Generate a sta
k frame that is
ompliant with the Thumb Pro
edure Call Standard for all leaf fun
tions. (A leaf fun
tion is one that does not
all any other
fun
tions.) The default is `-mno-ap
s-leaf-frame'.
-m allee-super-interworking
Gives all externally visible fun
tions in the le being
ompiled an ARM instru
tion set header whi
h swit
hes to Thumb mode before exe
uting the rest of the
fun
tion. This allows these fun
tions to be
alled from non-interworking
ode.
-m aller-super-interworking
Allows
alls via fun
tion pointers (in
luding virtual fun
tions) to exe
ute
orre
tly regardless of whether the target
ode has been
ompiled for interworking
or not. There is a small overhead in the
ost of exe
uting a fun
tion pointer if
this option is enabled.
-msize
-minit-sta k=N
Spe
ify the initial sta
k address, whi
h may be a symbol or numeri
value,
`__sta
k' is the default.
114
-mno-interrupts
Generated
ode is not
ompatible with hardware interrupts. Code size will be
smaller.
-m all-prologues
-mno-tablejump
-mtiny-sta k
-mint8
Assume int to be 8 bit integer. This ae
ts the sizes of all types: A
har will
be 1 byte, an int will be 1 byte, an long will be 2 bytes and long long will be 4
bytes. Please note that this option does not
omply to the C standards, but it
will provide you with smaller
ode size.
These options are dened spe
i
ally for the CRIS ports.
-mar
h=ar
hite
ture-type
-m
pu=ar
hite
ture-type
Generate
ode for the spe
ied ar
hite
ture. The
hoi
es for ar
hite
turetype are `v3', `v8' and `v10' for respe
tively ETRAX 4, ETRAX 100, and
ETRAX 100 LX. Default is `v0' ex
ept for
ris-axis-linux-gnu, where the default is `v10'.
Tune to ar
hite
ture-type everything appli
able about the generated
ode,
ex
ept for the ABI and the set of available instru
tions. The
hoi
es for
ar
hite
ture-type are the same as for `-mar
h=ar
hite
ture-type '.
-mmax-sta k-frame=n
-melinux-sta ksize=n
Only available with the `
ris-axis-aout' target. Arranges for indi
ations in
the program to the kernel loader that the sta
k of the program should be set
to n bytes.
-metrax4
-metrax100
The options `-metrax4' and `-metrax100' are synonyms for `-mar
h=v3' and
`-mar
h=v8' respe
tively.
-mmul-bug-workaround
-mno-mul-bug-workaround
Work around a bug in the muls and mulu instru
tions for CPU models where
it applies. This option is a
tive by default.
115
-m -init
Do not use ondition- ode results from previous instru tion; always emit ompare and test instru tions before use of ondition odes.
-mno-side-effe ts
Do not emit instru tions with side-ee ts in addressing modes other than postin rement.
-msta
k-align
-mno-sta
k-align
-mdata-align
-mno-data-align
-m
onst-align
-mno-
onst-align
These options (no-options) arranges (eliminate arrangements) for the sta
kframe, individual data and
onstants to be aligned for the maximum single
data a
ess size for the
hosen CPU model. The default is to arrange for 32bit alignment. ABI details su
h as stru
ture layout are not ae
ted by these
options.
-m32-bit
-m16-bit
-m8-bit Similar to the sta
k- data- and
onst-align options above, these options arrange
for sta
k-frame, writable data and
onstants to all be 32-bit, 16-bit or 8-bit
aligned. The default is 32-bit alignment.
-mno-prologue-epilogue
-mprologue-epilogue
With `-mno-prologue-epilogue', the normal fun
tion prologue and epilogue
that sets up the sta
k-frame are omitted and no return instru
tions or return
sequen
es are generated in the
ode. Use this option only together with visual
inspe
tion of the
ompiled
ode: no warnings or errors are generated when
all-saved registers must be saved, or storage for lo
al variable needs to be
allo
ated.
-mno-gotplt
-mgotplt With `-fpi
' and `-fPIC', don't generate (do generate) instru
tion sequen
es
that load addresses for fun
tions from the PLT part of the GOT rather than
(traditional on other ar
hite
tures)
alls to the PLT. The default is `-mgotplt'.
-maout
Lega
y no-op option only re
ognized with the
ris-axis-aout target.
-melf
Lega
y no-op option only re
ognized with the
ris-axis-elf and
ris-axis-linuxgnu targets.
-melinux Only re
ognized with the
ris-axis-aout target, where it sele
ts a GNU/linuxlike multilib, in
lude les and instru
tion set for `-mar
h=v8'.
-mlinux Lega
y no-op option only re
ognized with the
ris-axis-linux-gnu target.
116
-sim
-sim2
This option, re
ognized for the
ris-axis-aout and
ris-axis-elf arranges to link
with input-output fun
tions from a simulator library. Code, initialized data
and zero-initialized data are allo
ated
onse
utively.
Like `-sim', but pass linker options to lo
ate initialized data at 0x40000000 and
zero-initialized data at 0x80000000.
These options are dened for all ar
hite
tures running the Darwin operating system.
FSF GCC on Darwin does not
reate \fat" obje
t les; it will
reate an obje
t le for
the single ar
hite
ture that it was built to target. Apple's GCC on Darwin does
reate
\fat" les if multiple `-ar
h' options are used; it does so by running the
ompiler or linker
multiple times and joining the results together with `lipo'.
The subtype of the le
reated (like `pp
7400' or `pp
970' or `i686') is determined
by the
ags that spe
ify the ISA that GCC is targetting, like `-m
pu' or `-mar
h'. The
`-for
e_
pusubtype_ALL' option
an be used to override this.
The Darwin tools vary in their behavior when presented with an ISA mismat
h. The
assembler, `as', will only permit instru
tions to be used that are valid for the subtype of
the le it is generating, so you
annot put 64-bit instru
tions in an `pp
750' obje
t le.
The linker for shared libraries, `/usr/bin/libtool', will fail and print an error if asked
to
reate a shared library with a less restri
tive subtype than its input les (for instan
e,
trying to put a `pp
970' obje
t le in a `pp
7400' library). The linker for exe
utables, `ld',
will quietly give the exe
utable the most restri
tive subtype of any of its input les.
-Fdir
Add the framework dire
tory dir to the head of the list of dire
tories to be
sear
hed for header les. These dire
tories are interleaved with those spe
ied
by `-I' options and are s
anned in a left-to-right order.
A framework dire
tory is a dire
tory with frameworks in it. A framework is a
dire
tory with a `"Headers"' and/or `"PrivateHeaders"' dire
tory
ontained
dire
tly in it that ends in `".framework"'. The name of a framework is the
name of this dire
tory ex
luding the `".framework"'. Headers asso
iated with
the framework are found in one of those two dire
tories, with `"Headers"'
being sear
hed rst. A subframework is a framework dire
tory that is in a
framework's `"Frameworks"' dire
tory. In
ludes of subframework headers
an
only appear in a header of a framework that
ontains the subframework,
or in a sibling subframework header. Two subframeworks are siblings if
they o
ur in the same framework. A subframework should not have the
same name as a framework, a warning will be issued if this is violated.
Currently a subframework
annot have subframeworks, in the future, the
me
hanism may be extended to support this. The standard frameworks
an be
found in `"/System/Library/Frameworks"' and `"/Library/Frameworks"'.
An example in
lude looks like #in
lude <Framework/header.h>, where
`Framework' denotes the name of the framework and header.h is found in the
`"PrivateHeaders"' or `"Headers"' dire
tory.
-gused
Emit debugging information for symbols that are used. For STABS debugging
format, this enables `-feliminate-unused-debug-symbols'. This is by default
ON.
-gfull
117
-mone-byte-bool
-mfix-and-
ontinue
-ffix-and-
ontinue
-findire
t-data
Generate
ode suitable for fast turn around development. Needed to enable gdb
to dynami
ally load .o les into already running programs. `-findire
t-data'
and `-ffix-and-
ontinue' are provided for ba
kwards
ompatibility.
-all_load
Loads all members of stati ar hive libraries. See man ld(1) for more information.
-ar h_errors_fatal
Cause the errors having to do with les that have the wrong ar
hite
ture to be
fatal.
-bind_at_load
Causes the output le to be marked su
h that the dynami
linker will bind all
undened referen
es when the le is loaded or laun
hed.
-bundle
Produ e a Ma h-o bundle format le. See man ld(1) for more information.
This option spe
ies the exe
utable that will be loading the build output le
being linked. See man ld(1) for more information.
-dynami lib
When passed this option, GCC will produ
e a dynami
library instead of an
exe
utable when linking, using the Darwin `libtool'
ommand.
-for e_ pusubtype_ALL
This auses GCC's output le to have the ALL subtype, instead of one ontrolled by the `-m pu' or `-mar h' option.
118
119
These `-m' options are dened for the DEC Alpha implementations:
-mno-soft-float
-msoft-float
Use (do not use) the hardware
oating-point instru
tions for
oating-point operations. When `-msoft-float' is spe
ied, fun
tions in `libg
.a' will be
used to perform
oating-point operations. Unless they are repla
ed by routines
that emulate the
oating-point operations, or
ompiled in su
h a way as to
all
su
h emulations routines, these routines will issue
oating-point operations. If
you are
ompiling for an Alpha without
oating-point operations, you must
ensure that the library is built so as not to
all them.
Generate
ode that uses (does not use) the
oating-point register set.
`-mno-fp-regs' implies `-msoft-float'. If the
oating-point register set is
not used,
oating point operands are passed in integer registers as if they were
integers and
oating-point results are passed in $0 instead of $f0. This is a
non-standard
alling sequen
e, so any fun
tion with a
oating-point argument
or return value
alled by
ode
ompiled with `-mno-fp-regs' must also be
ompiled with that option.
A typi
al use of this option is building a kernel that does not use, and hen
e
need not save and restore, any
oating-point registers.
-mieee
The Alpha ar
hite
ture implements
oating-point hardware optimized for maximum performan
e. It is mostly
ompliant with the IEEE
oating point standard. However, for full
omplian
e, software assistan
e is required. This option
generates
ode fully IEEE
ompliant
ode ex
ept that the inexa
t-
ag is not
maintained (see below). If this option is turned on, the prepro
essor ma
ro
_IEEE_FP is dened during
ompilation. The resulting
ode is less e
ient but
is able to
orre
tly support denormalized numbers and ex
eptional IEEE values
su
h as not-a-number and plus/minus innity. Other Alpha
ompilers
all this
option `-ieee_with_no_inexa
t'.
-mieee-with-inexa t
This is like `-mieee' ex
ept the generated
ode also maintains the IEEE inexa
t
ag. Turning on this option
auses the generated
ode to implement fully
ompliant IEEE math. In addition to _IEEE_FP, _IEEE_FP_EXACT is dened as
a prepro
essor ma
ro. On some Alpha implementations the resulting
ode may
exe
ute signi
antly slower than the
ode generated by default. Sin
e there is
very little
ode that depends on the inexa
t-
ag, you should normally not spe
ify this option. Other Alpha
ompilers
all this option `-ieee_with_inexa
t'.
120
-mfp-trap-mode=trap-mode
This option
ontrols what
oating-point related traps are enabled. Other Alpha
ompilers
all this option `-fptm trap-mode '. The trap mode
an be set to one
of four values:
`n'
This is the default (normal) setting. The only traps that are enabled are the ones that
annot be disabled in software (e.g., division
by zero trap).
`u'
`su'
Like `su', but the instru
tions are marked to be safe for software
ompletion (see Alpha ar
hite
ture manual for details).
`sui'
-mfp-rounding-mode=rounding-mode
Sele ts the IEEE rounding mode. Other Alpha ompilers all this option `-fprm
`n'
`m'
` '
Chopped rounding mode. Floating point numbers are rounded towards zero.
`d'
Dynami
rounding mode. A eld in the
oating point
ontrol register (fp
r, see Alpha ar
hite
ture referen
e manual)
ontrols the
rounding mode in ee
t. The C library initializes this register for
rounding towards plus innity. Thus, unless your program modies
the fp
r, `d'
orresponds to round towards plus innity.
In the Alpha ar
hite
ture,
oating point traps are impre
ise. This means without software assistan
e it is impossible to re
over from a
oating trap and
program exe
ution normally needs to be terminated. GCC
an generate
ode
that
an assist operating system trap handlers in determining the exa
t lo
ation that
aused a
oating point trap. Depending on the requirements of an
appli
ation, dierent levels of pre
isions
an be sele
ted:
`p'
Program pre
ision. This option is the default and means a trap
handler
an only identify whi
h program
aused a
oating point
ex
eption.
`f'
Fun
tion pre
ision. The trap handler
an determine the fun
tion
that
aused a
oating point ex
eption.
`i'
Instru
tion pre
ision. The trap handler
an determine the exa
t
instru
tion that
aused a
oating point ex
eption.
121
Other Alpha
ompilers provide the equivalent options
alled `-s
ope_safe' and
`-resumption_safe'.
-mieee-
onformant
This option marks the generated
ode as IEEE
onformant. You must not
use this option unless you also spe
ify `-mtrap-pre
ision=i' and either
`-mfp-trap-mode=su' or `-mfp-trap-mode=sui'. Its only ee
t is to emit the
line `.eflag 48' in the fun
tion prologue of the generated assembly le. Under
DEC Unix, this has the ee
t that IEEE-
onformant math library routines
will be linked in.
-mbuild- onstants
-malpha-as
-mgas
Sele
t whether to generate
ode to be assembled by the vendor-supplied assembler (`-malpha-as') or by the GNU assembler `-mgas'.
-mbwx
-mno-bwx
-m
ix
-mno-
ix
-mfix
-mno-fix
-mmax
-mno-max Indi
ate whether GCC should generate
ode to use the optional BWX, CIX, FIX
and MAX instru
tion sets. The default is to use the instru
tion sets supported
by the CPU type spe
ied via `-m
pu=' option or that of the CPU on whi
h
GCC was built if none was spe
ied.
-mfloat-vax
-mfloat-ieee
Generate
ode that uses (does not use) VAX F and G
oating point arithmeti
instead of IEEE single and double pre
ision.
-mexpli
it-relo
s
-mno-expli
it-relo
s
Older Alpha assemblers provided no way to generate symbol relo
ations ex
ept
via assembler ma
ros. Use of these ma
ros does not allow optimal instru
tion
s
heduling. GNU binutils as of version 2.12 supports a new syntax that allows the
ompiler to expli
itly mark whi
h relo
ations should apply to whi
h
122
instru
tions. This option is mostly useful for debugging, as GCC dete
ts the
apabilities of the assembler when it is built and sets the default a
ordingly.
-msmall-data
-mlarge-data
-msmall-text
-mlarge-text
When `-msmall-text' is used, the
ompiler assumes that the
ode of the entire
program (or shared library) ts in 4MB, and is thus rea
hable with a bran
h instru
tion. When `-msmall-data' is used, the
ompiler
an assume that all lo
al
symbols share the same $gp value, and thus redu
e the number of instru
tions
required for a fun
tion
all from 4 to 1.
The default is `-mlarge-text'.
-m pu= pu_type
Set the instru
tion set and instru
tion s
heduling parameters for ma
hine type
pu type. You
an spe
ify either the `EV' style name or the
orresponding
hip
number. GCC supports s
heduling parameters for the EV4, EV5 and EV6
family of pro
essors and will
hoose the default values for the instru
tion set
from the pro
essor you spe
ify. If you do not spe
ify a pro
essor type, GCC
will default to the pro
essor on whi
h the
ompiler was built.
Supported values for
pu type are
`ev4'
`ev45'
`21064'
`ev5'
`21164'
`ev56'
`21164a'
`p
a56'
`21164p
'
`21164PC' S
hedules as an EV5 and supports the BWX and MAX extensions.
`ev6'
`21264'
`ev67'
`21264a'
123
S
hedules as an EV6 and supports the BWX, FIX, and MAX extensions.
S
hedules as an EV6 and supports the BWX, CIX, FIX, and MAX
extensions.
-mtune= pu_type
Set only the instru
tion s
heduling parameters for ma
hine type
pu type. The
instru
tion set is not
hanged.
-mmemory-laten y=time
Sets the laten
y the s
heduler should assume for typi
al memory referen
es
as seen by the appli
ation. This number is highly dependent on the memory
a
ess patterns used by the appli
ation and the size of the external
a
he on
the ma
hine.
Valid options for time are
`number ' A de
imal number representing
lo
k
y
les.
`L1'
`L2'
`L3'
`main'
The
ompiler
ontains estimates of the number of
lo
k
y
les for
\typi
al" EV4 & EV5 hardware for the Level 1, 2 & 3
a
hes (also
alled D
a
he, S
a
he, and B
a
he), as well as to main memory.
Note that L3 is only valid for EV5.
These `-m' options are dened for the DEC Alpha/VMS implementations:
-mvms-return- odes
Return VMS
ondition
odes from main. The default is to return POSIX style
ondition (e.g. error)
odes.
-mhard-float
124
-msoft-float
-mallo -
-mfixed-
Do not try to dynami ally allo ate ondition ode registers, only use i 0 and
f
0.
-mdword
-mdouble
-mmedia
-mmuladd
-mfdpi
Sele
t the FDPIC ABI, that uses fun
tion des
riptors to represent pointers to
fun
tions. Without any PIC/PIE-related options, it implies `-fPIE'. With
`-fpi
' or `-fpie', it assumes GOT entries and small data are within a 12-bit
range from the GOT base address; with `-fPIC' or `-fPIE', GOT osets are
omputed with 32 bits.
-minline-plt
Enable inlining of PLT entries in fun
tion
alls to fun
tions that are not known
to bind lo
ally. It has no ee
t without `-mfdpi
'. It's enabled by default if
optimizing for speed and
ompiling for shared libraries (i.e., `-fPIC' or `-fpi
'),
or when an optimization option su
h as `-O3' or above is present in the
ommand
line.
-mTLS
125
-mgprel-ro
Enable the use of GPREL relo
ations in the FDPIC ABI for data that is known to
be in read-only se
tions. It's enabled by default, ex
ept for `-fpi
' or `-fpie':
even though it may help make the global oset table smaller, it trades 1 instru
tion for 4. With `-fPIC' or `-fPIE', it trades 3 instru
tions for 4, one of
whi
h may be shared by multiple symbols, and it avoids the need for a GOT
entry for the referen
ed symbol, so it's more likely to be a win. If it is not,
`-mno-gprel-ro'
an be used to disable it.
-multilib-library-pi
Link with the (library, not FD) pi
libraries. It's implied by `-mlibrary-pi
',
as well as by `-fPIC' and `-fpi
' without `-mfdpi
'. You should never have to
use it expli
itly.
-mlinked-fp
-mlong- alls
Use indire
t addressing to
all fun
tions outside the
urrent
ompilation unit.
This allows the fun
tions to be pla
ed anywhere within the 32-bit address spa
e.
-malign-labels
Try to align labels to an 8-byte boundary by inserting nops into the previous
pa
ket. This option only has an ee
t when VLIW pa
king is enabled. It
doesn't
reate new pa
kets; it merely adds nops to existing ones.
-mlibrary-pi
-ma
-4
-ma
-8
-mpa
k
-mno-pa
k
-mno-eflags
-m ond-move
-mno- ond-move
126
This swit
h is mainly for debugging the
ompiler and will likely be removed in
a future version.
-ms
-mno-s
-m ond-exe
-mno- ond-exe
-mvliw-bran h
-mno-vliw-bran h
-mmulti- ond-exe
-mno-multi- ond-exe
-mnested- ond-exe
-mno-nested- ond-exe
127
This swit
h is mainly for debugging the
ompiler and will likely be removed in
a future version.
-mtom
at-stats
-m pu= pu
Sele
t the pro
essor type for whi
h to generate
ode. Possible values are `frv',
`fr550', `tom
at', `fr500', `fr450', `fr405', `fr400', `fr300' and `simple'.
Shorten some address referen
es at link time, when possible; uses the linker
option `-relax'. See se
tion \ld and the H8/300" in Using ld, for a fuller
des
ription.
-mh
-ms
-mn
Generate
ode for the H8S and H8/300H in the normal mode. This swit
h must
be used either with `-mh' or `-ms'.
-ms2600
Generate ode for the H8S/2600. This swit h must be used with `-ms'.
-mint32
-malign-300
On the H8/300H and H8S, use the same alignment rules as for the H8/300.
The default for the H8/300H and H8S is to align longs and
oats on 4 byte
boundaries. `-malign-300'
auses them to be aligned on 2 byte boundaries.
This option has no ee
t on the H8/300.
These `-m' options are dened for the HPPA family of
omputers:
-mar
h=ar
hite
ture-type
Generate
ode for the spe
ied ar
hite
ture. The
hoi
es for ar
hite
ture-type
are `1.0' for PA 1.0, `1.1' for PA 1.1, and `2.0' for PA 2.0 pro
essors. Refer
to `/usr/lib/s
hed.models' on an HP-UX system to determine the proper
ar
hite
ture option for your ma
hine. Code
ompiled for lower numbered ar
hite
tures will run on higher numbered ar
hite
tures, but not the other way
around.
-mpa-ris
-1-0
-mpa-ris
-1-1
-mpa-ris
-2-0
Synonyms for `-mar h=1.0', `-mar h=1.1', and `-mar h=2.0' respe tively.
-mbig-swit h
Generate ode suitable for big swit h tables. Use this option only if the assembler/linker omplain about out of range bran hes within a swit h table.
128
-mjump-in-delay
Fill delay slots of fun
tion
alls with un
onditional jump instru
tions by modifying the return pointer for the fun
tion
all to be the target of the
onditional
jump.
-mdisable-fpregs
Prevent
oating point registers from being used in any manner. This is ne
essary for
ompiling kernels whi
h perform lazy
ontext swit
hing of
oating
point registers. If you use this option and attempt to perform
oating point
operations, the
ompiler will abort.
-mdisable-indexing
Prevent the
ompiler from using indexing address modes. This avoids some
rather obs
ure problems when
ompiling MIG generated
ode under MACH.
-mno-spa e-regs
Generate
ode that assumes the target has no spa
e registers. This allows GCC
to generate faster indire
t
alls and use uns
aled index address modes.
Su
h
ode is suitable for level 0 PA systems and kernels.
-mfast-indire t- alls
Generate
ode that assumes
alls never
ross spa
e boundaries. This allows
GCC to emit
ode whi
h performs faster indire
t
alls.
This option will not work in the presen
e of shared libraries or nested fun
tions.
-mfixed-range=register-range
Generate
ode treating the given register range as xed registers. A xed
register is one that the register allo
ator
an not use. This is useful when
ompiling kernel
ode. A register range is spe
ied as two registers separated
by a dash. Multiple register ranges
an be spe
ied separated by a
omma.
-mlong-load-store
Generate 3-instru
tion load and store sequen
es as sometimes required by the
HP-UX 10 linker. This is equivalent to the `+k' option to the HP
ompilers.
-mportable-runtime
-mgas
S
hedule
ode a
ording to the
onstraints for the ma
hine type
pu-type. The
hoi
es for
pu-type are `700' `7100', `7100LC', `7200', `7300' and `8000'. Refer
to `/usr/lib/s
hed.models' on an HP-UX system to determine the proper
s
heduling option for your ma
hine. The default s
heduling is `8000'.
-mlinker-opt
Enable the optimization pass in the HP-UX linker. Note this makes symboli
debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9
linkers in whi
h they give bogus error messages when linking some programs.
-msoft-float
Generate output ontaining library alls for oating point. Warning: the requisite libraries are not available for all HPPA targets. Normally the fa ilities of
129
the ma
hine's usual C
ompiler are used, but this
annot be done dire
tly in
ross-
ompilation. You must make your own arrangements to provide suitable
library fun
tions for
ross-
ompilation. The embedded target `hppa1.1-*-pro'
does provide software
oating point support.
`-msoft-float'
hanges the
alling
onvention in the output le; therefore, it
is only useful if you
ompile all of a program with this option. In parti
ular, you need to
ompile `libg
.a', the library that
omes with GCC, with
`-msoft-float' in order for this to work.
-msio
Generate the predene, _SIO, for server IO. The default is `-mwsio'. This generates the predenes, __hp9000s700, __hp9000s700__ and _WSIO, for workstation IO. These options are available under HP-UX and HI-UX.
-mgnu-ld Use GNU ld spe
i
options. This passes `-shared' to ld when building a shared
library. It is the default when GCC is
ongured, expli
itly or impli
itly, with
the GNU linker. This option does not have any ae
t on whi
h ld is
alled, it
only
hanges what parameters are passed to that ld. The ld that is
alled is
determined by the `--with-ld'
ongure option, GCC's program sear
h path,
and nally by the user's PATH. The linker used by GCC
an be printed using
`whi
h `g
-print-prog-name=ld`'.
-mhp-ld Use HP ld spe
i
options. This passes `-b' to ld when building a shared library
and passes `+A
ept TypeMismat
h' to ld on all links. It is the default when
GCC is
ongured, expli
itly or impli
itly, with the HP linker. This option does
not have any ae
t on whi
h ld is
alled, it only
hanges what parameters are
passed to that ld. The ld that is
alled is determined by the `--with-ld'
ongure option, GCC's program sear
h path, and nally by the user's PATH. The
linker used by GCC
an be printed using `whi
h `g
-print-prog-name=ld`'.
-mlong-
alls
Generate
ode that uses long
all sequen
es. This ensures that a
all is always
able to rea
h linker generated stubs. The default is to generate long
alls
only when the distan
e from the
all site to the beginning of the fun
tion or
translation unit, as the
ase may be, ex
eeds a predened limit set by the
bran
h type being used. The limits for normal
alls are 7,600,000 and 240,000
bytes, respe
tively for the PA 2.0 and PA 1.X ar
hite
tures. Sib
alls are always
limited at 240,000 bytes.
Distan
es are measured from the beginning of fun
tions when using
the `-ffun
tion-se
tions' option, or when using the `-mgas' and
`-mno-portable-runtime' options together under HP-UX with the SOM
linker.
It is normally not desirable to use this option as it will degrade performan
e.
However, it may be useful in large appli
ations, parti
ularly when partial linking
is used to build the appli
ation.
The types of long
alls used depends on the
apabilities of the assembler and
linker, and the type of
ode being generated. The impa
t on systems that
support long absolute
alls, and long pi
symbol-dieren
e or p
-relative
alls
should be relatively small. However, an indire
t
all is used on 32-bit ELF
systems in pi
ode and it is quite long.
130
-munix=unix-std
Generate
ompiler predenes and sele
t a startle for the spe
ied UNIX standard. The
hoi
es for unix-std are `93', `95' and `98'. `93' is supported on all
HP-UX versions. `95' is available on HP-UX 10.10 and later. `98' is available
on HP-UX 11.11 and later. The default values are `93' for HP-UX 10.00, `95'
for HP-UX 10.10 though to 11.00, and `98' for HP-UX 11.11 and later.
`-munix=93' provides the same predenes as GCC 3.3 and 3.4. `-munix=95'
provides additional predenes for XOPEN_UNIX and _XOPEN_SOURCE_EXTENDED,
and the startle `unix95.o'. `-munix=98' provides additional predenes for
_XOPEN_UNIX, _XOPEN_SOURCE_EXTENDED, _INCLUDE__STDC_A1_SOURCE and _
INCLUDE_XOPEN_SOURCE_500, and the startle `unix98.o'.
It is important to note that this option
hanges the interfa
es for various library
routines. It also ae
ts the operational behavior of the C library. Thus, extreme
are is needed in using this option.
Library
ode that is intended to operate with more than one UNIX standard
must test, set and restore the variable xpg4 extended mask as appropriate.
Most GNU software doesn't provide this
apability.
-nolibdld
Suppress the generation of link options to sear
h libdld.sl when the `-stati
'
option is spe
ied on HP-UX 10 and later.
-stati
The HP-UX implementation of setlo
ale in lib
has a dependen
y on libdld.sl.
There isn't an ar
hive version of libdld.sl. Thus, when the `-stati
' option is
spe
ied, spe
ial link options are needed to resolve this dependen
y.
On HP-UX 10 and later, the GCC driver adds the ne
essary options to link
with libdld.sl when the `-stati
' option is spe
ied. This
auses the resulting
binary to be dynami
. On the 64-bit port, the linkers generate dynami
binaries
by default in any
ase. The `-nolibdld' option
an be used to prevent the GCC
driver from adding these link options.
-threads Add support for multithreading with the d
e thread library under HP-UX. This
option sets
ags for both the prepro
essor and linker.
These `-m' options are dened for the i386 and x86-64 family of
omputers:
-mtune=
pu-type
Tune to
pu-type everything appli
able about the generated
ode, ex
ept for
the ABI and the set of available instru
tions. The
hoi
es for
pu-type are:
i386
Original Intel's i386 CPU.
i486
Intel's i486 CPU. (No s
heduling is implemented for this
hip.)
i586, pentium
Intel Pentium CPU with no MMX support.
pentium-mmx
Intel PentiumMMX CPU based on Pentium
ore with MMX instru
tion set support.
131
i686, pentiumpro
Intel PentiumPro CPU.
pentium2
Intel Pentium2 CPU based on PentiumPro ore with MMX instru tion set support.
pentium3, pentium3m
Intel Pentium3 CPU based on PentiumPro
ore with MMX and
SSE instru
tion set support.
pentium-m
Low power version of Intel Pentium3 CPU with MMX, SSE and
SSE2 instru
tion set support. Used by Centrino notebooks.
pentium4, pentium4m
Intel Pentium4 CPU with MMX, SSE and SSE2 instru
tion set
support.
pres
ott
no ona
k6
k6-2, k6-3 Improved versions of AMD K6 CPU with MMX and 3dNOW! instru
tion set support.
athlon, athlon-tbird
AMD Athlon CPU with MMX, 3dNOW!, enhan
ed 3dNOW! and
SSE prefet
h instru
tions support.
athlon-4, athlon-xp, athlon-mp
Improved AMD Athlon CPU with MMX, 3dNOW!, enhan
ed
3dNOW! and full SSE instru
tion set support.
k8, opteron, athlon64, athlon-fx
AMD K8
ore based CPUs with x86-64 instru
tion set support.
(This supersets MMX, SSE, SSE2, 3dNOW!, enhan
ed 3dNOW!
and 64-bit instru
tion set extensions.)
win
hip-
6
IDT Win
hip C6 CPU, dealt in same way as i486 with additional
MMX instru
tion set support.
win hip2
IDT Win
hip2 CPU, dealt in same way as i486 with additional
MMX and 3dNOW! instru
tion set support.
Via C3 CPU with MMX and 3dNOW! instru
tion set support. (No
s
heduling is implemented for this
hip.)
3-2
Via C3-2 CPU with MMX and SSE instru
tion set support. (No
s
heduling is implemented for this
hip.)
132
While pi
king a spe
i
pu-type will s
hedule things appropriately for that
parti
ular
hip, the
ompiler will not generate any
ode that does not run on
the i386 without the `-mar
h=
pu-type ' option being used.
-mar
h=
pu-type
Generate instru
tions for the ma
hine type
pu-type. The
hoi
es for
pu-type
are the same as for `-mtune'. Moreover, spe
ifying `-mar
h=
pu-type ' implies
`-mtune=
pu-type '.
-m pu= pu-type
-m386
-m486
-mpentium
-mpentiumpro
-mfpmath=unit
Generate
oating point arithmeti
s for sele
ted unit unit. The
hoi
es for unit
are:
`387'
Use the standard 387
oating point
opro
essor present majority of
hips and emulated otherwise. Code
ompiled with this option will
run almost everywhere. The temporary results are
omputed in
80bit pre
ision instead of pre
ision spe
ied by the type resulting
in slightly dierent results
ompared to most of other
hips. See
`-ffloat-store' for more detailed des
ription.
This is the default
hoi
e for i386
ompiler.
`sse'
Use s
alar
oating point instru
tions present in the SSE instru
tion
set. This instru
tion set is supported by Pentium3 and newer
hips,
in the AMD line by Athlon-4, Athlon-xp and Athlon-mp
hips. The
earlier version of SSE instru
tion set supports only single pre
ision
arithmeti
s, thus the double and extended pre
ision arithmeti
s is
still done using 387. Later version, present only in Pentium4 and
the future AMD x86-64
hips supports double pre
ision arithmeti
s
too.
For the i386
ompiler, you need to use `-mar
h=
pu-type ', `-msse'
or `-msse2' swit
hes to enable SSE extensions and make this option
ee
tive. For the x86-64
ompiler, these extensions are enabled by
default.
The resulting
ode should be
onsiderably faster in the majority
of
ases and avoid the numeri
al instability problems of 387
ode,
but may break some existing
ode that expe
ts temporaries to be
80bit.
This is the default
hoi
e for the x86-64
ompiler.
133
Output asm instru
tions using sele
ted diale
t. Supported
hoi
es are `intel'
or `att' (the default one).
-mieee-fp
-mno-ieee-fp
Control whether or not the
ompiler uses IEEE
oating point
omparisons.
These handle
orre
tly the
ase where the result of a
omparison is unordered.
-msoft-float
Generate output
ontaining library
alls for
oating point. Warning: the requisite libraries are not part of GCC. Normally the fa
ilities of the ma
hine's
usual C
ompiler are used, but this
an't be done dire
tly in
ross-
ompilation.
You must make your own arrangements to provide suitable library fun
tions
for
ross-
ompilation.
On ma
hines where a fun
tion returns
oating point results in the 80387 register
sta
k, some
oating point op
odes may be emitted even if `-msoft-float' is
used.
-mno-fp-ret-in-387
Do not use the FPU registers for return values of fun
tions.
The usual
alling
onvention has fun
tions return values of types float and
double in an FPU register, even if there is no FPU. The idea is that the
operating system should emulate an FPU.
The option `-mno-fp-ret-in-387'
auses su
h values to be returned in ordinary
CPU registers instead.
-mno-fan y-math-387
Some 387 emulators do not support the sin,
os and sqrt instru
tions for the
387. Spe
ify this option to avoid generating those instru
tions. This option
is the default on FreeBSD, OpenBSD and NetBSD. This option is overridden
when `-mar
h' indi
ates that the target
pu will always have an FPU and so the
instru
tion will not need emulation. As of revision 2.6.1, these instru
tions are
not generated unless you also use the `-funsafe-math-optimizations' swit
h.
-malign-double
-mno-align-double
Control whether GCC aligns double, long double, and long long variables on
a two word boundary or a one word boundary. Aligning double variables on a
two word boundary will produ
e
ode that runs somewhat faster on a `Pentium'
at the expense of more memory.
Warning: if you use the `-malign-double' swit
h, stru
tures
ontaining the
above types will be aligned dierently than the published appli
ation binary
134
interfa
e spe
i
ations for the 386 and will not be binary
ompatible with stru
tures in
ode
ompiled without that swit
h.
-m96bit-long-double
-m128bit-long-double
These swit
hes
ontrol the size of long double type. The i386 appli
ation
binary interfa
e spe
ies the size to be 96 bits, so `-m96bit-long-double' is
the default in 32 bit mode.
Modern ar
hite
tures (Pentium and newer) would prefer long double to be
aligned to an 8 or 16 byte boundary. In arrays or stru
tures
onforming to the
ABI, this would not be possible. So spe
ifying a `-m128bit-long-double' will
align long double to a 16 byte boundary by padding the long double with an
additional 32 bit zero.
In the x86-64
ompiler, `-m128bit-long-double' is the default
hoi
e as its
ABI spe
ies that long double is to be aligned on 16 byte boundary.
Noti
e that neither of these options enable any extra pre
ision over the x87
standard of 80 bits for a long double.
Warning: if you override the default value for your target ABI, the stru
tures
and arrays
ontaining long double variables will
hange their size as well as
fun
tion
alling
onvention for fun
tion taking long double will be modied.
Hen
e they will not be binary
ompatible with arrays or stru
tures in
ode
ompiled without that swit
h.
-msvr3-shlib
-mno-svr3-shlib
Control whether GCC pla
es uninitialized lo
al variables into the bss or data
segments. `-msvr3-shlib' pla
es them into bss. These options are meaningful
only on System V Release 3.
-mrtd
Use a dierent fun
tion-
alling
onvention, in whi
h fun
tions that take a xed
number of arguments return with the ret num instru
tion, whi
h pops their
arguments while returning. This saves one instru
tion in the
aller sin
e there
is no need to pop the arguments there.
You
an spe
ify that an individual fun
tion is
alled with this
alling sequen
e
with the fun
tion attribute `std
all'. You
an also override the `-mrtd' option
by using the fun
tion attribute `
de
l'. See Se
tion 5.24 [Fun
tion Attributes,
page 217.
Warning: this
alling
onvention is in
ompatible with the one normally used on
Unix, so you
annot use it if you need to
all libraries
ompiled with the Unix
ompiler.
Also, you must provide fun
tion prototypes for all fun
tions that take variable
numbers of arguments (in
luding printf); otherwise in
orre
t
ode will be
generated for
alls to those fun
tions.
In addition, seriously in
orre
t
ode will result if you
all a fun
tion with too
many arguments. (Normally, extra arguments are harmlessly ignored.)
135
-mregparm=num
Control how many registers are used to pass integer arguments. By default, no
registers are used to pass arguments, and at most 3 registers
an be used. You
an
ontrol this behavior for a spe
i
fun
tion by using the fun
tion attribute
`regparm'. See Se
tion 5.24 [Fun
tion Attributes, page 217.
Warning: if you use this swit
h, and num is nonzero, then you must build all
modules with the same value, in
luding any libraries. This in
ludes the system
libraries and startup modules.
-mpreferred-sta k-boundary=num
Attempt to keep the sta
k boundary aligned to a 2 raised to num byte boundary.
If `-mpreferred-sta
k-boundary' is not spe
ied, the default is 4 (16 bytes or
128 bits), ex
ept when optimizing for
ode size (`-Os'), in whi
h
ase the default
is the minimum
orre
t alignment (4 bytes for x86, and 8 bytes for x86-64).
On Pentium and PentiumPro, double and long double values should be
aligned to an 8 byte boundary (see `-malign-double') or suer signi
ant run
time performan
e penalties. On Pentium III, the Streaming SIMD Extension
(SSE) data type __m128 suers similar penalties if it is not 16 byte aligned.
To ensure proper alignment of this values on the sta
k, the sta
k boundary must
be as aligned as that required by any value stored on the sta
k. Further, every
fun
tion must be generated su
h that it keeps the sta
k aligned. Thus
alling
a fun
tion
ompiled with a higher preferred sta
k boundary from a fun
tion
ompiled with a lower preferred sta
k boundary will most likely misalign the
sta
k. It is re
ommended that libraries that use
allba
ks always use the default
setting.
This extra alignment does
onsume extra sta
k spa
e, and generally in
reases
ode size. Code that is sensitive to sta
k spa
e usage, su
h as embedded systems
and operating system kernels, may want to redu
e the preferred alignment to
`-mpreferred-sta
k-boundary=2'.
-mmmx
-mno-mmx
-msse
-mno-sse
-msse2
-mno-sse2
-msse3
-mno-sse3
-m3dnow
-mno-3dnow
These swit
hes enable or disable the use of built-in fun
tions that allow dire
t
a
ess to the MMX, SSE, SSE2, SSE3 and 3Dnow extensions of the instru
tion
set.
See Se
tion 5.45.4 [X86 Built-in Fun
tions, page 286, for details of the fun
tions
enabled and disabled by these swit
hes.
136
-ma umulate-outgoing-args
If enabled, the maximum amount of spa
e required for outgoing arguments will
be
omputed in the fun
tion prologue. This is faster on most modern CPUs
be
ause of redu
ed dependen
ies, improved s
heduling and redu
ed sta
k usage
when preferred sta
k boundary is not equal to 2. The drawba
k is a notable
in
rease in
ode size. This swit
h implies `-mno-push-args'.
-mthreads
-mno-align-stringops
Do not align destination of inlined string operations. This swit
h redu
es
ode
size and improves performan
e in
ase the destination is already aligned, but
GCC doesn't know about it.
-minline-all-stringops
-momit-leaf-frame-pointer
Don't keep the frame pointer in a register for leaf fun
tions. This avoids the
instru
tions to save, set up and restore frame pointers and makes an extra register available in leaf fun
tions. The option `-fomit-frame-pointer' removes
the frame pointer for all fun
tions whi
h might make debugging harder.
-mtls-dire
t-seg-refs
-mno-tls-dire
t-seg-refs
Controls whether TLS variables may be a
essed with osets from the TLS
segment register (%gs for 32-bit, %fs for 64-bit), or whether the thread base
pointer must be added. Whether or not this is legal depends on the operating
system, and whether it maps the segment to
over the entire TLS area.
For systems that use GNU lib
, the default is on.
These `-m' swit
hes are supported in addition to the above on AMD x86-64 pro
essors in
64-bit environments.
-m32
-m64
137
Generate
ode for a 32-bit or 64-bit environment. The 32-bit environment sets
int, long and pointer to 32 bits and generates
ode that runs on any i386 system.
The 64-bit environment sets int to 32 bits and long and pointer to 64 bits and
generates
ode for AMD's x86-64 ar
hite
ture.
-mno-red-zone
Do not use a so
alled red zone for x86-64
ode. The red zone is mandated by the
x86-64 ABI, it is a 128-byte area beyond the lo
ation of the sta
k pointer that
will not be modied by signal or interrupt handlers and therefore
an be used for
temporary data without adjusting the sta
k pointer. The
ag `-mno-red-zone'
disables this red zone.
-m model=small
Generate
ode for the small
ode model: the program and its symbols must be
linked in the lower 2 GB of the address spa
e. Pointers are 64 bits. Programs
an be stati
ally or dynami
ally linked. This is the default
ode model.
-m model=kernel
Generate
ode for the kernel
ode model. The kernel runs in the negative 2 GB
of the address spa
e. This model has to be used for Linux kernel
ode.
-m model=medium
Generate
ode for the medium model: The program is linked in the lower 2
GB of the address spa
e but symbols
an be lo
ated anywhere in the address
spa
e. Programs
an be stati
ally or dynami
ally linked, but building of shared
libraries are not supported with the medium model.
-m model=large
Generate
ode for the large model: This model makes no assumptions about
addresses and sizes of se
tions. Currently GCC does not implement this model.
These are the `-m' options dened for the Intel IA-64 ar
hite
ture.
-mbig-endian
Generate ode for a big endian target. This is the default for HP-UX.
-mlittle-endian
Generate
ode for a little endian target. This is the default for AIX5 and
GNU/Linux.
-mgnu-as
-mno-gnu-as
Generate (or don't) ode for the GNU assembler. This is the default.
-mgnu-ld
-mno-gnu-ld
Generate (or don't) ode for the GNU linker. This is the default.
-mno-pi Generate ode that does not use a global pointer register. The result is not
138
-mvolatile-asm-stop
-mno-volatile-asm-stop
Generate (or don't) a stop bit immediately before and after volatile asm statements.
-mregister-names
-mno-register-names
Generate (or don't) `in', `lo
', and `out' register names for the sta
ked registers.
This may make assembler output more readable.
-mno-sdata
-msdata Disable (or enable) optimizations that use the small data se
tion. This may be
-m onstant-gp
Generate
ode that uses a single
onstant global pointer value. This is useful
when
ompiling kernel
ode.
-mauto-pi
Generate
ode that is self-relo
atable. This implies `-m
onstant-gp'. This is
useful when
ompiling rmware
ode.
-minline-float-divide-min-laten y
Generate
ode for inline divides of
oating point values using the minimum
laten
y algorithm.
-minline-float-divide-max-throughput
Generate
ode for inline divides of
oating point values using the maximum
throughput algorithm.
-minline-int-divide-min-laten y
Generate
ode for inline divides of integer values using the minimum laten
y
algorithm.
-minline-int-divide-max-throughput
Generate ode for inline divides of integer values using the maximum throughput algorithm.
-minline-sqrt-min-laten y
Generate ode for inline square roots using the minimum laten y algorithm.
-minline-sqrt-max-throughput
Generate ode for inline square roots using the maximum throughput algorithm.
-mno-dwarf2-asm
-mdwarf2-asm
Don't (or do) generate assembler
ode for the DWARF2 line number debugging
info. This may be useful when not using the GNU assembler.
-mearly-stop-bits
-mno-early-stop-bits
Allow stop bits to be pla
ed earlier than immediately pre
eding the instru
tion
that triggered the stop bit. This
an improve instru
tion s
heduling, but does
not always do so.
139
-mfixed-range=register-range
Generate
ode treating the given register range as xed registers. A xed
register is one that the register allo
ator
an not use. This is useful when
ompiling kernel
ode. A register range is spe
ied as two registers separated
by a dash. Multiple register ranges
an be spe
ied separated by a
omma.
-mtls-size=tls-size
Spe ify bit size of immediate TLS osets. Valid values are 14, 22, and 64.
-mtune-ar h= pu-type
Tune the instru
tion s
heduling for a parti
ular CPU, Valid values are itanium,
itanium1, mer
ed, itanium2, and m
kinley.
-mt
-pthread Add support for multithreading using the POSIX threads library. This option
sets
ags for both the prepro
essor and linker. It does not ae
t the thread
safety of obje
t
ode produ
ed by the
ompiler or that of libraries supplied with
it. These are HP-UX spe
i
ags.
-milp32
-mlp64
Generate
ode for a 32-bit or 64-bit environment. The 32-bit environment sets
int, long and pointer to 32 bits. The 64-bit environment sets int to 32 bits and
long and pointer to 64 bits. These are HP-UX spe
i
ags.
These `-m' options are dened for Renesas M32R/D ar
hite
tures:
-m32r2
Generate
ode for the M32R/2.
-m32rx
Generate
ode for the M32R/X.
-m32r
Generate
ode for the M32R. This is the default.
-mmodel=small
Assume all obje
ts live in the lower 16MB of memory (so that their addresses
an be loaded with the ld24 instru
tion), and assume all subroutines are rea
hable with the bl instru
tion. This is the default.
The addressability of a parti
ular obje
t
an be set with the model attribute.
-mmodel=medium
Assume obje
ts may be anywhere in the 32-bit address spa
e (the
ompiler
will generate seth/add3 instru
tions to load their addresses), and assume all
subroutines are rea
hable with the bl instru
tion.
-mmodel=large
Assume obje
ts may be anywhere in the 32-bit address spa
e (the
ompiler will
generate seth/add3 instru
tions to load their addresses), and assume subroutines may not be rea
hable with the bl instru
tion (the
ompiler will generate
the mu
h slower seth/add3/jl instru
tion sequen
e).
-msdata=none
Disable use of the small data area. Variables will be put into one of `.data',
`bss', or `.rodata' (unless the se
tion attribute has been spe
ied). This is
the default.
140
The small data area
onsists of se
tions `.sdata' and `.sbss'. Obje
ts may be
expli
itly put in the small data area with the se
tion attribute using one of
these se
tions.
-msdata=sdata
Put small global and stati
data in the small data area, but do not generate
spe
ial
ode to referen
e them.
-msdata=use
Put small global and stati
data in the small data area, and generate spe
ial
instru
tions to referen
e them.
-G num
Put global and stati
obje
ts less than or equal to num bytes into the small
data or bss se
tions instead of the normal data or bss se
tions. The default
value of num is 8. The `-msdata' option must be set to one of `sdata' or `use'
for this option to have any ee
t.
All modules should be
ompiled with the same `-G num ' value. Compiling with
dierent values of num may or may not work; if it doesn't the linker will give
an error message|in
orre
t
ode will not be generated.
-mdebug
Makes the M32R spe
i
ode in the
ompiler display some statisti
s that might
help in debugging programs.
-malign-loops
-mno-align-loops
-missue-rate=number
-mbran h- ost=number
-mflush-trap=number
Spe
ies the trap number to use to
ush the
a
he. The default is 12. Valid
numbers are between 0 and 15 in
lusive.
-mno-flush-trap
-mflush-fun =name
Spe
ies the name of the operating system fun
tion to
all to
ush the
a
he.
The default is
ush
a
he, but a fun
tion
all will only be used if a trap is not
available.
-mno-flush-fun
Indi ates that there is no OS fun tion for ushing the a he.
141
These are the `-m' options dened for the 68000 series. The default values for these options
depends on whi
h style of 68000 was sele
ted when the
ompiler was
ongured; the defaults
for the most
ommon
hoi
es are given below.
-m68000
-m
68000 Generate output for a 68000. This is the default when the
ompiler is
ongured
-m68020
-m
68020 Generate output for a 68020. This is the default when the
ompiler is
ongured
-m68881
Generate output
ontaining 68881 instru
tions for
oating point. This is the
default for most 68020 systems unless `--nfp' was spe
ied when the
ompiler
was
ongured.
-m68030
Generate output for a 68030. This is the default when the
ompiler is
ongured
for 68030-based systems.
-m68040
Generate output for a 68040. This is the default when the
ompiler is
ongured
for 68040-based systems.
This option inhibits the use of 68881/68882 instru
tions that have to be emulated by software on the 68040. Use this option if your 68040 does not have
ode to emulate those instru
tions.
-m68060
Generate output for a 68060. This is the default when the
ompiler is
ongured
for 68060-based systems.
This option inhibits the use of 68020 and 68881/68882 instru
tions that have
to be emulated by software on the 68060. Use this option if your 68060 does
not have
ode to emulate those instru
tions.
-m pu32
Generate output for a CPU32. This is the default when the
ompiler is
ongured for CPU32-based systems.
Use this option for mi
ro
ontrollers with a CPU32 or CPU32+
ore, in
luding
the 68330, 68331, 68332, 68333, 68334, 68336, 68340, 68341, 68349 and 68360.
-m5200
Generate output for a 520X \
oldre" family
pu. This is the default when the
ompiler is
ongured for 520X-based systems.
Use this option for mi
ro
ontroller with a 5200
ore, in
luding the MCF5202,
MCF5203, MCF5204 and MCF5202.
-m68020-40
Generate output for a 68040, without using any of the new instru
tions. This
results in
ode whi
h
an run relatively e
iently on either a 68020/68881 or a
68030 or a 68040. The generated
ode does use the 68881 instru
tions that are
emulated on the 68040.
142
-m68020-60
Generate output for a 68060, without using any of the new instru
tions. This
results in
ode whi
h
an run relatively e
iently on either a 68020/68881 or a
68030 or a 68040. The generated
ode does use the 68881 instru
tions that are
emulated on the 68060.
-msoft-float
-mshort
Generate output
ontaining library
alls for
oating point. Warning: the requisite libraries are not available for all m68k targets. Normally the fa
ilities
of the ma
hine's usual C
ompiler are used, but this
an't be done dire
tly in
ross-
ompilation. You must make your own arrangements to provide suitable
library fun
tions for
ross-
ompilation. The embedded targets `m68k-*-aout'
and `m68k-*-
off' do provide software
oating point support.
Consider type int to be 16 bits wide, like short int. Additionally, parameters
passed on the sta
k are also aligned to a 16-bit boundary even on targets whose
API mandates promotion to 32-bit.
-mnobitfield
Do not use the bit-eld instru
tions. The `-m68000', `-m
pu32' and `-m5200'
options imply `-mnobitfield'.
-mbitfield
-mrtd
Do use the bit-eld instru
tions. The `-m68020' option implies `-mbitfield'.
This is the default if you use a
onguration designed for a 68020.
Use a dierent fun
tion-
alling
onvention, in whi
h fun
tions that take a xed
number of arguments return with the rtd instru
tion, whi
h pops their arguments while returning. This saves one instru
tion in the
aller sin
e there is no
need to pop the arguments there.
This
alling
onvention is in
ompatible with the one normally used on Unix, so
you
annot use it if you need to
all libraries
ompiled with the Unix
ompiler.
Also, you must provide fun
tion prototypes for all fun
tions that take variable
numbers of arguments (in
luding printf); otherwise in
orre
t
ode will be
generated for
alls to those fun
tions.
In addition, seriously in
orre
t
ode will result if you
all a fun
tion with too
many arguments. (Normally, extra arguments are harmlessly ignored.)
The rtd instru
tion is supported by the 68010, 68020, 68030, 68040, 68060 and
CPU32 pro
essors, but not by the 68000 or 5200.
-malign-int
-mno-align-int
Control whether GCC aligns int, long, long long, float, double, and long
double variables on a 32-bit boundary (`-malign-int') or a 16-bit boundary
(`-mno-align-int'). Aligning variables on 32-bit boundaries produ
es
ode
that runs somewhat faster on pro
essors with 32-bit busses at the expense of
more memory.
Warning: if you use the `-malign-int' swit
h, GCC will align stru
tures
ontaining the above types dierently than most published appli
ation binary interfa
e spe
i
ations for the m68k.
143
Use the p
-relative addressing mode of the 68000 dire
tly, instead of using a
global oset table. At present, this option implies `-fpi
', allowing at most a
16-bit oset for p
-relative addressing. `-fPIC' is not presently supported with
`-mp
rel', though this
ould be supported for 68020 and higher pro
essors.
-mp rel
-mno-stri
t-align
-mstri
t-align
Do not (do) assume that unaligned memory referen
es will be handled by the
system.
-msep-data
Generate
ode that allows the data segment to be lo
ated in a dierent area of
memory from the text segment. This allows for exe
ute in pla
e in an environment without virtual memory management. This option implies `-fPIC'.
-mno-sep-data
Generate
ode that assumes that the data segment follows the text segment.
This is the default.
-mid-shared-library
Generate
ode that supports shared libraries via the library ID method. This allows for exe
ute in pla
e and shared libraries in an environment without virtual
memory management. This option implies `-fPIC'.
-mno-id-shared-library
Generate
ode that doesn't assume ID based shared libraries are being used.
This is the default.
-mshared-library-id=n
Spe
ied the identi
ation number of the ID based shared library being
ompiled. Spe
ifying a value of 0 will generate more
ompa
t
ode, spe
ifying other
values will for
e the allo
ation of that number to the
urrent library but is no
more spa
e or time e
ient than omitting this option.
These are the `-m' options dened for the 68h
11 and 68h
12 mi
ro
ontrollers. The default
values for these options depends on whi
h style of mi
ro
ontroller was sele
ted when the
ompiler was
ongured; the defaults for the most
ommon
hoi
es are given below.
-m6811
-m68h
11 Generate output for a 68HC11. This is the default when the
ompiler is
on-
-m6812
-m68h
12 Generate output for a 68HC12. This is the default when the
ompiler is
on-
-m68S12
-m68h
s12
144
-mauto-in de
Enable the use of 68HC12 pre and post auto-in
rement and auto-de
rement
addressing modes.
-minmax
-nominmax
-mlong-
alls
-mno-long-
alls
Treat all
alls as being far away (near). If
alls are assumed to be far away, the
ompiler will use the
all instru
tion to
all a fun
tion and the rt
instru
tion
for returning.
-mshort
Spe
ify the number of pseudo-soft registers whi
h are used for the
ode generation. The maximum number is 32. Using more pseudo-soft register may or
may not result in better
ode depending on the program. The default is 4 for
68HC11 and 2 for 68HC12.
These are the `-m' options dened for the Motorola M*Core pro
essors.
-mhardlit
-mno-hardlit
Inline
onstants into the
ode stream if it
an be done in two instru
tions or
less.
-mdiv
-mno-div Use the divide instru
tion. (Enabled by default).
-mrelax-immediate
-mno-relax-immediate
-mwide-bitfields
-mno-wide-bitfields
-m4byte-fun
tions
-mno-4byte-fun
tions
-m
allgraph-data
-mno-
allgraph-data
-mslow-bytes
-mno-slow-bytes
145
-mlittle-endian
-mbig-endian
-m210
-m340
-EL
-mar h=ar h
Generate
ode that will run on ar
h, whi
h
an be the name of a generi
MIPS
ISA, or the name of a parti
ular pro
essor. The ISA names are: `mips1',
`mips2', `mips3', `mips4', `mips32', `mips32r2', and `mips64'. The pro
essor names are: `4k
', `4kp', `5k
', `20k
', `m4k', `r2000', `r3000', `r3900',
`r4000', `r4400', `r4600', `r4650', `r6000', `r8000', `rm7000', `rm9000', `orion',
`sb1', `vr4100', `vr4111', `vr4120', `vr4130', `vr4300', `vr5000', `vr5400' and
`vr5500'. The spe
ial value `from-abi' sele
ts the most
ompatible ar
hite
ture for the sele
ted ABI (that is, `mips1' for 32-bit ABIs and `mips3' for 64-bit
ABIs).
In pro
essor names, a nal `000'
an be abbreviated as `k' (for example,
`-mar
h=r2k'). Prexes are optional, and `vr' may be written `r'.
GCC denes two ma
ros based on the value of this option. The rst is
`_MIPS_ARCH', whi
h gives the name of target ar
hite
ture, as a string. The
se
ond has the form `_MIPS_ARCH_foo ', where foo is the
apitalized value
of `_MIPS_ARCH'. For example, `-mar
h=r2000' will set `_MIPS_ARCH' to
`"r2000"' and dene the ma
ro `_MIPS_ARCH_R2000'.
Note that the `_MIPS_ARCH' ma
ro uses the pro
essor names given above. In
other words, it will have the full prex and will not abbreviate `000' as `k'.
In the
ase of `from-abi', the ma
ro names the resolved ar
hite
ture (either
`"mips1"' or `"mips3"'). It names the default ar
hite
ture when no `-mar
h'
option is given.
-mtune=ar h
Optimize for ar
h. Among other things, this option
ontrols the way instru
tions are s
heduled, and the per
eived
ost of arithmeti
operations. The list
of ar
h values is the same as for `-mar
h'.
When this option is not used, GCC will optimize for the pro
essor spe
ied by
`-mar
h'. By using `-mar
h' and `-mtune' together, it is possible to generate
ode that will run on a family of pro
essors, but optimize the
ode for one
parti
ular member of that family.
`-mtune' denes the ma
ros `_MIPS_TUNE' and `_MIPS_TUNE_foo ', whi
h work
in the same way as the `-mar
h' ones des
ribed above.
-mips1
146
-mips2
-mips3
-mips4
-mips32
-mips32r2
-mips64
-mips16
-mno-mips16
-mabi=32
-mabi=o64
-mabi=n32
-mabi=64
-mabi=eabi
-mabi
alls
-mno-abi
alls
-mxgot
-mno-xgot
Lift (do not lift) the usual restri
tions on the size of the global oset table.
GCC normally uses a single instru
tion to load values from the GOT. While
this is relatively e
ient, it will only work if the GOT is smaller than about
64k. Anything larger will
ause the linker to report an error su
h as:
relo
ation trun
ated to fit: R_MIPS_GOT16 foobar
-mgp32
-mgp64
If this happens, you should re
ompile your
ode with `-mxgot'. It should then
work with very large GOTs, although it will also be less e
ient, sin
e it will
take three instru
tions to fet
h the value of a global symbol.
Note that some linkers
an
reate multiple GOTs. If you have su
h a linker,
you should only need to use `-mxgot' when a single obje
t le a
esses more
than 64k's worth of GOT entries. Very few do.
These options have no ee
t unless GCC is generating position independent
ode.
Assume that general-purpose registers are 32 bits wide.
Assume that general-purpose registers are 64 bits wide.
-mfp32
-mfp64
147
-mhard-float
-msoft-float
-msingle-float
Assume that the oating-point opro essor only supports single-pre ision operations.
-mdouble-float
Assume that the oating-point opro essor supports double-pre ision operations. This is the default.
-mpaired-single
-mno-paired-single
Use (do not use) paired-single
oating-point instru
tions. See Se
tion 5.45.5
[MIPS Paired-Single Support, page 290. This option
an only be used when
generating 64-bit
ode and requires hardware
oating-point support to be enabled.
-mips3d
-mno-mips3d
Use (do not use) the MIPS-3D ASE. See Se
tion 5.45.5.3 [MIPS-3D Built-in
Fun
tions, page 292. The option `-mips3d' implies `-mpaired-single'.
-mint64 For
e int and long types to be 64 bits wide. See `-mlong32' for an explanation
of the default and the way that the pointer size is determined.
This option has been depre
ated and will be removed in a future release.
-mlong64 For
e long types to be 64 bits wide. See `-mlong32' for an explanation of the
default and the way that the pointer size is determined.
-mlong32 For
e long, int, and pointer types to be 32 bits wide.
The default size of ints, longs and pointers depends on the ABI. All the
supported ABIs use 32-bit ints. The n64 ABI uses 64-bit longs, as does the
64-bit EABI; the others use 32-bit longs. Pointers are the same size as longs,
or the same size as integer registers, whi
hever is smaller.
-msym32
-mno-sym32
-G num
Assume (do not assume) that all symbols have 32-bit values, regardless of
the sele
ted ABI. This option is useful in
ombination with `-mabi=64' and
`-mno-abi
alls' be
ause it allows GCC to generate shorter and faster referen
es to symboli
addresses.
Put global and stati
items less than or equal to num bytes into the small data
or bss se
tion instead of the normal data or bss se
tion. This allows the data
to be a
essed using a single instru
tion.
148
All modules should be
ompiled with the same `-G num ' value.
-membedded-data
-mno-embedded-data
Allo
ate variables to the read-only data se
tion rst if possible, then next in the
small data se
tion if possible, otherwise in data. This gives slightly slower
ode
than the default, but redu
es the amount of RAM required when exe
uting,
and thus may be preferred for some embedded systems.
-muninit-
onst-in-rodata
-mno-uninit-
onst-in-rodata
Put uninitialized
onst variables in the read-only data se
tion. This option is
only meaningful in
onjun
tion with `-membedded-data'.
-msplit-addresses
-mno-split-addresses
Enable (disable) use of the %hi() and %lo() assembler relo
ation operators.
This option has been superseded by `-mexpli
it-relo
s' but is retained for
ba
kwards
ompatibility.
-mexpli
it-relo
s
-mno-expli
it-relo
s
Use (do not use) assembler relo
ation operators when dealing with symboli
addresses. The alternative, sele
ted by `-mno-expli
it-relo
s', is to use assembler ma
ros instead.
`-mexpli
it-relo
s' is the default if GCC was
ongured to use an assembler
that supports relo
ation operators.
-m
he
k-zero-division
-mno-
he
k-zero-division
The default is
-mdivide-traps
-mdivide-breaks
-mmem
py
-mno-mem
py
For e (do not for e) the use of mem py() for non-trivial blo k moves. The default is `-mno-mem py', whi h allows GCC to inline most onstant-sized opies.
149
-mlong-
alls
-mno-long-
alls
Disable (do not disable) use of the jal instru
tion. Calling fun
tions using
jal is more e
ient but requires the
aller and
allee to be in the same 256
megabyte segment.
This option has no ee
t on abi
alls
ode. The default is `-mno-long-
alls'.
-mmad
-mno-mad Enable (disable) use of the mad, madu and mul instru
tions, as provided by the
R4650 ISA.
-mfused-madd
-mno-fused-madd
-no pp
Enable (disable) use of the
oating point multiply-a
umulate instru
tions,
when they are available. The default is `-mfused-madd'.
When multiply-a
umulate instru
tions are used, the intermediate produ
t is
al
ulated to innite pre
ision and is not subje
t to the FCSR Flush to Zero
bit. This may be undesirable in some
ir
umstan
es.
Tell the MIPS assembler to not run its prepro
essor over user assembler les
(with a `.s' sux) when assembling them.
-mfix-r4000
-mno-fix-r4000
-mfix-r4400
-mno-fix-r4400
-mfix-vr4120
-mno-fix-vr4120
150
-mfix-vr4130
Work around the VR4130 mflo/mfhi errata. The workarounds are implemented
by the assembler rather than by GCC, although GCC will avoid using mflo and
mfhi if the VR4130 ma
, ma
hi, dma
and dma
hi instru
tions are available
instead.
-mfix-sb1
-mno-fix-sb1
Work around
ertain SB-1 CPU
ore errata. (This
ag
urrently works around
the SB-1 revision 2 \F1" and \F2"
oating point errata.)
-mflush-fun
=fun
-mno-flush-fun
Spe
ies the fun
tion to
all to
ush the I and D
a
hes, or to not
all any su
h
fun
tion. If
alled, the fun
tion must take the same arguments as the
ommon
_flush_fun
(), that is, the address of the memory range for whi
h the
a
he
is being
ushed, the size of the memory range, and the number 3 (to
ush
both
a
hes). The default depends on the target GCC was
ongured for, but
ommonly is either `_flush_fun
' or `__
pu_flush'.
-mbran
h-likely
-mno-bran
h-likely
Enable or disable use of Bran
h Likely instru
tions, regardless of the default
for the sele
ted ar
hite
ture. By default, Bran
h Likely instru
tions may be
generated if they are supported by the sele
ted ar
hite
ture. An ex
eption
is for the MIPS32 and MIPS64 ar
hite
tures and pro
essors whi
h implement
those ar
hite
tures; for those, Bran
h Likely instru
tions will not be generated
by default be
ause the MIPS32 and MIPS64 ar
hite
tures spe
i
ally depre
ate
their use.
-mfp-ex
eptions
-mno-fp-ex
eptions
-mvr4130-align
-mno-vr4130-align
The VR4130 pipeline is two-way supers
alar, but
an only issue two instru
tions
together if the rst one is 8-byte aligned. When this option is enabled, GCC
will align pairs of instru
tions that it thinks should exe
ute in parallel.
This option only has an ee
t when optimizing for the VR4130. It normally
makes
ode faster, but at the expense of making it bigger. It is enabled by
default at optimization level `-O3'.
151
-mlibfun
s
-mno-libfun
s
Spe
ify that intrinsi
library fun
tions are being
ompiled, passing all values in
registers, no matter the size.
-mepsilon
-mno-epsilon
-mabi=mmixware
-mabi=gnu
Generate
ode that passes fun
tion parameters and return values that (in the
alled fun
tion) are seen as registers $0 and up, as opposed to the GNU ABI
whi
h uses global registers $231 and up.
-mzero-extend
-mno-zero-extend
When reading data from memory in sizes shorter than 64 bits, use (do not use)
zero-extending load instru
tions by default, rather than sign-extending ones.
-mknuthdiv
-mno-knuthdiv
Make the result of a division yielding a remainder have the same sign as the
divisor. With the default, `-mno-knuthdiv', the sign of the remainder follows
the sign of the dividend. Both methods are arithmeti
ally valid, the latter being
almost ex
lusively used.
-mtoplevel-symbols
-mno-toplevel-symbols
Prepend (do not prepend) a `:' to all global symbols, so the assembly
ode
an
be used with the PREFIX assembly dire
tive.
-melf
Generate an exe
utable in the ELF format, rather than the default `mmo' format
used by the mmix simulator.
-mbran
h-predi
t
-mno-bran
h-predi
t
Use (do not use) the probable-bran h instru tions, when stati bran h predi tion indi ates a probable bran h.
-mbase-addresses
-mno-base-addresses
Generate (do not generate)
ode that uses base addresses. Using a base address
automati
ally generates a request (handled by the assembler and the linker)
for a
onstant to be set up in a global register. The register is used for one or
more base address requests within the range 0 to 255 from the value held in the
register. The generally leads to short and fast
ode, but the number of dierent
data items that
an be addressed is limited. This means that a program that
uses lots of stati
data may require `-mno-base-addresses'.
152
-msingle-exit
-mno-single-exit
For e (do not for e) generated ode to have a single exit point in ea h fun tion.
These `-m' options are dened for Matsushita MN10300 ar hite tures:
-mmult-bug
Generate
ode to avoid bugs in the multiply instru
tions for the MN10300
pro
essors. This is the default.
-mno-mult-bug
Do not generate
ode to avoid bugs in the multiply instru
tions for the MN10300
pro
essors.
-mam33
-mno-am33
-mno-
rt0
-mrelax
Generate
ode whi
h uses features spe
i
to the AM33 pro
essor.
Do not generate
ode whi
h uses features spe
i
to the AM33 pro
essor. This
is the default.
Do not link in the C run-time initialization obje
t le.
Indi
ate to the linker that it should perform a relaxation optimization pass to
shorten bran
hes,
alls and absolute memory addresses. This option only has
an ee
t when used on the
ommand line for the nal link step.
This option makes symboli
debugging impossible.
These are the `-m' options dened for the 32000 series. The default values for these options
depends on whi
h style of 32000 was sele
ted when the
ompiler was
ongured; the defaults
for the most
ommon
hoi
es are given below.
-m32032
-m32032
-m32332
-m32332
-m32532
-m32532
Generate output for a 32032. This is the default when the
ompiler is
ongured
for 32032 and 32016 based systems.
Generate output for a 32332. This is the default when the
ompiler is
ongured
for 32332-based systems.
Generate output for a 32532. This is the default when the
ompiler is
ongured
for 32532-based systems.
-m32081
Generate output
ontaining 32081 instru
tions for
oating point. This is the
default for all systems.
-m32381
Generate output
ontaining 32381 instru
tions for
oating point. This also
implies `-m32081'. The 32381 is only
ompatible with the 32332 and 32532
pus. This is the default for the p
532-netbsd
onguration.
153
-mmulti-add
Try and generate multiply-add
oating point instru
tions polyF and dotF. This
option is only available if the `-m32381' option is in ee
t. Using these instru
tions requires
hanges to register allo
ation whi
h generally has a negative impa
t on performan
e. This option should only be enabled when
ompiling
ode
parti
ularly likely to make heavy use of multiply-add instru
tions.
-mnomulti-add
Do not try and generate multiply-add oating point instru tions polyF and
Warning:
the req-
-mieee-
ompare
-mno-ieee-
ompare
Control whether or not the
ompiler uses IEEE
oating point
omparisons.
These handle
orre
tly the
ase where the result of a
omparison is unordered.
Warning: the requisite kernel support may not be available.
-mnobitfield
Do not use the bit-eld instru
tions. On some ma
hines it is faster to use
shifting and masking operations. This is the default for the p
532.
-mbitfield
-mrtd
Do use the bit-eld instru
tions. This is the default for all platforms ex
ept the
p
532.
Use a dierent fun
tion-
alling
onvention, in whi
h fun
tions that take a xed
number of arguments return pop their arguments on return with the ret instru
tion.
This
alling
onvention is in
ompatible with the one normally used on Unix, so
you
annot use it if you need to
all libraries
ompiled with the Unix
ompiler.
Also, you must provide fun
tion prototypes for all fun
tions that take variable
numbers of arguments (in
luding printf); otherwise in
orre
t
ode will be
generated for
alls to those fun
tions.
In addition, seriously in
orre
t
ode will result if you
all a fun
tion with too
many arguments. (Normally, extra arguments are harmlessly ignored.)
This option takes its name from the 680x0 rtd instru
tion.
-mregparam
Use a dierent fun
tion-
alling
onvention where the rst two arguments are
passed in registers.
This
alling
onvention is in
ompatible with the one normally used on Unix, so
you
annot use it if you need to
all libraries
ompiled with the Unix
ompiler.
-mnoregparam
-msb
Do not pass any arguments in registers. This is the default for all targets.
It is OK to use the sb as an index register whi
h is always loaded with zero.
This is the default for the p
532-netbsd target.
154
The sb register is not available for use or has not been initialized to zero by the
run time system. This is the default for all targets ex
ept the p
532-netbsd. It
is also implied whenever `-mhimem' or `-fpi
' is set.
Many ns32000 series addressing modes use displa
ements of up to 512MB. If
an address is above 512MB then displa
ements from zero
an not be used. This
option
auses
ode to be generated whi
h
an be loaded above 512MB. This
may be useful for operating systems or ROM
ode.
-mnosb
-mhimem
-mnohimem
Assume
ode will be loaded in the rst 512MB of virtual address spa
e. This
is the default for all platforms.
Use inline movmemhi patterns for
opying memory. This is the default.
Do not use inline movmemhi patterns for
opying memory.
-mint16
-mno-int32
-mint32
-mno-int16
-mfloat64
-mno-float32
-mfloat32
-mno-float64
-mabshi
-mno-abshi
155
-mbran h-expensive
Pretend that bran hes are expensive. This is for experimenting with ode generation only.
-mbran h- heap
Do not pretend that bran hes are expensive. This is the default.
-msplit
-mno-split
Generate ode for a system without split I&D. This is the default.
-munix-asm
-mde -asm
Use DEC assembler syntax. This is the default when
ongured for any PDP-11
target other than `pdp11-*-bsd'.
These are listed under See Se tion 3.17.23 [RS/6000 and PowerPC Options, page 155.
These `-m' options are dened for the IBM RS/6000 and PowerPC:
-mpower
-mno-power
-mpower2
-mno-power2
-mpowerp
-mno-powerp
-mpowerp
-gpopt
-mno-powerp
-gpopt
-mpowerp
-gfxopt
-mno-powerp
-gfxopt
-mpowerp
64
-mno-powerp
64
GCC supports two related instru
tion set ar
hite
tures for the RS/6000 and
PowerPC. The POWER instru
tion set are those instru
tions supported by
the `rios'
hip set used in the original RS/6000 systems and the PowerPC
instru
tion set is the ar
hite
ture of the Motorola MPC5xx, MPC6xx, MPC8xx
mi
ropro
essors, and the IBM 4xx mi
ropro
essors.
Neither ar
hite
ture is a subset of the other. However there is a large
ommon subset of instru
tions supported by both. An MQ register is in
luded in
pro
essors supporting the POWER ar
hite
ture.
You use these options to spe
ify whi
h instru
tions are available on the pro
essor
you are using. The default value of these options is determined when
onguring
GCC. Spe
ifying the `-m
pu=
pu_type ' overrides the spe
i
ation of these
156
options. We re
ommend you use the `-m
pu=
pu_type ' option rather than the
options listed above.
The `-mpower' option allows GCC to generate instru
tions that are found only
in the POWER ar
hite
ture and to use the MQ register. Spe
ifying `-mpower2'
implies `-power' and also allows GCC to generate instru
tions that are present
in the POWER2 ar
hite
ture but not the original POWER ar
hite
ture.
The `-mpowerp
' option allows GCC to generate instru
tions that are
found only in the 32-bit subset of the PowerPC ar
hite
ture. Spe
ifying
`-mpowerp
-gpopt' implies `-mpowerp
' and also allows GCC to use the
optional PowerPC ar
hite
ture instru
tions in the General Purpose group,
in
luding
oating-point square root. Spe
ifying `-mpowerp
-gfxopt' implies
`-mpowerp
' and also allows GCC to use the optional PowerPC ar
hite
ture
instru
tions in the Graphi
s group, in
luding
oating-point sele
t.
The `-mpowerp
64' option allows GCC to generate the additional 64-bit instru
tions that are found in the full PowerPC64 ar
hite
ture and to treat GPRs as
64-bit, doubleword quantities. GCC defaults to `-mno-powerp
64'.
If you spe
ify both `-mno-power' and `-mno-powerp
', GCC will use only the
instru
tions in the
ommon subset of both ar
hite
tures plus some spe
ial
AIX
ommon-mode
alls, and will not use the MQ register. Spe
ifying both
`-mpower' and `-mpowerp
' permits GCC to use any instru
tion from either
ar
hite
ture and to allow use of the MQ register; spe
ify this for the Motorola
MPC601.
-mnew-mnemoni
s
-mold-mnemoni
s
-m pu= pu_type
Set ar
hite
ture type, register usage,
hoi
e of mnemoni
s, and instru
tion
s
heduling parameters for ma
hine type
pu type. Supported values for
pu type are `401', `403', `405', `405fp', `440', `440fp', `505', `601', `602',
`603', `603e', `604', `604e', `620', `630', `740', `7400', `7450', `750', `801', `821',
`823', `860', `970', `8540', `
ommon', `e
603e', `G3', `G4', `G5', `power', `power2',
`power3', `power4', `power5', `powerp
', `powerp
64', `rios', `rios1', `rios2',
`rs
', and `rs64a'.
`-m
pu=
ommon' sele
ts a
ompletely generi
pro
essor. Code generated under
this option will run on any POWER or PowerPC pro
essor. GCC will use
157
only the instru
tions in the
ommon subset of both ar
hite
tures, and will not
use the MQ register. GCC assumes a generi
pro
essor model for s
heduling
purposes.
`-m
pu=power', `-m
pu=power2', `-m
pu=powerp
', and `-m
pu=powerp
64'
spe
ify generi
POWER, POWER2, pure 32-bit PowerPC (i.e., not MPC601),
and 64-bit PowerPC ar
hite
ture ma
hine types, with an appropriate, generi
pro
essor model assumed for s
heduling purposes.
The other options spe
ify a spe
i
pro
essor. Code generated under those
options will run best on that pro
essor, and may not run at all on others.
The `-m
pu' options automati
ally enable or disable the following options:
`-maltive
', `-mhard-float', `-mmf
rf', `-mmultiple', `-mnew-mnemoni
s',
`-mpower', `-mpower2', `-mpowerp
64', `-mpowerp
-gpopt', `-mpowerp
-gfxopt',
`-mstring'. The parti
ular options set for any parti
ular CPU will vary
between
ompiler versions, depending on what setting seems to produ
e
optimal
ode for that CPU; it doesn't ne
essarily re
e
t the a
tual hardware's
apabilities. If you wish to set an individual option to a parti
ular value, you
may spe
ify it after the `-m
pu' option, like `-m
pu=970 -mno-altive
'.
On AIX, the `-maltive
' and `-mpowerp
64' options are not enabled or disabled
by the `-m
pu' option at present, sin
e AIX does not have full support for these
options. You may still enable or disable them individually if you're sure it'll
work in your environment.
-mtune=
pu_type
Set the instru
tion s
heduling parameters for ma
hine type
pu type, but
do not set the ar
hite
ture type, register usage, or
hoi
e of mnemoni
s,
as `-m
pu=
pu_type ' would. The same values for
pu type are used for
`-mtune' as for `-m
pu'. If both are spe
ied, the
ode generated will use
the ar
hite
ture, registers, and mnemoni
s set by `-m
pu', but the s
heduling
parameters set by `-mtune'.
-maltive
-mno-altive
Generate
ode that uses (does not use) AltiVe
instru
tions, and also enable the
use of built-in fun
tions that allow more dire
t a
ess to the AltiVe
instru
tion
set. You may also need to set `-mabi=altive
' to adjust the
urrent ABI with
AltiVe
ABI enhan
ements.
-mabi=spe
Extend the
urrent ABI with SPE ABI extensions. This does not
hange the
default ABI, instead it adds the SPE ABI extensions to the
urrent ABI.
-mabi=no-spe
-misel=yes/no
-misel
This swit
h enables or disables the generation of ISEL instru
tions.
-mspe=yes/no
-mspe
This swit
h enables or disables the generation of SPE simd instru
tions.
158
-mfloat-gprs=yes/single/double/no
-mfloat-gprs
-m32
-m64
Generate
ode for 32-bit or 64-bit environments of Darwin and SVR4 targets
(in
luding GNU/Linux). The 32-bit environment sets int, long and pointer
to 32 bits and generates
ode that runs on any PowerPC variant. The 64-bit
environment sets int to 32 bits and long and pointer to 64 bits, and generates
ode for PowerPC64, as for `-mpowerp
64'.
-mfull-to
-mno-fp-in-to
-mno-sum-in-to
-mminimal-to
Modify generation of the TOC (Table Of Contents), whi
h is
reated for every
exe
utable le. The `-mfull-to
' option is sele
ted by default. In that
ase,
GCC will allo
ate at least one TOC entry for ea
h unique non-automati
variable referen
e in your program. GCC will also pla
e
oating-point
onstants in
the TOC. However, only 16,384 entries are available in the TOC.
If you re
eive a linker error message that saying you have over
owed the available TOC spa
e, you
an redu
e the amount of TOC spa
e used with the
`-mno-fp-in-to
' and `-mno-sum-in-to
' options. `-mno-fp-in-to
' prevents
GCC from putting
oating-point
onstants in the TOC and `-mno-sum-in-to
'
for
es GCC to generate
ode to
al
ulate the sum of an address and a
onstant
at run-time instead of putting that sum into the TOC. You may spe
ify one
or both of these options. Ea
h
auses GCC to produ
e very slightly slower and
larger
ode at the expense of
onserving TOC spa
e.
If you still run out of spa
e in the TOC even when you spe
ify both of these
options, spe
ify `-mminimal-to
' instead. This option
auses GCC to make
only one TOC entry for every le. When you spe
ify this option, GCC will
produ
e
ode that is slower and larger but whi
h uses extremely little TOC
spa
e. You may wish to use this option only on les that
ontain less frequently
exe
uted
ode.
-maix64
-maix32
Enable 64-bit AIX ABI and
alling
onvention: 64-bit pointers, 64-bit long
type, and the infrastru
ture needed to support them. Spe
ifying `-maix64'
implies `-mpowerp
64' and `-mpowerp
', while `-maix32' disables the 64-bit
ABI and implies `-mno-powerp
64'. GCC defaults to `-maix32'.
159
-mxl-
ompat
-mno-xl-
ompat
Produ
e
ode that
onforms more
losely to IBM XLC semanti
s when using
AIX-
ompatible ABI. Pass
oating-point arguments to prototyped fun
tions
beyond the register save area (RSA) on the sta
k in addition to argument
FPRs. Do not assume that most signi
ant double in 128 bit long double value
is properly rounded when
omparing values.
The AIX
alling
onvention was extended but not initially do
umented to handle an obs
ure K&R C
ase of
alling a fun
tion that takes the address of
its arguments with fewer arguments than de
lared. AIX XL
ompilers a
ess
oating point arguments whi
h do not t in the RSA from the sta
k when a
subroutine is
ompiled without optimization. Be
ause always storing
oatingpoint arguments on the sta
k is ine
ient and rarely needed, this option is not
enabled by default and only is ne
essary when
alling subroutines
ompiled by
AIX XL
ompilers without optimization.
-mpe
-malign-natural
-malign-power
-msoft-float
-mhard-float
Generate
ode that does not use (uses) the
oating-point register set. Software
oating point emulation is provided if you use the `-msoft-float' option, and
pass the option to GCC when linking.
-mmultiple
-mno-multiple
Generate
ode that uses (does not use) the load multiple word instru
tions
and the store multiple word instru
tions. These instru
tions are generated by
default on POWER systems, and not generated on PowerPC systems. Do not
use `-mmultiple' on little endian PowerPC systems, sin
e those instru
tions
do not work when the pro
essor is in little endian mode. The ex
eptions are
PPC740 and PPC750 whi
h permit the instru
tions usage in little endian mode.
160
-mstring
-mno-string
Generate
ode that uses (does not use) the load string instru
tions and the
store string word instru
tions to save multiple registers and do small blo
k
moves. These instru
tions are generated by default on POWER systems, and
not generated on PowerPC systems. Do not use `-mstring' on little endian
PowerPC systems, sin
e those instru
tions do not work when the pro
essor is
in little endian mode. The ex
eptions are PPC740 and PPC750 whi
h permit
the instru
tions usage in little endian mode.
-mupdate
-mno-update
Generate
ode that uses (does not use) the load or store instru
tions that update
the base register to the address of the
al
ulated memory lo
ation. These
instru
tions are generated by default. If you use `-mno-update', there is a small
window between the time that the sta
k pointer is updated and the address of
the previous frame is stored, whi
h means
ode that walks the sta
k frame
a
ross interrupts or signals may get
orrupted data.
-mfused-madd
-mno-fused-madd
Generate
ode that uses (does not use) the
oating point multiply and a
umulate instru
tions. These instru
tions are generated by default if hardware
oating is used.
-mno-bit-align
-mbit-align
On System V.4 and embedded PowerPC systems do not (do) for
e stru
tures
and unions that
ontain bit-elds to be aligned to the base type of the bit-eld.
For example, by default a stru
ture
ontaining nothing but 8 unsigned bitelds of length 1 would be aligned to a 4 byte boundary and have a size of 4
bytes. By using `-mno-bit-align', the stru
ture would be aligned to a 1 byte
boundary and be one byte in size.
-mno-stri
t-align
-mstri
t-align
On System V.4 and embedded PowerPC systems do not (do) assume that unaligned memory referen es will be handled by the system.
-mrelo
atable
-mno-relo
atable
On embedded PowerPC systems generate
ode that allows (does not allow)
the program to be relo
ated to a dierent address at runtime. If you use
`-mrelo
atable' on any module, all obje
ts linked together must be
ompiled
with `-mrelo
atable' or `-mrelo
atable-lib'.
-mrelo
atable-lib
-mno-relo
atable-lib
On embedded PowerPC systems generate
ode that allows (does not allow) the
program to be relo
ated to a dierent address at runtime. Modules
ompiled
161
ister 2
ontains a pointer to a global area pointing to the addresses used in the
program.
-mlittle
-mlittle-endian
On System V.4 and embedded PowerPC systems
ompile
ode for the pro
essor
in little endian mode. The `-mlittle-endian' option is the same as `-mlittle'.
-mbig
-mbig-endian
On System V.4 and embedded PowerPC systems
ompile
ode for the pro
essor
in big endian mode. The `-mbig-endian' option is the same as `-mbig'.
-mdynami -no-pi
-mprioritize-restri ted-insns=priority
This option
ontrols the priority that is assigned to dispat
h-slot restri
ted
instru
tions during the se
ond s
heduling pass. The argument priority takes
the value 0/1/2 to assign no/highest/se
ond-highest priority to dispat
h slot
restri
ted instru
tions.
This option
ontrols whi
h dependen
es are
onsidered
ostly by the target
during instru
tion s
heduling. The argument dependen
e type takes one of the
following values: no: no dependen
e is
ostly, all: all dependen
es are
ostly,
true store to load: a true dependen
e from store to load is
ostly, store to load:
any dependen
e from store to load is
ostly, number: any dependen
e whi
h
laten
y >= number is
ostly.
This option
ontrols whi
h nop insertion s
heme will be used during the se
ond
s
heduling pass. The argument s
heme takes one of the following values: no:
Don't insert nops. pad: Pad with nops any dispat
h group whi
h has va
ant
issue slots, a
ording to the s
heduler's grouping. regroup exa
t: Insert nops
to for
e
ostly dependent insns into separate groups. Insert exa
tly as many
nops as needed to for
e an insn to a new group, a
ording to the estimated
pro
essor grouping. number: Insert nops to for
e
ostly dependent insns into
separate groups. Insert number nops to for
e an insn to a new group.
-m all-sysv
On System V.4 and embedded PowerPC systems
ompile
ode using
alling
onventions that adheres to the Mar
h 1995 draft of the System V Appli
ation
162
Binary Interfa
e, PowerPC pro
essor supplement. This is the default unless
you
ongured GCC using `powerp
-*-eabiaix'.
-m
all-sysv-eabi
-m all-sysv-noeabi
-m all-solaris
On System V.4 and embedded PowerPC systems
ompile
ode for the Solaris
operating system.
-m all-linux
On System V.4 and embedded PowerPC systems ompile ode for the Linuxbased GNU system.
-m all-gnu
On System V.4 and embedded PowerPC systems ompile ode for the Hurdbased GNU system.
-m all-netbsd
On System V.4 and embedded PowerPC systems
ompile
ode for the NetBSD
operating system.
-maix-stru t-return
Return all stru tures in memory (as spe ied by the AIX ABI).
-msvr4-stru t-return
Return stru
tures smaller than 8 bytes in registers (as spe
ied by the SVR4
ABI).
-mabi=altive
Extend the
urrent ABI with AltiVe
ABI extensions. This does not
hange
the default ABI, instead it adds the AltiVe
ABI extensions to the
urrent ABI.
-mabi=no-altive
-mprototype
-mno-prototype
-msim
-mmvme
On System V.4 and embedded PowerPC systems assume that all
alls to variable argument fun
tions are properly prototyped. Otherwise, the
ompiler must
insert an instru
tion before every non prototyped
all to set or
lear bit 6
of the
ondition
ode register (CR) to indi
ate whether
oating point values
were passed in the
oating point registers in
ase the fun
tion takes a variable
arguments. With `-mprototype', only
alls to prototyped variable argument
fun
tions will set or
lear the bit.
On embedded PowerPC systems, assume that the startup module is
alled
`sim-
rt0.o' and that the standard C libraries are `libsim.a' and `lib
.a'.
This is the default for `powerp
-*-eabisim'.
ongurations.
On embedded PowerPC systems, assume that the startup module is
alled
`
rt0.o' and the standard C libraries are `libmvme.a' and `lib
.a'.
-mads
163
-myellowknife
-mvxworks
-mwindiss
-memb
-meabi
-mno-eabi
On System V.4 and embedded PowerPC systems, spe
ify that you are
ompiling
for a VxWorks system.
Spe
ify that you are
ompiling for the WindISS simulation environment.
On embedded PowerPC systems, set the PPC EMB bit in the ELF
ags header
to indi
ate that `eabi' extended relo
ations are used.
On System V.4 and embedded PowerPC systems do (do not) adhere to the
Embedded Appli
ations Binary Interfa
e (eabi) whi
h is a set of modi
ations
to the System V.4 spe
i
ations. Sele
ting `-meabi' means that the sta
k is
aligned to an 8 byte boundary, a fun
tion __eabi is
alled to from main to set
up the eabi environment, and the `-msdata' option
an use both r2 and r13
to point to two separate small data areas. Sele
ting `-mno-eabi' means that
the sta
k is aligned to a 16 byte boundary, do not
all an initialization fun
tion
from main, and the `-msdata' option will only use r13 to point to a single small
data area. The `-meabi' option is on by default if you
ongured GCC using
one of the `powerp
*-*-eabi*' options.
-msdata=eabi
On System V.4 and embedded PowerPC systems, put small initialized
onst
global and stati
data in the `.sdata2' se
tion, whi
h is pointed to by register
r2. Put small initialized non-
onst global and stati
data in the `.sdata'
se
tion, whi
h is pointed to by register r13. Put small uninitialized global and
stati
data in the `.sbss' se
tion, whi
h is adja
ent to the `.sdata' se
tion.
The `-msdata=eabi' option is in
ompatible with the `-mrelo
atable' option.
The `-msdata=eabi' option also sets the `-memb' option.
-msdata=sysv
On System V.4 and embedded PowerPC systems, put small global and stati
data in the `.sdata' se
tion, whi
h is pointed to by register r13. Put small
uninitialized global and stati
data in the `.sbss' se
tion, whi
h is adja
ent
to the `.sdata' se
tion. The `-msdata=sysv' option is in
ompatible with the
`-mrelo
atable' option.
-msdata=default
-msdata On System V.4 and embedded PowerPC systems, if `-meabi' is used,
ompile
ode the same as `-msdata=eabi', otherwise
ompile
ode the same as
`-msdata=sysv'.
164
-msdata-data
On System V.4 and embedded PowerPC systems, put small global and stati
data in the `.sdata' se
tion. Put small uninitialized global and stati
data in
the `.sbss' se
tion. Do not use register r13 to address small data however.
This is the default behavior unless other `-msdata' options are used.
-msdata=none
-mno-sdata
On embedded PowerPC systems, put all initialized global and stati
data in
the `.data' se
tion, and all uninitialized data in the `.bss' se
tion.
-G num
On embedded PowerPC systems, put global and stati
items less than or equal
to num bytes into the small data or bss se
tions instead of the normal data or
bss se
tion. By default, num is 8. The `-G num ' swit
h is also passed to the
linker. All modules should be
ompiled with the same `-G num ' value.
-mregnames
-mno-regnames
On System V.4 and embedded PowerPC systems do (do not) emit register
names in the assembly language output using symboli
forms.
-mlong
all
-mno-long
all
Default to making all fun
tion
alls indire
tly, using a register, so that fun
tions
whi
h reside further than 32 megabytes (33,554,432 bytes) from the
urrent lo
ation
an be
alled. This setting
an be overridden by the short
all fun
tion
attribute, or by #pragma long
all(0).
Some linkers are
apable of dete
ting out-of-range
alls and generating glue
ode on the
y. On these systems, long
alls are unne
essary and generate
slower
ode. As of this writing, the AIX linker
an do this, as
an the GNU
linker for PowerPC/64. It is planned to add this feature to the GNU linker for
32-bit PowerPC systems as well.
On Darwin/PPC systems, #pragma long
all will generate \jbsr
allee, L42",
plus a \bran
h island" (glue
ode). The two target addresses represent the
allee and the \bran
h island". The Darwin/PPC linker will prefer the rst
address and generate a \bl
allee" if the PPC \bl" instru
tion will rea
h the
allee dire
tly; otherwise, the linker will generate \bl L42" to
all the \bran
h
island". The \bran
h island" is appended to the body of the
alling fun
tion;
it
omputes the full 32-bit address of the
allee and jumps to it.
On Ma
h-O (Darwin) systems, this option dire
ts the
ompiler emit to the glue
for every dire
t
all, and the Darwin linker de
ides whether to use or dis
ard
it.
In the future, we may
ause GCC to ignore all long
all spe
i
ations when the
linker is known to generate glue.
-pthread Adds support for multithreading with the pthreads library. This option sets
165
These are the `-m' options dened for the S/390 and zSeries ar
hite
ture.
-mhard-float
-msoft-float
Use (do not use) the hardware
oating-point instru
tions and registers
for
oating-point operations. When `-msoft-float' is spe
ied, fun
tions
in `libg
.a' will be used to perform
oating-point operations. When
`-mhard-float' is spe
ied, the
ompiler generates IEEE
oating-point
instru
tions. This is the default.
-mba
k
hain
-mno-ba
k
hain
Store (do not store) the address of the
aller's frame as ba
k
hain pointer into
the
allee's sta
k frame. A ba
k
hain may be needed to allow debugging using tools that do not understand DWARF-2
all frame information. When
`-mno-pa
ked-sta
k' is in ee
t, the ba
k
hain pointer is stored at the bottom
of the sta
k frame; when `-mpa
ked-sta
k' is in ee
t, the ba
k
hain is pla
ed
into the topmost word of the 96/160 byte register save area.
In general,
ode
ompiled with `-mba
k
hain' is
all-
ompatible with
ode
ompiled with `-mmo-ba
k
hain'; however, use of the ba
k
hain for debugging purposes usually requires that the whole binary is built with `-mba
k
hain'. Note
that the
ombination of `-mba
k
hain', `-mpa
ked-sta
k' and `-mhard-float'
is not supported. In order to build a linux kernel use `-msoft-float'.
The default is to not maintain the ba
k
hain.
-mpa
ked-sta
k
-mno-pa
ked-sta
k
Use (do not use) the pa
ked sta
k layout. When `-mno-pa
ked-sta
k' is spe
ied, the
ompiler uses the all elds of the 96/160 byte register save area
only for their default purpose; unused elds still take up sta
k spa
e. When
`-mpa
ked-sta
k' is spe
ied, register save slots are densely pa
ked at the top
of the register save area; unused spa
e is reused for other purposes, allowing for
more e
ient use of the available sta
k spa
e. However, when `-mba
k
hain'
is also in ee
t, the topmost word of the save area is always used to store the
ba
k
hain, and the return address register is always saved two words below the
ba
k
hain.
As long as the sta
k frame ba
k
hain is not used,
ode generated
with `-mpa
ked-sta
k' is
all-
ompatible with
ode generated with
`-mno-pa
ked-sta
k'. Note that some non-FSF releases of GCC 2.95 for
S/390 or zSeries generated
ode that uses the sta
k frame ba
k
hain at run
time, not just for debugging purposes. Su
h
ode is not
all-
ompatible with
ode
ompiled with `-mpa
ked-sta
k'. Also, note that the
ombination of
`-mba
k
hain', `-mpa
ked-sta
k' and `-mhard-float' is not supported. In
order to build a linux kernel use `-msoft-float'.
The default is to not use the pa
ked sta
k layout.
166
-msmall-exe
-mno-small-exe
Generate (or do not generate)
ode using the bras instru
tion to do subroutine
alls. This only works reliably if the total exe
utable size does not ex
eed 64k.
The default is to use the basr instru
tion instead, whi
h does not have this
limitation.
-m64
-m31
-mzar
h
-mesa
When `-m31' is spe
ied, generate
ode
ompliant to the GNU/Linux for S/390
ABI. When `-m64' is spe
ied, generate
ode
ompliant to the GNU/Linux for
zSeries ABI. This allows GCC in parti
ular to generate 64-bit instru
tions. For
the `s390' targets, the default is `-m31', while the `s390x' targets default to
`-m64'.
When `-mzar
h' is spe
ied, generate
ode using the instru
tions available on
z/Ar
hite
ture. When `-mesa' is spe
ied, generate
ode using the instru
tions
available on ESA/390. Note that `-mesa' is not possible with `-m64'. When
generating
ode
ompliant to the GNU/Linux for S/390 ABI, the default is
`-mesa'. When generating
ode
ompliant to the GNU/Linux for zSeries ABI,
the default is `-mzar
h'.
-mmv
le
-mno-mv
le
Generate (or do not generate)
ode using the mv
le instru
tion to perform
blo
k moves. When `-mno-mv
le' is spe
ied, use a mv
loop instead. This is
the default.
-mdebug
-mno-debug
Print (or do not print) additional debug information when
ompiling. The
default is to not print debug information.
-mar h= pu-type
Generate
ode that will run on
pu-type, whi
h is the name of a system representing a
ertain pro
essor type. Possible values for
pu-type are `g5', `g6',
`z900', and `z990'. When generating
ode using the instru
tions available
on z/Ar
hite
ture, the default is `-mar
h=z900'. Otherwise, the default is
`-mar
h=g5'.
-mtune= pu-type
Tune to
pu-type everything appli
able about the generated
ode, ex
ept for
the ABI and the set of available instru
tions. The list of
pu-type values is the
same as for `-mar
h'. The default is the value used for `-mar
h'.
-mtpf-tra
e
-mno-tpf-tra
e
Generate
ode that adds (does not add) in TPF OS spe
i
bran
hes to tra
e
routines in the operating system. This option is o by default, even when
ompiling for the TPF OS.
167
-mfused-madd
-mno-fused-madd
Generate
ode that uses (does not use) the
oating point multiply and a
umulate instru
tions. These instru
tions are generated by default if hardware
oating point is used.
-mwarn-framesize=framesize
Emit a warning if the
urrent fun
tion ex
eeds the given frame size. Be
ause
this is a
ompile time
he
k it doesn't need to be a real problem when the
program runs. It is intended to identify fun
tions whi
h most probably
ause
a sta
k over
ow. It is useful to be used in an environment with limited sta
k
size e.g. the linux kernel.
-mwarn-dynami sta k
Emit a warning if the fun
tion
alls allo
a or uses dynami
ally sized arrays.
This is generally a bad idea with a limited sta
k size.
These arguments always have to be used in
onjun
tion. If they are present
the s390 ba
k end emits additional instru
tions in the fun
tion prologue whi
h
trigger a trap if the sta
k size is sta
k-guard bytes above the sta
k-size (remember that the sta
k on s390 grows downward). These options are intended to
be used to help debugging sta
k over
ow problems. The additionally emitted
ode
ause only little overhead and hen
e
an also be used in produ
tion like
systems without greater performan
e degradation. The given values have to be
exa
t powers of 2 and sta
k-size has to be greater than sta
k-guard. In order
to be e
ient the extra
ode makes the assumption that the sta
k starts at an
address aligned to the value given by sta
k-size.
3.17.25 SH Options
-m4-single-only
Generate ode for the SH4 with a oating-point unit that only supports singlepre ision arithmeti .
-m4-single
Generate
ode for the SH4 assuming the
oating-point unit is in single-pre
ision
mode by default.
168
-m4
-m4a-nofpu
Generate ode for the SH4al-dsp, or for a SH4a in su h a way that the oatingpoint unit is not used.
-m4a-single-only
Generate
ode for the SH4a, in su
h a way that no double-pre
ision
oating
point operations are used.
-m4a-single
Use 32-bit osets in swit
h tables. The default is to use 16-bit osets.
Enable the use of the instru
tion fmovd.
Comply with the
alling
onventions dened by Renesas.
Comply with the
alling
onventions dened by Renesas.
-mno-renesas
Comply with the
alling
onventions dened for GCC before the Renesas
onventions were available. This option is the default for all targets of the SH
tool
hain ex
ept for `sh-symbianelf'.
-mnoma
save
-mieee
-misize
Mark the MAC register as
all-
lobbered, even if `-mhita
hi' is given.
In
rease IEEE-
omplian
e of
oating-point
ode.
Dump instru
tion size and lo
ation in the assembly
ode.
-mpadstru t
-mspa e
This option is depre
ated. It pads stru
tures to multiple of 4 bytes, whi
h is
in
ompatible with the SH ABI.
Optimize for spa
e instead of speed. Implied by `-Os'.
169
-mprefergot
When generating position-independent
ode, emit fun
tion
alls using the
Global Oset Table instead of the Pro
edure Linkage Table.
-musermode
Generate a library fun
tion
all to invalidate instru
tion
a
he entries, after
xing up a trampoline. This library fun
tion
all doesn't assume it
an write
to the whole memory address spa
e. This is the default when the target is
sh-*-linux*.
Spe
ify `-mapp-regs' to generate output using the global registers 2 through 4,
whi
h the SPARC SVR4 ABI reserves for appli
ations. This is the default.
To be fully SVR4 ABI
ompliant at the
ost of some performan
e loss, spe
ify
`-mno-app-regs'. You should
ompile libraries and system software with this
option.
-mfpu
-mhard-float
Generate output ontaining oating point instru tions. This is the default.
-mno-fpu
-msoft-float
Generate output
ontaining library
alls for
oating point. Warning: the requisite libraries are not available for all SPARC targets. Normally the fa
ilities
of the ma
hine's usual C
ompiler are used, but this
annot be done dire
tly in
ross-
ompilation. You must make your own arrangements to provide suitable
library fun
tions for
ross-
ompilation. The embedded targets `spar
-*-aout'
and `spar
lite-*-*' do provide software
oating point support.
`-msoft-float'
hanges the
alling
onvention in the output le; therefore, it
is only useful if you
ompile all of a program with this option. In parti
ular, you need to
ompile `libg
.a', the library that
omes with GCC, with
`-msoft-float' in order for this to work.
-mhard-quad-float
Generate output ontaining quad-word (long double) oating point instru tions.
-msoft-quad-float
Generate output
ontaining library
alls for quad-word (long double)
oating
point instru
tions. The fun
tions
alled are those spe
ied in the SPARC ABI.
This is the default.
As of this writing, there are no SPARC implementations that have hardware
support for the quad-word
oating point instru
tions. They all invoke a trap
handler for one of these instru
tions, and then the trap handler emulates the
ee
t of the instru
tion. Be
ause of the trap handler overhead, this is mu
h
170
slower than
alling the ABI library routines. Thus the `-msoft-quad-float'
option is the default.
-mno-unaligned-doubles
-munaligned-doubles
-mno-faster-stru
ts
-mfaster-stru
ts
With `-mfaster-stru
ts', the
ompiler assumes that stru
tures should have
8 byte alignment. This enables the use of pairs of ldd and std instru
tions
for
opies in stru
ture assignment, in pla
e of twi
e as many ld and st pairs.
However, the use of this
hanged alignment dire
tly violates the SPARC ABI.
Thus, it's intended only for use on targets where the developer a
knowledges
that their resulting
ode will not be dire
tly in line with the rules of the ABI.
-mimpure-text
`-mimpure-text', used in addition to `-shared', tells the
ompiler to not pass
`-z text' to the linker when linking a shared obje
t. Using this option, you
an
-m pu= pu_type
Set the instru
tion set, register set, and instru
tion s
heduling parameters for
ma
hine type
pu type. Supported values for
pu type are `v7', `
ypress',
`v8', `superspar
', `spar
lite', `f930', `f934', `hyperspar
', `spar
lite86x',
`spar
let', `ts
701', `v9', `ultraspar
', and `ultraspar
3'.
Default instru
tion s
heduling parameters are used for values that sele
t an
ar
hite
ture and not an implementation. These are `v7', `v8', `spar
lite',
`spar
let', `v9'.
Here is a list of ea
h supported ar
hite
ture and their supported implementations.
v7:
v8:
spar
lite:
spar
let:
v9:
ypress
superspar
, hyperspar
f930, f934, spar
lite86x
ts
701
ultraspar
, ultraspar
3
171
By default (unless
ongured otherwise), GCC generates
ode for the V7 variant of the SPARC ar
hite
ture. With `-m
pu=
ypress', the
ompiler additionally optimizes it for the Cypress CY7C602
hip, as used in the SPARCStation/SPARCServer 3xx series. This is also appropriate for the older SPARCStation 1, 2, IPX et
.
With `-m
pu=v8', GCC generates
ode for the V8 variant of the SPARC ar
hite
ture. The only dieren
e from V7
ode is that the
ompiler emits the integer
multiply and integer divide instru
tions whi
h exist in SPARC-V8 but not in
SPARC-V7. With `-m
pu=superspar
', the
ompiler additionally optimizes it
for the SuperSPARC
hip, as used in the SPARCStation 10, 1000 and 2000
series.
With `-m
pu=spar
lite', GCC generates
ode for the SPARClite variant of the
SPARC ar
hite
ture. This adds the integer multiply, integer divide step and
s
an (ffs) instru
tions whi
h exist in SPARClite but not in SPARC-V7. With
`-m
pu=f930', the
ompiler additionally optimizes it for the Fujitsu MB86930
hip, whi
h is the original SPARClite, with no FPU. With `-m
pu=f934', the
ompiler additionally optimizes it for the Fujitsu MB86934
hip, whi
h is the
more re
ent SPARClite with FPU.
With `-m
pu=spar
let', GCC generates
ode for the SPARClet variant of the
SPARC ar
hite
ture. This adds the integer multiply, multiply/a
umulate,
integer divide step and s
an (ffs) instru
tions whi
h exist in SPARClet but
not in SPARC-V7. With `-m
pu=ts
701', the
ompiler additionally optimizes
it for the TEMIC SPARClet
hip.
With `-m
pu=v9', GCC generates
ode for the V9 variant of the SPARC ar
hite
ture. This adds 64-bit integer and
oating-point move instru
tions, 3 additional
oating-point
ondition
ode registers and
onditional move instru
tions.
With `-m
pu=ultraspar
', the
ompiler additionally optimizes it for the Sun
UltraSPARC I/II
hips. With `-m
pu=ultraspar
3', the
ompiler additionally
optimizes it for the Sun UltraSPARC III
hip.
-mtune=
pu_type
Set the instru
tion s
heduling parameters for ma
hine type
pu type, but do
not set the instru
tion set or register set that the option `-m
pu=
pu_type '
would.
The same values for `-m
pu=
pu_type '
an be used for `-mtune=
pu_type ',
but the only useful values are those that sele
t a parti
ular
pu implementation. Those are `
ypress', `superspar
', `hyperspar
', `f930', `f934',
`spar
lite86x', `ts
701', `ultraspar
', and `ultraspar
3'.
-mv8plus
-mno-v8plus
With `-mv8plus', GCC generates
ode for the SPARC-V8+ ABI. The dieren
e
from the V8 ABI is that the global and out registers are
onsidered 64-bit
wide. This is enabled by default on Solaris in 32-bit mode for all SPARC-V9
pro
essors.
172
-mvis
-mno-vis With `-mvis', GCC generates
ode that takes advantage of the UltraSPARC
Visual Instru
tion Set extensions. The default is `-mno-vis'.
These `-m' options are supported in addition to the above on SPARC-V9 pro
essors in
64-bit environments:
-mlittle-endian
Generate
ode for a pro
essor running in little-endian mode. It is only available
for a few
ongurations and most notably not on Solaris and Linux.
-m32
-m64
Generate
ode for a 32-bit or 64-bit environment. The 32-bit environment sets
int, long and pointer to 32 bits. The 64-bit environment sets int to 32 bits and
long and pointer to 64 bits.
-m model=medlow
Generate
ode for the Medium/Low
ode model: 64-bit addresses, programs
must be linked in the low 32 bits of memory. Programs
an be stati
ally or
dynami
ally linked.
-m model=medmid
Generate
ode for the Medium/Middle
ode model: 64-bit addresses, programs
must be linked in the low 44 bits of memory, the text and data segments must
be less than 2GB in size and the data segment must be lo
ated within 2GB of
the text segment.
-m model=medany
Generate
ode for the Medium/Anywhere
ode model: 64-bit addresses, programs may be linked anywhere in memory, the text and data segments must
be less than 2GB in size and the data segment must be lo
ated within 2GB of
the text segment.
-m model=embmedany
Generate
ode for the Medium/Anywhere
ode model for embedded systems:
64-bit addresses, the text and data segments must be less than 2GB in size, both
starting anywhere in memory (determined at link time). The global register
%g4 points to the base of the data segment. Programs are stati
ally linked and
PIC is not supported.
-msta
k-bias
-mno-sta
k-bias
With `-msta
k-bias', GCC assumes that the sta
k pointer, and frame pointer
if present, are oset by 2047 whi
h must be added ba
k when making sta
k
frame referen
es. This is the default in 64-bit mode. Otherwise, assume no
su
h oset is present.
These swit
hes are supported in addition to the above on Solaris:
-threads Add support for multithreading using the Solaris threads library. This option
sets
ags for both the prepro
essor and linker. This option does not ae
t
the thread safety of obje
t
ode produ
ed by the
ompiler or that of libraries
supplied with it.
-pthreads
173
Add support for multithreading using the POSIX threads library. This option
sets
ags for both the prepro
essor and linker. This option does not ae
t
the thread safety of obje
t
ode produ
ed by the
ompiler or that of libraries
supplied with it.
These additional options are available on System V Release 4 for
ompatibility with other
ompilers on those systems:
-G
-Qy
-Qn
Refrain from adding .ident dire tives to the output le (this is the default).
-YP,dirs
Sear h the dire tories dirs, and no others, for libraries spe ied with `-l'.
-Ym,dir
Look in the dire
tory dir to nd the M4 prepro
essor. The assembler uses this
option.
Set the instru
tion set, register set, and instru
tion s
heduling parameters for
ma
hine type
pu type. Supported values for
pu type are `
30', `
31', `
32',
`
40', and `
44'. The default is `
40' to generate
ode for the TMS320C40.
-mbig-memory
-mbig
-msmall-memory
-msmall Generates
ode for the big or small memory model. The small memory model
assumed that all data ts into one 64K word page. At run-time the data page
(DP) register must be set to point to the 64K page
ontaining the .bss and .data
program se
tions. The big memory model is the default and requires reloading
of the DP register for every dire
t memory a
ess.
-mbk
-mno-bk
-mdb
-mno-db
Allow (disallow) allo
ation of general integer operands into the blo
k
ount
register BK.
Enable (disable) generation of
ode using de
rement and bran
h, DB
ond(D),
instru
tions. This is enabled by default for the C4x. To be on the safe side,
this is disabled for the C3x, sin
e the maximum iteration
ount on the C3x is
223 + 1 (but who iterates loops more than 223 times on the C3x?). Note that
GCC will try to reverse a loop so that it
an utilize the de
rement and bran
h
instru
tion, but will give up if there is more than one memory referen
e in the
174
loop. Thus a loop where the loop
ounter is de
remented
an generate slightly
more e
ient
ode, in
ases where the RPTB instru
tion
annot be utilized.
-mdp-isr-reload
-mparanoid
-mmpyi
-mno-mpyi
For the C3x use the 24-bit MPYI instru
tion for integer multiplies instead of
a library
all to guarantee 32-bit results. Note that if one of the operands is
a
onstant, then the multipli
ation will be performed using shifts and adds. If
the `-mmpyi' option is not spe
ied for the C3x, then squaring operations are
performed inline instead of a library
all.
-mfast-fix
-mno-fast-fix
The C3x/C4x FIX instru
tion to
onvert a
oating point value to an integer
value
hooses the nearest integer less than or equal to the
oating point value
rather than to the nearest integer. Thus if the
oating point number is negative,
the result will be in
orre
tly trun
ated an additional
ode is ne
essary to dete
t
and
orre
t this
ase. This option
an be used to disable generation of the
additional
ode required to
orre
t the result.
-mrptb
-mno-rptb
Enable (disable) generation of repeat blo
k sequen
es using the RPTB instru
tion for zero overhead looping. The RPTB
onstru
t is only used for innermost
loops that do not
all fun
tions or jump a
ross the loop boundaries. There is no
advantage having nested RPTB loops due to the overhead required to save and
restore the RC, RS, and RE registers. This is enabled by default with `-O2'.
-mrpts=
ount
-mno-rpts
Enable (disable) the use of the single instru
tion repeat instru
tion RPTS. If a
repeat blo
k
ontains a single instru
tion, and the loop
ount
an be guaranteed
to be less than the value
ount, GCC will emit a RPTS instru
tion instead of
a RPTB. If no value is spe
ied, then a RPTS will be emitted even if the loop
ount
annot be determined at
ompile time. Note that the repeated instru
tion
following RPTS does not have to be reloaded from memory ea
h iteration, thus
freeing up the CPU buses for operands. However, sin
e interrupts are blo
ked
by this instru
tion, it is disabled by default.
-mloop-unsigned
-mno-loop-unsigned
The maximum iteration
ount when using RPTS and RPTB (and DB on the
C40) is 231 + 1 sin
e these instru
tions test if the iteration
ount is negative to
-mti
-mregparm
-mmemparm
175
terminate the loop. If the iteration
ount is unsigned there is a possibility than
the 231 + 1 maximum iteration
ount may be ex
eeded. This swit
h allows an
unsigned iteration
ount.
Try to emit an assembler syntax that the TI assembler (asm30) is happy with.
This also enfor
es
ompatibility with the API employed by the TI C3x C
ompiler. For example, long doubles are passed as stru
tures rather than in
oating
point registers.
Generate
ode that uses registers (sta
k) for passing arguments to fun
tions.
By default, arguments are passed in registers where possible rather than by
pushing arguments on to the sta
k.
-mparallel-insns
-mno-parallel-insns
Allow the generation of parallel instru
tions. This is enabled by default with
`-O2'.
-mparallel-mpy
-mno-parallel-mpy
Treat all
alls as being far away (near). If
alls are assumed to be far away,
the
ompiler will always load the fun
tions address up into a register, and
all
indire
t through the pointer.
-mno-ep
-mep
Do not optimize (do optimize) basi
blo
ks that use the same index pointer 4
or more times to
opy pointer into the ep register, and use the shorter sld and
sst instru
tions. The `-mep' option is on by default if you optimize.
-mno-prolog-fun
tion
-mprolog-fun
tion
-mspa
e
-mtda=n
Do not use (do use) external fun
tions to save and restore registers at the
prologue and epilogue of a fun
tion. The external fun
tions are slower, but use
less
ode spa
e if more than one fun
tion saves the same number of registers.
The `-mprolog-fun
tion' option is on by default if you optimize.
Try to make the
ode as small as possible. At present, this just turns on the
`-mep' and `-mprolog-fun
tion' options.
Put stati
or global variables whose size is n bytes or less into the tiny data
area that register ep points to. The tiny data area
an hold up to 256 bytes in
total (128 bytes for byte referen
es).
176
-msda=n
-mzda=n
-mv850
Put stati
or global variables whose size is n bytes or less into the small data
area that register gp points to. The small data area
an hold up to 64 kilobytes.
Put stati
or global variables whose size is n bytes or less into the rst 32
kilobytes of memory.
Spe
ify that the target pro
essor is the V850.
-mbig-swit h
Generate ode suitable for big swit h tables. Use this option only if the assembler/linker omplain about out of range bran hes within a swit h table.
-mapp-regs
This option will
ause r2 and r5 to be used in the
ode generated by the
ompiler.
This setting is the default.
-mno-app-regs
This option will suppress generation of the CALLT instru
tion for the v850e and
v850e1
avors of the v850 ar
hite
ture. The default is `-mno-disable-
allt'
whi
h allows the CALLT instru
tion to be used.
These are listed under See Se tion 3.17.11 [i386 and x86-64 Options, page 130.
177
Enable or disable use of CONST16 instru
tions for loading
onstant values. The
CONST16 instru
tion is
urrently not a standard option from Tensili
a. When
enabled, CONST16 instru
tions are always used in pla
e of the standard L32R instru
tions. The use of CONST16 is enabled by default only if the L32R instru
tion
is not available.
-mfused-madd
-mno-fused-madd
-mtext-se
tion-literals
-mno-text-se
tion-literals
-mtarget-align
-mno-target-align
When this option is enabled, GCC instru
ts the assembler to automati
ally align
instru
tions to redu
e bran
h penalties at the expense of some
ode density. The
assembler attempts to widen density instru
tions to align bran
h targets and
the instru
tions following
all instru
tions. If there are not enough pre
eding
safe density instru
tions to align a target, no widening will be performed. The
default is `-mtarget-align'. These options do not ae
t the treatment of autoaligned instru
tions like LOOP, whi
h the assembler will always align, either by
widening density instru
tions or by inserting no-op instru
tions.
-mlong
alls
-mno-long
alls
When this option is enabled, GCC instru
ts the assembler to translate dire
t
alls to indire
t
alls unless it
an determine that the target of a dire
t
all is
178
in the range allowed by the
all instru
tion. This translation typi
ally o
urs
for
alls to fun
tions in other sour
e les. Spe
i
ally, the assembler translates
a dire
t CALL instru
tion into an L32R followed by a CALLX instru
tion. The
default is `-mno-long
alls'. This option should be used in programs where
the
all target
an potentially be out of range. This option is implemented in
the assembler, not the
ompiler, so the assembly
ode generated by GCC will
still show dire
t
all instru
tions|look at the disassembled obje
t
ode to see
the a
tual instru
tions. Note that the assembler will use an indire
t
all for
every
ross-le
all, not just those that really will be out of range.
These are listed under See Se tion 3.17.24 [S/390 and zSeries Options, page 165.
For front-ends that support it, generate additional
ode to
he
k that indi
es
used to a
ess arrays are within the de
lared range. This is
urrently only
supported by the Java and Fortran 77 front-ends, where this option defaults to
true and false respe
tively.
-ftrapv
This option generates traps for signed over ow on addition, subtra tion, multipli ation operations.
-fwrapv
This option instru
ts the
ompiler to assume that signed arithmeti
over
ow of
addition, subtra
tion and multipli
ation wraps around using twos-
omplement
representation. This
ag enables some optimizations and disables other. This
option is enabled by default for the Java front-end, as required by the Java
language spe
i
ation.
-fex eptions
Enable ex
eption handling. Generates extra
ode needed to propagate ex
eptions. For some targets, this implies GCC will generate frame unwind information for all fun
tions, whi
h
an produ
e signi
ant data size overhead, although
it does not ae
t exe
ution. If you do not spe
ify this option, GCC will enable
it by default for languages like C++ whi
h normally require ex
eption handling,
and disable it for languages like C that do not normally require it. However,
you may need to enable this option when
ompiling C
ode that needs to interoperate properly with ex
eption handlers written in C++. You may also wish
to disable this option if you are
ompiling older C++ programs that don't use
ex
eption handling.
179
Generate
ode that allows trapping instru
tions to throw ex
eptions. Note that
this requires platform-spe
i
runtime support that does not exist everywhere.
Moreover, it only allows trapping instru
tions to throw ex
eptions, i.e. memory
referen
es or
oating point instru
tions. It does not allow ex
eptions to be
thrown from arbitrary signal handlers su
h as SIGALRM.
-funwind-tables
Similar to `-fex
eptions', ex
ept that it will just generate any needed stati
data, but will not ae
t the generated
ode in any other way. You will normally
not enable this option; instead, a language pro
essor that needs this handling
would enable it on your behalf.
-fasyn hronous-unwind-tables
Return \short" stru
t and union values in memory like longer ones, rather
than in registers. This
onvention is less e
ient, but it has the advantage
of allowing inter
allability between GCC-
ompiled les and les
ompiled with
other
ompilers, parti
ularly the Portable C Compiler (p
).
The pre
ise
onvention for returning stru
tures in memory depends on the target
onguration ma
ros.
Short stru
tures and unions are those whose size and alignment mat
h that of
some integer type.
Warning:
ode
ompiled with the `-fp
-stru
t-return' swit
h is not binary
ompatible with
ode
ompiled with the `-freg-stru
t-return' swit
h. Use
it to
onform to a non-default appli
ation binary interfa
e.
-freg-stru
t-return
Return stru
t and union values in registers when possible. This is more e
ient for small stru
tures than `-fp
-stru
t-return'.
If you spe
ify neither `-fp
-stru
t-return' nor `-freg-stru
t-return',
GCC defaults to whi
hever
onvention is standard for the target. If there is
no standard
onvention, GCC defaults to `-fp
-stru
t-return', ex
ept on
targets where GCC is the prin
ipal
ompiler. In those
ases, we
an
hoose
the standard, and we
hose the more e
ient register return alternative.
Warning:
ode
ompiled with the `-freg-stru
t-return' swit
h is not binary
ompatible with
ode
ompiled with the `-fp
-stru
t-return' swit
h. Use
it to
onform to a non-default appli
ation binary interfa
e.
-fshort-enums
Allo
ate to an enum type only as many bytes as it needs for the de
lared range
of possible values. Spe
i
ally, the enum type will be equivalent to the smallest
integer type whi
h has enough room.
180
-fshort-double
-fshort-w har
Override the underlying type for `w
har_t' to be `short unsigned int' instead
of the default for the target. This option is useful for building programs to run
under WINE.
Warning: the `-fshort-w
har' swit
h
auses GCC to generate
ode that is not
binary
ompatible with
ode generated without that swit
h. Use it to
onform
to a non-default appli
ation binary interfa
e.
-fshared-data
Requests that the data and non-
onst variables of this
ompilation be shared
data rather than private data. The distin
tion makes sense only on
ertain
operating systems, where shared data is shared between pro
esses running the
same program, while private data exists in one
opy per pro
ess.
-fno- ommon
In C, allo
ate even uninitialized global variables in the data se
tion of the obje
t
le, rather than generating them as
ommon blo
ks. This has the ee
t that
if the same variable is de
lared (without extern) in two dierent
ompilations,
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 whi
h
always work this way.
-fno-ident
-finhibit-size-dire
tive
Don't output a .size assembler dire
tive, or anything else that would
ause
trouble if the fun
tion is split in the middle, and the two halves are pla
ed at lo
ations far apart in memory. This option is used when
ompiling `
rtstuff.
';
you should not need to use it for anything else.
-fverbose-asm
-fpi
181
through a global oset table (GOT). The dynami
loader resolves the GOT
entries when the program starts (the dynami
loader is not part of GCC; it
is part of the operating system). If the GOT size for the linked exe
utable
ex
eeds a ma
hine-spe
i
maximum size, you get an error message from the
linker indi
ating that `-fpi
' does not work; in that
ase, re
ompile with `-fPIC'
instead. (These maximums are 8k on the SPARC and 32k on the m68k and
RS/6000. The 386 has no su
h limit.)
Position-independent
ode requires spe
ial support, and therefore works only on
ertain ma
hines. For the 386, GCC supports PIC for System V but not for the
Sun 386i. Code generated for the IBM RS/6000 is always position-independent.
-fPIC
-fpie
-fPIE
-ffixed-reg
Treat the register named reg as a xed register; generated
ode should never
refer to it (ex
ept perhaps as a sta
k pointer, frame pointer or in some other
xed role).
reg must be the name of a register. The register names a
epted are ma
hinespe
i
and are dened in the REGISTER_NAMES ma
ro in the ma
hine des
ription ma
ro le.
This
ag does not have a negative form, be
ause it spe
ies a three-way
hoi
e.
-f all-used-reg
Treat the register named reg as an allo
able register that is
lobbered by fun
tion
alls. It may be allo
ated for temporaries or variables that do not live
a
ross a
all. Fun
tions
ompiled this way will not save and restore the register
reg.
It is an error to used this
ag with the frame pointer or sta
k pointer. Use
of this
ag for other registers that have xed pervasive roles in the ma
hine's
exe
ution model will produ
e disastrous results.
This
ag does not have a negative form, be
ause it spe
ies a three-way
hoi
e.
-f all-saved-reg
Treat the register named reg as an allo
able register saved by fun
tions. It may
be allo
ated even for temporaries or variables that live a
ross a
all. Fun
tions
ompiled this way will save and restore the register reg if they use it.
It is an error to used this
ag with the frame pointer or sta
k pointer. Use
of this
ag for other registers that have xed pervasive roles in the ma
hine's
exe
ution model will produ
e disastrous results.
182
A dierent sort of disaster will result from the use of this
ag for a register in
whi
h fun
tion values may be returned.
This
ag does not have a negative form, be
ause it spe
ies a three-way
hoi
e.
-fpa
k-stru
t[=n
Without a value spe
ied, pa
k all stru
ture members together without holes.
When a value is spe
ied (whi
h must be a small power of two), pa
k stru
ture
members a
ording to this value, representing the maximum alignment (that
is, obje
ts with default alignment requirements larger than this will be output
potentially unaligned at the next tting lo
ation.
Warning: the `-fpa
k-stru
t' swit
h
auses GCC to generate
ode that is
not binary
ompatible with
ode generated without that swit
h. Additionally,
it makes the
ode suboptimal. Use it to
onform to a non-default appli
ation
binary interfa
e.
-finstrument-fun tions
Generate instrumentation
alls for entry and exit to fun
tions. Just after fun
tion entry and just before fun
tion exit, the following proling fun
tions will
be
alled with the address of the
urrent fun
tion and its
all site. (On some
platforms, __builtin_return_address does not work beyond the
urrent fun
tion, so the
all site information may not be available to the proling fun
tions
otherwise.)
void __
yg_profile_fun
_enter (void
void
void __
yg_profile_fun
_exit (void
void
*this_fn,
*
all_site);
*this_fn,
*
all_site);
The rst argument is the address of the start of the
urrent fun
tion, whi
h
may be looked up exa
tly in the symbol table.
This instrumentation is also done for fun
tions expanded inline in other fun
tions. The proling
alls will indi
ate where,
on
eptually, the inline fun
tion
is entered and exited. This means that addressable versions of su
h fun
tions
must be available. If all your uses of a fun
tion are expanded inline, this may
mean an additional expansion of
ode size. If you use `extern inline' in your
C
ode, an addressable version of su
h fun
tions must be provided. (This is
normally the
ase anyways, but if you get lu
ky and the optimizer always expands the fun
tions inline, you might have gotten away without providing stati
opies.)
A fun
tion may be given the attribute no_instrument_fun
tion, in whi
h
ase this instrumentation will not be done. This
an be used, for example, for
the proling fun
tions listed above, high-priority interrupt routines, and any
fun
tions from whi
h the proling fun
tions
annot safely be
alled (perhaps
signal handlers, if the proling routines generate output or allo
ate memory).
-fsta
k-
he
k
Generate
ode to verify that you do not go beyond the boundary of the sta
k.
You should spe
ify this
ag if you are running in an environment with multiple
threads, but only rarely need to spe
ify it in a single-threaded environment
183
sin
e sta
k over
ow is automati
ally dete
ted on nearly all systems if there is
only one sta
k.
Note that this swit
h does not a
tually
ause
he
king to be done; the operating
system must do that. The swit
h
auses generation of
ode to ensure that the
operating system sees the sta
k being extended.
-fsta
k-limit-register=reg
-fsta
k-limit-symbol=sym
-fno-sta
k-limit
Generate
ode to ensure that the sta
k does not grow beyond a
ertain value,
either the value of a register or the address of a symbol. If the sta
k would grow
beyond the value, a signal is raised. For most targets, the signal is raised before
the sta
k overruns the boundary, so it is possible to
at
h the signal without
taking spe
ial pre
autions.
For instan
e, if the sta
k starts at absolute address `0x80000000' and grows
downwards, you
an use the
ags `-fsta
k-limit-symbol=__sta
k_limit'
and `-Wl,--defsym,__sta
k_limit=0x7ffe0000' to enfor
e a sta
k limit of
128KB. Note that this may only work with the GNU linker.
-fargument-alias
-fargument-noalias
-fargument-noalias-global
Spe
ify the possible relationships among parameters and between parameters
and global data.
`-fargument-alias' spe
ies that arguments (parameters) may alias ea
h other
and may alias global storage.
`-fargument-noalias' spe
ies that arguments do not alias ea
h other, but
may alias global storage.
`-fargument-noalias-global' spe
ies that arguments do not alias ea
h other
and do not alias global storage.
Ea
h language will automati
ally use whatever option is required by the language standard. You should not need to use these options yourself.
-fleading-unders ore
This option and its
ounterpart, `-fno-leading-unders
ore', for
ibly
hange
the way C symbols are represented in the obje
t le. One use is to help link
with lega
y assembly
ode.
Warning: the `-fleading-unders
ore' swit
h
auses GCC to generate
ode
that is not binary
ompatible with
ode generated without that swit
h. Use it
to
onform to a non-default appli
ation binary interfa
e. Not all targets provide
omplete support for this swit
h.
-ftls-model=model
Alter the thread-lo
al storage model to be used (see Se
tion 5.49 [ThreadLo
al, page 331). The model argument should be one of global-dynami
,
lo
al-dynami
, initial-exe
or lo
al-exe
.
The default without `-fpi
' is initial-exe
; with `-fpi
' the default is
global-dynami
.
184
-fvisibility=default|internal|hidden|prote ted
Set the default ELF image symbol visibility to the spe
ied option|all symbols
will be marked with this unless overridden within the
ode. Using this feature
an very substantially improve linking and load times of shared obje
t libraries,
produ
e more optimized
ode, provide near-perfe
t API export and prevent
symbol
lashes. It is strongly re
ommended that you use this in any shared
obje
ts you distribute.
Despite the nomen
lature, default always means publi
ie; available to be
linked against from outside the shared obje
t. prote
ted and internal are
pretty useless in real-world usage so the only other
ommonly used option will
be hidden. The default if `-fvisibility' isn't spe
ied is default, i.e., make
every symbol publi
|this
auses the same behavior as previous versions of
GCC.
A good explanation of the benets oered by ensuring ELF symbols have
the
orre
t visibility is given by \How To Write Shared Libraries" by Ulri
h
Drepper (whi
h
an be found at http://people.redhat.
om/~drepper/)|
however a superior solution made possible by this option to marking things
hidden when the default is publi
is to make the default hidden and
mark things publi
. This is the norm with DLL's on Windows and with
`-fvisibility=hidden' and __attribute__ ((visibility("default")))
instead of __de
lspe
(dllexport) you get almost identi
al semanti
s with
identi
al syntax. This is a great boon to those working with
ross-platform
proje
ts.
For those adding visibility support to existing
ode, you may nd `#pragma GCC
visibility' of use. This works by you en
losing the de
larations you wish to
set visibility for with (for example) `#pragma GCC visibility push(hidden)'
and `#pragma GCC visibility pop'. These
an be nested up to sixteen times.
Bear in mind that symbol visibility should be viewed as part of the API interfa
e
ontra
t and thus all new
ode should always spe
ify visibility when it is not
the default ie; de
larations only for use within the lo
al DSO should always be
marked expli
itly as hidden as so to avoid PLT indire
tion overheads|making
this abundantly
lear also aids readability and self-do
umentation of the
ode.
Note that due to ISO C++ spe
i
ation requirements, operator new and operator
delete must always be of default visibility.
An overview of these te
hniques, their benets and how to use them is at
http://www.nedprod.
om/programs/g
visibility.html.
185
the
onguration of GCC. See se
tion \Controlling the Compilation Driver `g
'" in GNU
Compiler Colle
tion (GCC) Internals.
LANG
LC_CTYPE
LC_MESSAGES
LC_ALL
These environment variables
ontrol the way that GCC uses lo
alization in-
formation that allow GCC to work with dierent national
onventions. GCC
inspe
ts the lo
ale
ategories LC_CTYPE and LC_MESSAGES if it has been
ongured to do so. These lo
ale
ategories
an be set to any value supported by
your installation. A typi
al value is `en_GB.UTF-8' for English in the United
Kingdom en
oded in UTF-8.
The LC_CTYPE environment variable spe
ies
hara
ter
lassi
ation. GCC uses
it to determine the
hara
ter boundaries in a string; this is needed for some
multibyte en
odings that
ontain quote and es
ape
hara
ters that would otherwise be interpreted as a string end or es
ape.
The LC_MESSAGES environment variable spe
ies the language to use in diagnosti
messages.
If the LC_ALL environment variable is set, it overrides the value of LC_CTYPE and
LC_MESSAGES; otherwise, LC_CTYPE and LC_MESSAGES default to the value of the
LANG environment variable. If none of these variables are set, GCC defaults to
traditional C English behavior.
TMPDIR
If TMPDIR is set, it spe
ies the dire
tory to use for temporary les. GCC uses
temporary les to hold the output of one stage of
ompilation whi
h is to be
used as input to the next stage: for example, the output of the prepro
essor,
whi
h is the input to the
ompiler proper.
GCC_EXEC_PREFIX
If GCC_EXEC_PREFIX is set, it spe
ies a prex to use in the names of the
subprograms exe
uted by the
ompiler. No slash is added when this prex is
ombined with the name of a subprogram, but you
an spe
ify a prex that
ends with a slash if you wish.
If GCC_EXEC_PREFIX is not set, GCC will attempt to gure out an appropriate
prex to use based on the pathname it was invoked with.
If GCC
annot nd the subprogram using the spe
ied prex, it tries looking
in the usual pla
es for the subprogram.
The default value of GCC_EXEC_PREFIX is `prefix /lib/g
/' where prex is
the value of prefix when you ran the `
onfigure' s
ript.
Other prexes spe
ied with `-B' take pre
eden
e over this prex.
This prex is also used for nding les su
h as `
rt0.o' that are used for linking.
In addition, the prex is used in an unusual way in nding the dire
tories
to sear
h for header les. For ea
h of the standard dire
tories whose name
normally begins with `/usr/lo
al/lib/g
' (more pre
isely, with the value
of GCC_INCLUDE_DIR), GCC tries repla
ing that beginning with the spe
ied
prex to produ
e an alternate dire
tory name. Thus, with `-Bfoo/', GCC will
186
LIBRARY_PATH
rst).
LANG
This variable is used to pass lo
ale information to the
ompiler. One way in
whi
h this information is used is to determine the
hara
ter set to be used when
hara
ter literals, string literals and
omments are parsed in C and C++. When
the
ompiler is
ongured to allow multibyte
hara
ters, the following values
for LANG are re
ognized:
`C-JIS'
Re
ognize JIS
hara
ters.
`C-SJIS' Re
ognize SJIS
hara
ters.
`C-EUCJP' Re
ognize EUCJP
hara
ters.
If LANG is not dened, or if it has some other value, then the
ompiler will use
mblen and mbtow
as dened by the default lo
ale to re
ognize and translate
multibyte
hara
ters.
Some additional environments variables ae
t the behavior of the prepro
essor.
CPATH
C_INCLUDE_PATH
CPLUS_INCLUDE_PATH
OBJC_INCLUDE_PATH
Ea
h variable's value is a list of dire
tories separated by a spe
ial
hara
ter,
mu
h like PATH, in whi
h to look for header les. The spe
ial
hara
ter, PATH_
SEPARATOR, is target-dependent and determined at GCC build time. For Mi
rosoft Windows-based targets it is a semi
olon, and for almost all other targets
it is a
olon.
CPATH spe
ies a list of dire
tories to be sear
hed as if spe
ied with `-I', but
after any paths given with `-I' options on the
ommand line. This environment
variable is used regardless of whi
h language is being prepro
essed.
The remaining environment variables apply only when prepro
essing the parti
ular language indi
ated. Ea
h spe
ies a list of dire
tories to be sear
hed as
if spe
ied with `-isystem', but after any paths given with `-isystem' options
on the
ommand line.
In all these variables, an empty element instru
ts the
ompiler to sear
h its
urrent working dire
tory. Empty elements
an appear at the beginning or end
187
of a path. For instan
e, if the value of CPATH is :/spe
ial/in
lude, that has
the same ee
t as `-I. -I/spe
ial/in
lude'.
DEPENDENCIES_OUTPUT
If this variable is set, its value spe
ies how to output dependen
ies for Make
based on the non-system header les pro
essed by the
ompiler. System header
les are ignored in the dependen
y output.
The value of DEPENDENCIES_OUTPUT
an be just a le name, in whi
h
ase the
Make rules are written to that le, guessing the target name from the sour
e
le name. Or the value
an have the form `file target ', in whi
h
ase the
rules are written to le le using target as the target name.
In other words, this environment variable is equivalent to
ombining the options
`-MM' and `-MF' (see Se
tion 3.11 [Prepro
essor Options, page 87), with an
optional `-MT' swit
h too.
SUNPRO_DEPENDENCIES
188
original header. Then, if you want to
he
k that the pre
ompiled header le is always used,
you
an put a le of the same name as the original header in this dire
tory
ontaining an
#error
ommand.
This also works with `-in
lude'. So yet another way to use pre
ompiled headers, good
for proje
ts not designed with pre
ompiled header les in mind, is to simply take most
of the header les used by a proje
t, in
lude them from another header le, pre
ompile
that header le, and `-in
lude' the pre
ompiled header. If the header les have guards
against multiple in
lusion, they will be skipped be
ause they've already been in
luded (in
the pre
ompiled header).
If you need to pre
ompile the same header le for dierent languages, targets, or
ompiler
options, you
an instead make a dire
tory named like `all.h.g
h', and put ea
h pre
ompiled header in the dire
tory, perhaps using `-o'. It doesn't matter what you
all the les
in the dire
tory, every pre
ompiled header in the dire
tory will be
onsidered. The rst
pre
ompiled header en
ountered in the dire
tory that is valid for this
ompilation will be
used; they're sear
hed in no parti
ular order.
There are many other possibilities, limited only by your imagination, good sense, and the
onstraints of your build system.
A pre
ompiled header le
an be used only when these
onditions apply:
Only one pre
ompiled header
an be used in a parti
ular
ompilation.
A pre
ompiled header
an't be used on
e the rst C token is seen. You
an have
prepro
essor dire
tives before a pre
ompiled header; you
an even in
lude a pre
ompiled
header from inside another header, so long as there are no C tokens before the #in
lude.
The pre
ompiled header le must be produ
ed for the same language as the
urrent
ompilation. You
an't use a C pre
ompiled header for a C++
ompilation.
The pre
ompiled header le must be produ
ed by the same
ompiler version and
onguration as the
urrent
ompilation is using. The easiest way to guarantee this is to
use the same
ompiler binary for
reating and using pre
ompiled headers.
Any ma
ros dened before the pre
ompiled header is in
luded must either be dened
in the same way as when the pre
ompiled header was generated, or must not ae
t the
pre
ompiled header, whi
h usually means that they don't appear in the pre
ompiled
header at all.
The `-D' option is one way to dene a ma
ro before a pre
ompiled header is in
luded;
using a #define
an also do it. There are also some options that dene ma
ros impli
itly, like `-O' and `-Wdepre
ated'; the same rule applies to ma
ros dened this
way.
If debugging information is output when using the pre
ompiled header, using `-g' or
similar, the same kind of debugging information must have been output when building
the pre
ompiled header. However, a pre
ompiled header built using `-g'
an be used
in a
ompilation when no debugging information is being output.
The same `-m' options must generally be used when building and using the pre
ompiled
header. See Se
tion 3.17 [Submodel Options, page 108, for any
ases where this rule
is relaxed.
Ea
h of the following options must be the same when building and using the pre
ompiled header:
189
Some other
ommand-line options starting with `-f', `-p', or `-O' must be dened in
the same way as when the pre
ompiled header was generated. At present, it's not
lear
whi
h options are safe to
hange and whi
h are not; the safest
hoi
e is to use exa
tly
the same options when generating and using the pre
ompiled header. The following
are known to be safe:
-fprepro
essed -pedanti
-errors
For all of these ex
ept the last, the
ompiler will automati
ally ignore the pre
ompiled
header if the
onditions aren't met. If you nd an option
ombination that doesn't work
and doesn't
ause the pre
ompiled header to be ignored, please
onsider ling a bug report,
see Chapter 11 [Bugs, page 381.
If you do use diering options when generating and using the pre
ompiled header, the
a
tual behavior will be a mixture of the behavior for the options. For instan
e, if you use
`-g' to generate the pre
ompiled header but not when using it, you may or may not get
debugging information for routines in the pre
ompiled header.
190
The output from protoize or unprotoize repla
es the original sour
e le. The original
le is renamed to a name ending with `.save' (for DOS, the saved lename ends in `.sav'
without the original `.
' sux). If the `.save' (`.sav' for DOS) le already exists, then the
sour
e le is simply dis
arded.
protoize and unprotoize both depend on GCC itself to s
an the program and
olle
t
information about the fun
tions it uses. So neither of these programs will work until GCC
is installed.
Here is a table of the options you
an use with protoize and unprotoize. Ea
h option
works with both programs unless otherwise stated.
-B dire
tory
Look for the le `SYSCALLS.
.X' in dire
tory, instead of the usual dire
tory
(normally `/usr/lo
al/lib'). This le
ontains prototype information about
standard system fun
tions. This option applies only to protoize.
- ompilation-options
-C
Rename les to end in `.C' (`.
' for DOS-based le systems) instead of `.
'.
This is
onvenient if you are
onverting a C program to C++. This option
applies only to protoize.
-g
-i string
Indent old-style parameter de
larations with the string string. This option
applies only to protoize.
unprotoize
onverts prototyped fun
tion denitions to old-style fun
tion definitions, where the arguments are de
lared between the argument list and the
initial `{'. By default, unprotoize uses ve spa
es as the indentation. If you
want to indent with just one spa
e instead, use `-i " "'.
-k
Keep the `.X' les. Normally, they are deleted after onversion is nished.
-l
Add expli
it lo
al de
larations. protoize with `-l' inserts a prototype de
laration for ea
h fun
tion in ea
h blo
k whi
h
alls the fun
tion without any
de
laration. This option applies only to protoize.
191
-n
Make no real
hanges. This mode just prints information about the
onversions
that would have been done without `-n'.
-N
Make no `.save' les. The original les are simply deleted. Use this option
with
aution.
-p program
Use the program program as the ompiler. Normally, the name `g ' is used.
-q
-v
If you need spe
ial
ompiler options to
ompile one of your program's sour
e les, then
you should generate that le's `.X' le spe
ially, by running g
on that sour
e le with the
appropriate options and the option `-aux-info'. Then run protoize on the entire set of
les. protoize will use the existing `.X' le be
ause it is newer than the sour
e le. For
example:
g
-Dfoo=bar file1.
-aux-info file1.X
protoize *.
You need to in
lude the spe
ial les along with the rest in the protoize
ommand, even
though their `.X' les already exist, be
ause otherwise they won't get
onverted.
See Se
tion 10.9 [Protoize Caveats, page 374, for more information on how to use
protoize su
essfully.
192
193
4.1 Translation
How a diagnosti
is identied (C90 3.7, C99 3.10, C90 and C99 5.1.1.3).
Diagnosti
s
onsist of all the output sent to stderr by GCC.
Whether ea
h nonempty sequen
e of white-spa
e
hara
ters other than new-line is
retained or repla
ed by one spa
e
hara
ter in translation phase 3 (C90 and C99 5.1.1.2).
See se
tion \Implementation-dened behavior" in The C Prepro
essor.
4.2 Environment
The behavior of most of these points are dependent on the implementation of the C library,
and are not dened by GCC itself.
The mapping between physi
al sour
e le multibyte
hara
ters and the sour
e
hara
ter
set in translation phase 1 (C90 and C99 5.1.1.2).
See se
tion \Implementation-dened behavior" in The C Prepro
essor.
Whi
h additional multibyte
hara
ters may appear in identiers and their
orresponden
e to universal
hara
ter names (C99 6.4.2).
See se
tion \Implementation-dened behavior" in The C Prepro
essor.
The number of signi
ant initial
hara
ters in an identier (C90 6.1.2, C90 and C99
5.2.4.1, C99 6.4.2).
For internal names, all
hara
ters are signi
ant. For external names, the number of
signi
ant
hara
ters are dened by the linker; for almost all targets, all
hara
ters are
signi
ant.
Whether
ase distin
tions are signi
ant in an identier with external linkage (C90
6.1.2).
This is a property of the linker. C99 requires that
ase distin
tions are always signi
ant
in identiers with external linkage and systems without this property are not supported
by GCC.
194
4.5 Integers
Any extended integer types that exist in the implementation (C99 6.2.5).
GCC does not support any extended integer types.
195
Whether signed integer types are represented using sign and magnitude, two's
omplement, or one's
omplement, and whether the extraordinary value is a trap representation or an ordinary value (C99 6.2.6.2).
GCC supports only two's
omplement integer types, and all bit patterns are ordinary
values.
The rank of any extended integer type relative to another extended integer type with
the same pre
ision (C99 6.3.1.1).
GCC does not support any extended integer types.
The result of, or the signal raised by,
onverting an integer to a signed integer type when
the value
annot be represented in an obje
t of that type (C90 6.2.1.2, C99 6.3.1.3).
For
onversion to a type of width N , the value is redu
ed modulo 2N to be within range
of the type; no signal is raised.
The results of some bitwise operations on signed integers (C90 6.3, C99 6.5).
Bitwise operators a
t on the representation of the value in
luding both the sign and
value bits, where the sign bit is
onsidered immediately above the highest-value value
bit. Signed `>>' a
ts on negative numbers by sign extension.
GCC does not use the latitude given in C99 only to treat
ertain aspe
ts of signed `<<'
as undened, but this is subje
t to
hange.
The sign of the remainder on integer division (C90 6.3.5).
GCC always follows the C99 requirement that the result of division is trun
ated towards
zero.
The a
ura
y of the
oating-point operations and of the library fun
tions in <math.h>
and <
omplex.h> that return
oating-point results (C90 and C99 5.2.4.2.2).
The a
ura
y is unknown.
The rounding behaviors
hara
terized by non-standard values of FLT_ROUNDS
(C90 and C99 5.2.4.2.2).
GCC does not use su
h values.
The evaluation methods
hara
terized by non-standard negative values of FLT_EVAL_
METHOD (C99 5.2.4.2.2).
GCC does not use su
h values.
The dire
tion of rounding when an integer is
onverted to a
oating-point number that
annot exa
tly represent the original value (C90 6.2.1.3, C99 6.3.1.4).
C99 Annex F is followed.
The dire
tion of rounding when a
oating-point number is
onverted to a narrower
oating-point number (C90 6.2.1.4, C99 6.3.1.5).
C99 Annex F is followed.
How the nearest representable value or the larger or smaller representable value immediately adja
ent to the nearest representable value is
hosen for
ertain
oating
onstants (C90 6.1.3.1, C99 6.4.4.2).
C99 Annex F is followed.
196
Whether and how
oating expressions are
ontra
ted when not disallowed by the FP_
CONTRACT pragma (C99 6.5).
Expressions are
urrently only
ontra
ted if `-funsafe-math-optimizations' or
`-ffast-math' are used. This is subje
t to
hange.
The default state for the FENV_ACCESS pragma (C99 7.6.1).
This pragma is not implemented, but the default is to \o" unless `-frounding-math'
is used in whi
h
ase it is \on".
Additional
oating-point ex
eptions, rounding modes, environments, and
lassi
ations, and their ma
ro names (C99 7.6, C99 7.12).
This is dependent on the implementation of the C library, and is not dened by GCC
itself.
The default state for the FP_CONTRACT pragma (C99 7.12.2).
This pragma is not implemented. Expressions are
urrently only
ontra
ted if
`-funsafe-math-optimizations' or `-ffast-math' are used. This is subje
t to
hange.
Whether the \inexa
t"
oating-point ex
eption
an be raised when the rounded result
a
tually does equal the mathemati
al result in an IEC 60559
onformant implementation (C99 F.9).
This is dependent on the implementation of the C library, and is not dened by GCC
itself.
Whether the \under
ow" (and \inexa
t")
oating-point ex
eption
an be raised when
a result is tiny but not inexa
t in an IEC 60559
onformant implementation (C99 F.9).
This is dependent on the implementation of the C library, and is not dened by GCC
itself.
1
The result of
onverting a pointer to an integer or vi
e versa (C90 6.3.4, C99 6.3.2.3).
A
ast from pointer to integer dis
ards most-signi
ant bits if the pointer representation
is larger than the integer type, sign-extends1 if the pointer representation is smaller
than the integer type, otherwise the bits are un
hanged.
A
ast from integer to pointer dis
ards most-signi
ant bits if the pointer representation
is smaller than the integer type, extends a
ording to the signedness of the integer type
if the pointer representation is larger than the integer type, otherwise the bits are
un
hanged.
When
asting from pointer to integer and ba
k again, the resulting pointer must referen
e the same obje
t as the original pointer, otherwise the behavior is undened.
That is, one may not use integer arithmeti
to avoid the undened behavior of pointer
arithmeti
as pros
ribed in C99 6.5.6/8.
The size of the result of subtra
ting two pointers to elements of the same array (C90
6.3.6, C99 6.5.6).
The value is as spe
ied in the standard and the type is determined by the ABI.
Future versions of GCC may zero-extend, or use a target-dened ptr_extend pattern. Do not rely on
sign extension.
197
4.8 Hints
The extent to whi
h suggestions made by using the register storage-
lass spe
ier
are ee
tive (C90 6.5.1, C99 6.7.1).
The register spe
ier ae
ts
ode generation only in these ways:
When used as part of the register variable extension, see Se
tion 5.37 [Expli
it Reg
Vars, page 266.
When `-O0' is in use, the
ompiler allo
ates distin
t sta
k memory for all variables
that do not have the register storage-
lass spe
ier; if register is spe
ied, the
variable may have a shorter lifespan than the
ode would indi
ate and may never
be pla
ed in memory.
On some rare x86 targets, setjmp doesn't save the registers in all
ir
umstan
es.
In those
ases, GCC doesn't allo
ate any variables in registers unless they are
marked register.
The extent to whi
h suggestions made by using the inline fun
tion spe
ier are ee
tive
(C99 6.7.4).
GCC will not inline any fun
tions if the `-fno-inline' option is used or if `-O0' is
used. Otherwise, GCC may still be unable to inline a fun
tion for many reasons; the
`-Winline' option may be used to determine if a fun
tion has not been inlined and why
not.
A member of a union obje
t is a
essed using a member of a dierent type (C90 6.3.2.3).
The relevant bytes of the representation of the obje
t are treated as an obje
t of the
type used for the a
ess. This may be a trap representation.
Whether a \plain" int bit-eld is treated as a signed int bit-eld or as an unsigned
int bit-eld (C90 6.5.2, C90 6.5.2.1, C99 6.7.2, C99 6.7.2.1).
By default it is treated as signed int but this may be
hanged by the
`-funsigned-bitfields' option.
Allowable bit-eld types other than _Bool, signed int, and unsigned int (C99
6.7.2.1).
No other types are permitted in stri
tly
onforming mode.
Whether a bit-eld
an straddle a storage-unit boundary (C90 6.5.2.1, C99 6.7.2.1).
Determined by ABI.
The order of allo
ation of bit-elds within a unit (C90 6.5.2.1, C99 6.7.2.1).
Determined by ABI.
The alignment of non-bit-eld members of stru
tures (C90 6.5.2.1, C99 6.7.2.1).
Determined by ABI.
The integer type
ompatible with ea
h enumerated type (C90 6.5.2.2, C99 6.7.2.2).
Normally, the type is unsigned int if there are no negative values in the enumeration,
otherwise int. If `-fshort-enums' is spe
ied, then if there are negative values it is
the rst of signed
har, short and int that
an represent all the values, otherwise it
198
is the rst of unsigned
har, unsigned short and unsigned int that
an represent
all the values.
On some targets, `-fshort-enums' is the default; this is determined by the ABI.
What
onstitutes an a
ess to an obje
t that has volatile-qualied type (C90 6.5.3, C99
6.7.3).
See Se
tion 6.1 [When is a Volatile Obje
t A
essed?, page 335.
4.11 De
larators
The maximum number of de
larators that may modify an arithmeti
, stru
ture or
union type (C90 6.5.4).
GCC is only limited by available memory.
4.12 Statements
199
The denitions for __DATE__ and __TIME__ when respe
tively, the date and time of
translation are not available (C90 6.8.8, C99 6.10.8).
The values or expressions assigned to the ma
ros spe
ied in the headers <float.h>,
<limits.h>, and <stdint.h> (C90 and C99 5.2.4.2, C99 7.18.2, C99 7.18.3).
Determined by ABI.
The number, order, and en
oding of bytes in any obje
t (when not expli
itly spe
ied
in this International Standard) (C99 6.2.6.1).
Determined by ABI.
The value of the result of the sizeof operator (C90 6.3.3.4, C99 6.5.3.4).
Determined by ABI.
200
201
is a valid (though slightly more
omplex than ne
essary) expression for the absolute value
of foo ().
The last thing in the
ompound statement should be an expression followed by a semi
olon; the value of this subexpression serves as the value of the entire
onstru
t. (If you use
some other kind of statement last within the bra
es, the
onstru
t has type void, and thus
ee
tively no value.)
This feature is espe
ially useful in making ma
ro denitions \safe" (so that they evaluate
ea
h operand exa
tly on
e). For example, the \maximum" fun
tion is
ommonly dened
as a ma
ro in standard C as follows:
#define max(a,b) ((a) > (b) ? (a) : (b))
But this denition
omputes either a or b twi
e, with bad results if the operand has side
ee
ts. In GNU C, if you know the type of the operands (here taken as int), you
an dene
the ma
ro safely as follows:
#define maxint(a,b) \
({int _a = (a), _b = (b); _a > _b ? _a : _b; })
202
A a;
({a;}).Foo ()
will
onstru
t a temporary A obje
t to hold the result of the statement expression, and that
will be used to invoke Foo. Therefore the this pointer observed by Foo will not be the
address of a.
Any temporaries
reated within a statement within a statement expression will be destroyed at the statement's end. This makes statement expressions inside ma
ros slightly
dierent from fun
tion
alls. In the latter
ase temporaries introdu
ed during argument
evaluation will be destroyed at the end of the statement that in
ludes the fun
tion
all. In
the statement expression
ase they will be destroyed during the statement expression. For
instan
e,
#define ma
ro(a) ({__typeof__(a) b = (a); b + 3; })
template<typename T> T fun
tion(T a) { T b = a; return b + 3; }
void foo ()
{
ma
ro (X ());
fun
tion (X ());
}
will have dierent pla
es where temporaries are destroyed. For the ma
ro
ase, the temporary X will be destroyed just after the initialization of b. In the fun
tion
ase that
temporary will be destroyed when the fun
tion returns.
These
onsiderations mean that it is probably a bad idea to use statement-expressions of
this form in header les that are designed to work with C++. (Note that some versions of
the GNU C Library
ontained header les using statement-expression that lead to pre
isely
this bug.)
Jumping into a statement expression with goto or using a swit
h statement outside the
statement expression with a
ase or default label inside the statement expression is not
permitted. Jumping into a statement expression with a
omputed goto (see Se
tion 5.3
[Labels as Values, page 203) yields undened behavior. Jumping out of a statement expression is permitted, but if the statement expression is part of a larger expression then
it is unspe
ied whi
h other subexpressions of that expression have been evaluated ex
ept
where the language denition requires
ertain subexpressions to be evaluated before or after
the statement expression. In any
ase, as with a fun
tion
all the evaluation of a statement
expression is not interleaved with the evaluation of other parts of the
ontaining expression.
For example,
foo (), (({ bar1 (); goto a; 0; }) + bar2 ()), baz();
will
all foo and bar1 and will not
all baz but may or may not
all bar2. If bar2 is
alled,
it will be
alled after foo and before bar1
203
__label__ label ;
or
Lo
al label de
larations must
ome at the beginning of the blo
k, before any ordinary
de
larations or statements.
The label de
laration denes the label name, but does not dene the label itself. You must
do this in the usual way, with label :, within the statements of the statement expression.
The lo
al label feature is useful for
omplex ma
ros. If a ma
ro
ontains nested loops, a
goto
an be useful for breaking out of them. However, an ordinary label whose s
ope is the
whole fun
tion
annot be used: if the ma
ro
an be expanded several times in one fun
tion,
the label will be multiply dened in that fun
tion. A lo
al label avoids this problem. For
example:
#define SEARCH(value, array, target)
do {
__label__ found;
typeof (target) _SEARCH_target = (target);
typeof (*(array)) *_SEARCH_array = (array);
int i, j;
int value;
for (i = 0; i < max; i++)
for (j = 0; j < max; j++)
if (_SEARCH_array[i[j == _SEARCH_target)
{ (value) = i; goto found; }
(value) = -1;
found:;
} while (0)
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
Lo
al label de
larations also make the labels they de
lare visible to nested fun
tions, if
there are any. See Se
tion 5.4 [Nested Fun
tions, page 204, for details.
204
/* . . . */
ptr = &&foo;
To use these values, you need to be able to jump to one. This is done with the
omputed
goto statement1 , goto *exp ;. For example,
goto *ptr;
Note that this does not
he
k whether the subs
ript is in bounds|array indexing in C never
does that.
Su
h an array of label values serves a purpose mu
h like that of the swit
h statement.
The swit
h statement is
leaner, so use that rather than an array unless the problem does
not t a swit
h statement very well.
Another use of label values is in an interpreter for threaded
ode. The labels within the
interpreter fun
tion
an be stored in the threaded
ode for super-fast dispat
hing.
You may not use this me
hanism to jump to
ode in a dierent fun
tion. If you do that,
totally unpredi
table things will happen. The best way to avoid this is to store the label
address only in automati
variables and never pass it as an argument.
An alternate way to write the above example is
stati
onst int array[ = { &&foo - &&foo, &&bar - &&foo,
&&ha
k - &&foo };
goto *(&&foo + array[i);
This is more friendly to
ode living in shared libraries, as it redu
es the number of dynami
relo
ations that are needed, and by
onsequen
e, allows the data to be read-only.
The nested fun
tion
an a
ess all the variables of the
ontaining fun
tion that are visible
at the point of its denition. This is
alled lexi
al s
oping. For example, here we show a
nested fun
tion whi
h uses an inherited variable named offset:
1
The analogous feature in Fortran is
alled an assigned goto, but that name seems inappropriate in C,
where one
an do more than simply store label addresses in label variables.
205
Nested fun
tion denitions are permitted within fun
tions in the pla
es where variable
denitions are allowed; that is, in any blo
k, mixed with the other de
larations and statements in the blo
k.
It is possible to
all the nested fun
tion from outside the s
ope of its name by storing its
address or passing the address to another fun
tion:
ha
k (int *array, int size)
{
void store (int index, int value)
{ array[index = value; }
}
Here, the fun
tion intermediate re
eives the address of store as an argument. If
intermediate
alls store, the arguments given to store are used to store into array.
But this te
hnique works only so long as the
ontaining fun
tion (ha
k, in this example)
If you try to
all the nested fun
tion through its address after the
ontaining fun
tion has
exited, all hell will break loose. If you try to
all it after a
ontaining s
ope level has exited,
and if it refers to some of the variables that are no longer in s
ope, you may be lu
ky, but
it's not wise to take the risk. If, however, the nested fun
tion does not refer to anything
that has gone out of s
ope, you should be safe.
GCC implements taking the address of a nested fun
tion using a te
hnique
alled trampolines. A paper des
ribing them is available as
http://people.debian.org/~aaronl/Usenix88-lexi
.pdf.
A nested fun
tion
an jump to a label inherited from a
ontaining fun
tion, provided
the label was expli
itly de
lared in the
ontaining fun
tion (see Se
tion 5.2 [Lo
al Labels,
page 202). Su
h a jump returns instantly to the
ontaining fun
tion, exiting the nested
fun
tion whi
h did the goto and any intermediate fun
tions as well. Here is an example:
206
A nested fun
tion always has no linkage. De
laring one with extern or stati
is erroneous. If you need to de
lare the nested fun
tion before its denition, use auto (whi
h is
otherwise meaningless for fun
tion de
larations).
bar (int *array, int offset, int size)
{
__label__ failure;
auto int a
ess (int *, int);
/* . . . */
int a
ess (int *array, int index)
{
if (index > size)
goto failure;
return array[index + offset;
}
/* . . . */
}
207
The fun
tion saves the arg pointer register, stru
ture value address, and all registers
that might be used to pass arguments to a fun
tion into a blo
k of memory allo
ated
on the sta
k. Then it returns the address of that blo
k.
void * __builtin_apply (void (*fun
tion )(), void
[Built-in Fun
tion
*arguments, size t size )
This built-in fun
tion invokes fun
tion with a
opy of the parameters des
ribed by
arguments and size.
The value of arguments should be the value returned by __builtin_apply_args.
The argument size spe
ies the size of the sta
k argument data, in bytes.
This fun
tion returns a pointer to data des
ribing how to return whatever value was
returned by fun
tion. The data is saved in a blo
k of memory allo
ated on the sta
k.
It is not always simple to
ompute the proper value for size. The value is used by
__builtin_apply to
ompute the amount of data that should be pushed on the sta
k
and
opied from the in
oming argument area.
void __builtin_return (void *result )
[Built-in Fun
tion
This built-in fun
tion returns the value des
ribed by result from the
ontaining fun
tion. You should spe
ify, for result, a value returned by __builtin_apply.
This assumes that x is an array of pointers to fun
tions; the type des
ribed is that of the
values of the fun
tions.
Here is an example with a typename as the argument:
typeof (int *)
The reason for using names that start with unders
ores for the lo
al variables is to avoid
on
i
ts with variable names that o
ur within the expressions that are substituted for a
208
and b. Eventually we hope to design a new form of de
laration syntax that allows you to
de
lare variables whose s
opes start only after their initializers; this will be a more reliable
way to prevent su
h
on
i
ts.
Some more examples of the use of typeof:
This de
lares y with the type of what x points to.
typeof (*x) y;
To see the meaning of the de
laration using typeof, and why it might be a useful way
to write, rewrite it with these ma
ros:
#define pointer(T) typeof(T *)
#define array(T, N) typeof(T [N)
with the ee
t of de
laring T to have the type of the expression expr. This extension does
not work with GCC 3 (versions between 3.0 and 3.2 will
rash; 3.2.1 and later give an error).
Code whi
h relies on it should be rewritten to use typeof:
typedef typeof(expr ) T ;
In this simple
ase, the ability to omit the middle operand is not espe
ially useful. When it
be
omes useful is when the rst operand does, or may (if it is a ma
ro argument),
ontain a
side ee
t. Then repeating the operand in the middle would perform the side ee
t twi
e.
Omitting the middle operand uses the value already
omputed without the undesirable
ee
ts of re
omputing it.
209
210
re
ommended. If you are using the stabs debug info format, GCC des
ribes a non
ontiguous
omplex variable as if it were two separate variables of non
omplex type. If the variable's
a
tual name is foo, the two
titious variables are named foo$real and foo$imag. You
an examine and set these two
titious variables with your debugger.
In ISO C90, you would have to give
ontents a length of 1, whi
h means either you
waste spa
e or
ompli
ate the argument to mallo
.
In ISO C99, you would use a
exible array member, whi
h is slightly dierent in syntax
and semanti
s:
Flexible array members are written as
ontents[ without the 0.
Flexible array members have in
omplete type, and so the sizeof operator may not
be applied. As a quirk of the original implementation of zero-length arrays, sizeof
evaluates to zero.
Flexible array members may only appear as the last member of a stru
t that is
otherwise non-empty.
A stru
ture
ontaining a
exible array member, or a union
ontaining su
h a stru
ture
(possibly re
ursively), may not be a member of a stru
ture or an element of an array.
(However, these uses are permitted by GCC as extensions.)
GCC versions before 3.0 allowed zero-length arrays to be stati
ally initialized, as if they
were
exible arrays. In addition to those
ases that were useful, it also allowed initializations
in situations that would
orrupt later data. Non-empty initialization of zero-length arrays is
211
now treated like any
ase where there are more initializer elements than the array holds, in
that a suitable warning about "ex
ess elements in array" is given, and the ex
ess elements
(all of them, in this
ase) are ignored.
Instead GCC allows stati
initialization of
exible array members. This is equivalent to
dening a new stru
ture
ontaining the original stru
ture followed by an array of su
ient
size to
ontain the data. I.e. in the following, f1 is
onstru
ted as if it were de
lared like
f2.
stru
t f1 {
int x; int y[;
} f1 = { 1, { 2, 3, 4 } };
stru
t f2 {
stru
t f1 f1; int data[3;
} f2 = { { 1 }, { 2, 3, 4 } };
The
onvenien
e of this extension is that f1 has the desired type, eliminating the need to
onsistently refer to f2.f1.
This has symmetry with normal stati
arrays, in that an array of unknown size is also
written with [.
Of
ourse, this extension only makes sense if the extra data
omes at the end of a top-level
obje
t, as otherwise we would be overwriting data at subsequent osets. To avoid undue
ompli
ation and
onfusion with initialization of deeply nested arrays, we simply disallow
any non-empty initialization ex
ept when the stru
ture is the top-level obje
t. For example:
stru
t foo { int x; int y[; };
stru
t bar { stru
t foo z; };
stru
t
stru
t
stru
t
stru
t
foo
bar
bar
foo
a = { 1, {
b = { { 1,
= { { 1,
d[1 = { {
2, 3, 4 } };
{ 2, 3, 4 } } };
{ } } };
1 { 2, 3, 4 } } };
//
//
//
//
Valid.
Invalid.
Valid.
Invalid.
The stru
ture will have size zero. In C++, empty stru
tures are part of the language. G++
treats empty stru
tures as if they had a single member of type
har.
212
Jumping or breaking out of the s
ope of the array name deallo
ates the storage. Jumping
into the s
ope is not allowed; you get an error message for it.
You
an use the fun
tion allo
a to get an ee
t mu
h like variable-length arrays. The
fun
tion allo
a is available in many other C implementations (but not in all). On the
other hand, variable-length arrays are more elegant.
There are other dieren
es between these two methods. Spa
e allo
ated with allo
a
exists until the
ontaining fun
tion returns. The spa
e for a variable-length array is deallo
ated as soon as the array name's s
ope ends. (If you use both variable-length arrays
and allo
a in the same fun
tion, deallo
ation of a variable-length array will also deallo
ate
anything more re
ently allo
ated with allo
a.)
You
an also use variable-length arrays as arguments to fun
tions:
stru
t entry
tester (int len,
har data[len[len)
{
/* . . . */
}
The length of an array is
omputed on
e when the storage is allo
ated and is remembered
for the s
ope of the array in
ase you a
ess it with sizeof.
If you want to pass the array rst and the length afterward, you
an use a forward
de
laration in the parameter list|another GNU extension.
stru
t entry
tester (int len;
har data[len[len, int len)
{
/* . . . */
}
The `int len' before the semi
olon is a parameter forward de
laration, and it serves the
purpose of making the name len known when the de
laration of data is parsed.
You
an write any number of su
h parameter forward de
larations in the parameter list.
They
an be separated by
ommas or semi
olons, but the last one must end with a semi
olon,
whi
h is followed by the \real" parameter de
larations. Ea
h forward de
laration must
mat
h a \real" de
laration in parameter name and data type. ISO C99 does not support
parameter forward de
larations.
Here `...' is a variable argument. In the invo
ation of su
h a ma
ro, it represents the
zero or more tokens until the
losing parenthesis that ends the invo
ation, in
luding any
ommas. This set of tokens repla
es the identier __VA_ARGS__ in the ma
ro body wherever
it appears. See the CPP manual for more information.
213
GCC has long supported variadi
ma
ros, and used a dierent syntax that allowed you
to give a name to the variable arguments just like any other argument. Here is an example:
#define debug(format, args...) fprintf (stderr, format, args)
This is in all ways equivalent to the ISO C example above, but arguably more readable
and des
riptive.
GNU CPP has two further variadi
ma
ro extensions, and permits them to be used with
either of the above forms of ma
ro denition.
In standard C, you are not allowed to leave the variable argument out entirely; but you
are allowed to pass an empty argument. For example, this invo
ation is invalid in ISO C,
be
ause there is no
omma after the string:
debug ("A message")
GNU CPP permits you to
ompletely omit the variable arguments in this way. In the
above examples, the
ompiler would
omplain, though sin
e the expansion of the ma
ro still
has the extra
omma after the format string.
To help solve this problem, CPP behaves spe
ially for variable arguments used with the
token paste operator, `##'. If instead you write
#define debug(format, ...) fprintf (stderr, format, ## __VA_ARGS__)
and if the variable arguments are omitted or empty, the `##' operator
auses the prepro
essor to remove the
omma before it. If you do provide some variable arguments in
your ma
ro invo
ation, GNU CPP does not
omplain about the paste operation and instead
pla
es the variable arguments after the
omma. Just like any other pasted ma
ro argument,
these arguments are not ma
ro expanded.
214
You
an also
onstru
t an array. If all the elements of the
ompound literal are (made
up of) simple
onstant expressions, suitable for use in initializers of obje
ts of stati
storage
duration, then the
ompound literal
an be
oer
ed to a pointer to its rst element and
used in su
h an initializer, as shown here:
har **foo = (
har *[) { "x", "y", "z" };
Compound literals for s
alar types and union types are is also allowed, but then the
ompound literal is equivalent to a
ast.
As a GNU extension, GCC allows initialization of obje
ts with stati
storage duration
by
ompound literals (whi
h is not possible in ISO C99, be
ause the initializer is not a
onstant). It is handled as if the obje
t was initialized only with the bra
ket en
losed list
if
ompound literal's and obje
t types mat
h. The initializer list of the
ompound literal
must be
onstant. If the obje
t being initialized has array type of unknown size, the size is
determined by
ompound literal size.
215
is equivalent to
int a[6 = { 0, 0, 15, 0, 29, 0 };
The index values must be
onstant expressions, even if the array being initialized is automati
.
An alternative syntax for this whi
h has been obsolete sin
e GCC 2.5 but GCC still
a
epts is to write `[index ' before the element value, with no `='.
To initialize a range of elements to the same value, write `[first ... last = value '.
This is a GNU extension. For example,
int widths[ = { [0 ... 9 = 1, [10 ... 99 = 2, [100 = 3 };
If the value in it has side-ee
ts, the side-ee
ts will happen only on
e, not for ea
h initialized eld by the range initializer.
Note that the length of the array is the highest value spe
ied plus one.
In a stru
ture initializer, spe
ify the name of a eld to initialize with `.fieldname ='
before the element value. For example, given the following stru
ture,
stru
t point { int x, y; };
is equivalent to
stru
t point p = { xvalue, yvalue };
Another syntax whi
h has the same meaning, obsolete sin
e GCC 2.5, is `fieldname :',
as shown here:
stru
t point p = { y: yvalue, x: xvalue };
The `[index ' or `.fieldname ' is known as a designator. You
an also use a designator
(or the obsolete
olon syntax) when initializing a union, to spe
ify whi
h element of the
union should be used. For example,
union foo { int i; double d; };
union foo f = { .d = 4 };
216
will
onvert 4 to a double to store it in the union using the se
ond element. By
ontrast,
asting 4 to type union foo would store it into the union as the integer i, sin
e it is an
integer. (See Se
tion 5.22 [Cast to Union, page 216.)
You
an
ombine this te
hnique of naming elements with ordinary C initialization of
su
essive elements. Ea
h initializer element that does not have a designator applies to the
next
onse
utive element of the array or stru
ture. For example,
int a[6 = { [1 = v1, v2, [4 = v4 };
is equivalent to
int a[6 = { 0, v1, v2, 0, v4, 0 };
Labeling the elements of an array initializer is espe
ially useful when the indi
es are
hara
ters or belong to an enum type. For example:
int whitespa
e[256
= { [' ' = 1, ['\t' = 1, ['\h' = 1,
['\f' = 1, ['\n' = 1, ['\r' = 1 };
You
an also write a series of `.fieldname ' and `[index ' designators before an `=' to
spe
ify a nested subobje
t to initialize; the list is taken relative to the subobje
t
orresponding to the
losest surrounding bra
e pair. For example, with the `stru
t point' de
laration
above:
stru
t point ptarray[10 = { [2.y = yv2, [2.x = xv2, [0.x = xv0 };
If the same eld is initialized multiple times, it will have value from the last initialization.
If any su
h overridden initialization has side-ee
t, it is unspe
ied whether the side-ee
t
happens or not. Currently, GCC will dis
ard them and issue a warning.
This has the same ee
t as the proper number of individual
ase labels, one for ea
h integer
value from low to high, in
lusive.
This feature is espe
ially useful for ranges of ASCII
hara
ter
odes:
ase 'A' ... 'Z':
Be
areful: Write spa
es around the ..., for otherwise it may be parsed wrong when you
use it with integer values. For example, write this:
ase 1 ... 5:
217
u.i = x
u.d = y
Ea h identier is visible from where it is de lared until the end of the en losing blo k.
218
de
lares `f' to be a weak alias for `__f'. In C++, the mangled name for the
target must be used. It is an error if `__f' is not dened in the same translation
unit.
Not all target ma
hines support this attribute.
always_inline
Generally, fun
tions are not inlined unless optimization is spe
ied. For fun
tions de
lared inline, this attribute inlines the fun
tion even if no optimization
level was spe
ied.
On the Intel 386, the
de
l attribute
auses the
ompiler to assume that the
alling fun
tion will pop o the sta
k spa
e used to pass arguments. This is
useful to override the ee
ts of the `-mrtd' swit
h.
de l
Many fun
tions do not examine any values ex
ept their arguments, and have
no ee
ts ex
ept the return value. Basi
ally this is just slightly more stri
t
lass than the pure attribute below, sin
e fun
tion is not allowed to read global
memory.
Note that a fun
tion that has pointer arguments and examines the data pointed
to must not be de
lared
onst. Likewise, a fun
tion that
alls a non-
onst
fun
tion usually must not be
onst. It does not make sense for a
onst fun
tion
to return void.
The attribute
onst is not implemented in GCC versions earlier than 2.5. An
alternative way to de
lare that a fun
tion has no side ee
ts, whi
h works in
the
urrent version and in some older versions, is as follows:
onst
This approa
h does not work in GNU C++ from 2.6.0 on, sin
e the language
spe
ies that the `
onst' must be atta
hed to the return value.
onstru
tor
destru
tor
The
onstru
tor attribute
auses the fun
tion to be
alled automati
ally before exe
ution enters main (). Similarly, the destru
tor attribute
auses the
fun
tion to be
alled automati
ally after main () has
ompleted or exit () has
been
alled. Fun
tions with these attributes are useful for initializing data that
will be used impli
itly during the exe
ution of the program.
These attributes are not
urrently implemented for Obje
tive-C.
depre ated
The depre
ated attribute results in a warning if the fun
tion is used anywhere
in the sour
e le. This is useful when identifying fun
tions that are expe
ted
to be removed in a future version of a program. The warning also in
ludes the
lo
ation of the de
laration of the depre
ated fun
tion, to enable users to easily
nd further information about why the fun
tion is depre
ated, or what they
should do instead. Note that the warnings only o
urs for uses:
219
dllimport
On Mi
rosoft Windows targets and Symbian OS targets the dllexport attribute
auses the
ompiler to provide a global pointer to a pointer in a DLL,
so that it
an be referen
ed with the dllimport attribute. On Mi
rosoft Windows targets, the pointer name is formed by
ombining _imp__ and the fun
tion
or variable name.
You
an use __de
lspe
(dllexport) as a synonym for __attribute__
((dllexport)) for
ompatibility with other
ompilers.
On systems that support the visibility attribute, this attribute also implies
\default" visibility, unless a visibility attribute is expli
itly spe
ied. You
should avoid the use of dllexport with \hidden" or \internal" visibility; in the
future GCC may issue an error for those
ases.
Currently, the dllexport attribute is ignored for inlined fun
tions, unless the
`-fkeep-inline-fun
tions'
ag has been used. The attribute is also ignored
for undened symbols.
When applied to C++
lasses, the attribute marks dened non-inlined member
fun
tions and stati
data members as exports. Stati
onsts initialized in-
lass
are not marked unless they are also dened out-of-
lass.
For Mi
rosoft Windows targets there are alternative methods for in
luding the
symbol in the DLL's export table su
h as using a `.def' le with an EXPORTS
se
tion or, with GNU ld, using the `--export-all' linker
ag.
On Mi
rosoft Windows and Symbian OS targets, the dllimport attribute
auses the
ompiler to referen
e a fun
tion or variable via a global pointer
to a pointer that is set up by the DLL exporting the symbol. The attribute
implies extern storage. On Mi
rosoft Windows targets, the pointer name is
formed by
ombining _imp__ and the fun
tion or variable name.
You
an use __de
lspe
(dllimport) as a synonym for __attribute__
((dllimport)) for
ompatibility with other
ompilers.
Currently, the attribute is ignored for inlined fun
tions. If the attribute is applied to a symbol denition, an error is reported. If a symbol previously de
lared
dllimport is later dened, the attribute is ignored in subsequent referen
es,
and a warning is emitted. The attribute is also overridden by a subsequent
de
laration as dllexport.
When applied to C++
lasses, the attribute marks non-inlined member fun
tions
and stati
data members as imports. However, the attribute is ignored for
virtual methods to allow
reation of vtables using thunks.
220
Use this attribute on the H8/300, H8/300H, and H8S to indi
ate that the
spe
ied variable should be pla
ed into the eight bit data se
tion. The
ompiler
will generate more e
ient
ode for
ertain operations on data in the eight bit
data area. Note the eight bit data area is limited to 256 bytes of data.
You must use GAS and GLD from GNU binutils version 2.7 or later for this
attribute to work
orre
tly.
far
On 68HC11 and 68HC12 the far attribute
auses the
ompiler to use a
alling
onvention that takes
are of swit
hing memory banks when entering and
leaving a fun
tion. This
alling
onvention is also the default when using the
`-mlong-
alls' option.
On 68HC12 the
ompiler will use the
all and rt
instru
tions to
all and
return from a fun
tion.
On 68HC11 the
ompiler will generate a sequen
e of instru
tions to invoke a
board-spe
i
routine to swit
h the memory bank and
all the real fun
tion.
The board-spe
i
routine simulates a
all. At the end of a fun
tion, it will
jump to a board-spe
i
routine instead of using rts. The board-spe
i
return
routine simulates the rt
.
fast all On the Intel 386, the fast all attribute auses the ompiler to pass the rst
two arguments in the registers ECX and EDX. Subsequent arguments are
passed on the sta
k. The
alled fun
tion will pop the arguments o the sta
k.
If the number of arguments is variable all arguments are pushed on the sta
k.
extern int
my_printf (void *my_obje
t,
onst
har *my_format, ...)
221
222
Use this attribute on the H8/300, H8/300H, and H8S to indi
ate that the spe
ied fun
tion should be
alled through the fun
tion ve
tor. Calling a fun
tion
through the fun
tion ve
tor will redu
e
ode size, however; the fun
tion ve
tor
has a limited size (maximum 128 entries on the H8/300 and 64 entries on the
H8/300H and H8S) and shares spa
e with the interrupt ve
tor.
You must use GAS and GLD from GNU binutils version 2.7 or later for this
attribute to work
orre
tly.
interrupt
Use this attribute on the ARM, AVR, C4x, M32R/D and Xstormy16 ports
to indi
ate that the spe
ied fun
tion is an interrupt handler. The
ompiler
will generate fun
tion entry and exit sequen
es suitable for use in an interrupt
handler when this attribute is present.
Note, interrupt handlers for the m68k, H8/300, H8/300H, H8S, and SH pro
essors
an be spe
ied via the interrupt_handler attribute.
Note, on the AVR, interrupts will be enabled inside the fun
tion.
Note, for the ARM, you
an spe
ify the kind of interrupt to be handled by
adding an optional parameter to the interrupt attribute like this:
void f () __attribute__ ((interrupt ("IRQ")));
Permissible values for this parameter are: IRQ, FIQ, SWI, ABORT and UNDEF.
interrupt_handler
Use this attribute on the m68k, H8/300, H8/300H, H8S, and SH to indi
ate
that the spe
ied fun
tion is an interrupt handler. The
ompiler will generate
fun
tion entry and exit sequen
es suitable for use in an interrupt handler when
this attribute is present.
This attribute spe
ies how a parti
ular fun
tion is
alled on ARM. Both
attributes override the `-mlong-
alls' (see Se
tion 3.17.2 [ARM Options,
page 109)
ommand line swit
h and #pragma long_
alls settings. The long_
all attribute
auses the
ompiler to always
all the fun
tion by rst loading
its address into a register and then using the
ontents of that register. The
223
short_
all attribute always pla
es the oset to the fun
tion from the
all site
into the `BL' instru
tion dire
tly.
long
all/short
all
On the RS/6000 and PowerPC, the long
all attribute
auses the
ompiler
to always
all this fun
tion via a pointer, just as it would if the `-mlong
all'
option had been spe
ied. The short
all attribute
auses the
ompiler not
to do this. These attributes override both the `-mlong
all' swit
h and the
#pragma long
all setting.
See Se
tion 3.17.23 [RS/6000 and PowerPC Options, page 155, for more information on whether long
alls are ne
essary.
mallo
The mallo
attribute is used to tell the
ompiler that a fun
tion may be treated
as if any non-NULL pointer it returns
annot alias any other pointer valid when
the fun
tion returns. This will often improve optimization. Standard fun
tions
with this property in
lude mallo
and
allo
. reallo
-like fun
tions have this
property as long as the old pointer is never referred to (in
luding
omparing it
to the new pointer) after the fun
tion returns a non-NULL value.
model (model-name )
On the M32R/D, use this attribute to set the addressability of an obje
t, and of
the
ode generated for a fun
tion. The identier model-name is one of small,
medium, or large, representing ea
h of the
ode models.
Small model obje
ts live in the lower 16MB of memory (so that their addresses
an be loaded with the ld24 instru
tion), and are
allable with the bl instru
tion.
Medium model obje
ts may live anywhere in the 32-bit address spa
e (the
ompiler will generate seth/add3 instru
tions to load their addresses), and are
allable with the bl instru
tion.
Large model obje
ts may live anywhere in the 32-bit address spa
e (the
ompiler
will generate seth/add3 instru
tions to load their addresses), and may not be
rea
hable with the bl instru
tion (the
ompiler will generate the mu
h slower
seth/add3/jl instru
tion sequen
e).
On IA-64, use this attribute to set the addressability of an obje
t. At present,
the only supported identier for model-name is small, indi
ating addressability via \small" (22-bit) addresses (so that their addresses
an be loaded with
the addl instru
tion). Caveat: su
h addressing is by denition not position
independent and hen
e this attribute must not be used for obje
ts dened by
shared libraries.
naked
Use this attribute on the ARM, AVR, C4x and IP2K ports to indi
ate that the
spe
ied fun
tion does not need prologue/epilogue sequen
es generated by the
ompiler. It is up to the programmer to provide these sequen
es.
near
On 68HC11 and 68HC12 the near attribute
auses the
ompiler to use the
normal
alling
onvention based on jsr and rts. This attribute
an be used to
an
el the ee
t of the `-mlong-
alls' option.
224
no_instrument_fun
tion
If `-finstrument-fun
tions' is given, proling fun
tion
alls will be generated
at entry and exit of most user-
ompiled fun
tions. Fun
tions with this attribute
will not be so instrumented.
noinline This fun
tion attribute prevents a fun
tion from being
onsidered for inlining.
nonnull (arg-index, ...)
The nonnull attribute spe
ies that some fun
tion parameters should be non-
extern void *
my_mem
py (void *dest,
onst void *sr
, size_t len)
__attribute__((nonnull (1, 2)));
auses the
ompiler to
he
k that, in
alls to my_mem
py, arguments dest and
sr
are non-null. If the
ompiler determines that a null pointer is passed in
an argument slot marked as non-null, and the `-Wnonnull' option is enabled, a
warning is issued. The
ompiler may also
hoose to make optimizations based
on the knowledge that
ertain fun
tion arguments will not be null.
If no argument index list is given to the nonnull attribute, all pointer arguments
are marked as non-null. To illustrate, the following de
laration is equivalent to
the previous example:
extern void *
my_mem
py (void *dest,
onst void *sr
, size_t len)
__attribute__((nonnull));
noreturn A few standard library fun tions, su h as abort and exit, annot return. GCC
knows this automati
ally. Some programs dene their own fun
tions that never
return. You
an de
lare them noreturn to tell the
ompiler this fa
t. For
example,
void fatal () __attribute__ ((noreturn));
void
fatal (/* . . . */)
{
/* . . . */ /* Print error message. */ /* . . . */
exit (1);
}
The noreturn keyword tells the
ompiler to assume that fatal
annot return.
It
an then optimize without regard to what would happen if fatal ever did
return. This makes slightly better
ode. More importantly, it helps avoid
spurious warnings of uninitialized variables.
The noreturn keyword does not ae
t the ex
eptional path when that applies:
a noreturn-marked fun
tion may still return to the
aller by throwing an ex
eption or
alling longjmp.
Do not assume that registers saved by the
alling fun
tion are restored before
alling the noreturn fun
tion.
It does not make sense for a noreturn fun
tion to have a return type other
than void.
225
The attribute noreturn is not implemented in GCC versions earlier than 2.5.
An alternative way to de
lare that a fun
tion does not return, whi
h works in
the
urrent version and in some older versions, is as follows:
typedef void voidfn ();
volatile voidfn fatal;
nothrow
pure
says that the hypotheti
al fun
tion square is safe to
all fewer times than the
program says.
Some of
ommon examples of pure fun
tions are strlen or mem
mp. Interesting non-pure fun
tions are fun
tions with innite loops or those depending
on volatile memory or other system resour
e, that may
hange between two
onse
utive
alls (su
h as feof in a multithreading environment).
The attribute pure is not implemented in GCC versions earlier than 2.96.
regparm (number )
saveall
On the Intel 386, the regparm attribute
auses the
ompiler to pass up to
number integer arguments in registers EAX, EDX, and ECX instead of on the
sta
k. Fun
tions that take a variable number of arguments will
ontinue to be
passed all of their arguments on the sta
k.
Beware that on some ELF systems this attribute is unsuitable for global fun
tions in shared libraries with lazy binding (whi
h is the default). Lazy binding
will send the rst
all via resolving
ode in the loader, whi
h might assume
EAX, EDX and ECX
an be
lobbered, as per the standard
alling
onventions. Solaris 8 is ae
ted by this. GNU systems with GLIBC 2.1 or higher,
and FreeBSD, are believed to be safe sin
e the loaders there save all registers.
(Lazy binding
an be disabled with the linker or the loader if desired, to avoid
the problem.)
Use this attribute on the H8/300, H8/300H, and H8S to indi
ate that all registers ex
ept the sta
k pointer should be saved in the prologue regardless of
whether they are used or not.
Normally, the ompiler pla es the ode it generates in the text se tion. Sometimes, however, you need additional se tions, or you need ertain parti ular
226
fun
tions to appear in spe
ial se
tions. The se
tion attribute spe
ies that a
fun
tion lives in a parti
ular se
tion. For example, the de
laration:
extern void foobar (void) __attribute__ ((se
tion ("bar")));
The attribute is automati
ally set with a position of 0 for the built-in fun
tions
exe
l and exe
lp. The built-in fun
tion exe
le has the attribute set with a
position of 1.
A valid NULL in this
ontext is dened as zero with any pointer type. If your
system denes the NULL ma
ro with an integer type then you need to add
an expli
it
ast. GCC repla
es stddef.h with a
opy that redenes NULL
appropriately.
The warnings for missing or in
orre
t sentinels are enabled with `-Wformat'.
short_
all
short
all
signal
sp_swit h
std all
tiny_data
On the Intel 386, the std
all attribute
auses the
ompiler to assume that the
alled fun
tion will pop o the sta
k spa
e used to pass arguments, unless it
takes a variable number of arguments.
Use this attribute on the H8/300H and H8S to indi
ate that the spe
ied variable should be pla
ed into the tiny data se
tion. The
ompiler will generate
227
more e
ient
ode for loads and stores on data in the tiny data se
tion. Note
the tiny data area is limited to slightly under 32kbytes of data.
trap_exit
unused
used
See the ELF gABI for
omplete details, but the short story is:
default
Default visibility is the normal
ase for ELF. This value is available
for the visibility attribute to override other options that may
hange
the assumed visibility of symbols.
hidden
Hidden visibility indi
ates that the symbol will not be pla
ed into
the dynami
symbol table, so no other module (exe
utable or
shared library)
an referen
e it dire
tly.
internal
Internal visibility is like hidden visibility, but with additional pro
essor spe
i
semanti
s. Unless otherwise spe
ied by the psABI,
GCC denes internal visibility to mean that the fun
tion is never
alled from another module. Note that hidden symbols, while they
annot be referen
ed dire
tly by other modules,
an be referen
ed
indire
tly via fun
tion pointers. By indi
ating that a symbol
annot be
alled from outside the module, GCC may for instan
e omit
the load of a PIC register sin
e it is known that the
alling fun
tion
loaded the
orre
t value.
prote
ted Prote
ted visibility indi
ates that the symbol will be pla
ed in the
dynami
symbol table, but that referen
es within the dening module will bind to the lo
al symbol. That is, the symbol
annot be
overridden by another module.
Not all ELF targets support this attribute.
warn_unused_result
The warn_unused_result attribute
auses a warning to be emitted if a
aller of
the fun
tion with this attribute does not use its return value. This is useful for
fun
tions where not
he
king the result is either a se
urity problem or always
a bug, su
h as reallo
.
228
229
230
denition
annot begin with an attribute spe
ier, be
ause su
h an attribute applies to the
fun
tion instead by syntax des
ribed below (whi
h, however, is not yet implemented in this
ase). In some other
ases, attribute spe
iers are permitted by this grammar but not yet
supported by the
ompiler. All attribute spe
iers in this pla
e relate to the de
laration as
a whole. In the obsoles
ent usage where a type of int is implied by the absen
e of type
spe
iers, su
h a list of spe
iers and qualiers may be an attribute spe
ier list with no
other spe
iers or qualiers.
At present, the rst parameter in a fun
tion prototype must have some type spe
ier
whi
h is not an attribute spe
ier; this resolves an ambiguity in the interpretation of void
f(int (__attribute__((foo)) x)), but is subje
t to
hange. At present, if the parentheses of a fun
tion de
larator
ontain only attributes then those attributes are ignored, rather
than yielding an error or warning or implying a single parameter of type int, but this is
subje
t to
hange.
An attribute spe
ier list may appear immediately before a de
larator (other than the
rst) in a
omma-separated list of de
larators in a de
laration of more than one identier
using a single list of spe
iers and qualiers. Su
h attribute spe
iers apply only to the
identier before whose de
larator they appear. For example, in
__attribute__((noreturn)) void d0 (void),
__attribute__((format(printf, 1, 2))) d1 (
onst
har *, ...),
d2 (void)
the noreturn attribute applies to all the fun
tions de
lared; the format attribute only
applies to d1.
An attribute spe
ier list may appear immediately before the
omma, = or semi
olon
terminating the de
laration of an identier other than a fun
tion denition. At present,
su
h attribute spe
iers apply to the de
lared obje
t or fun
tion, but in future they may
atta
h to the outermost adja
ent de
larator. In simple
ases there is no dieren
e, but, for
example, in
void (****f)(void) __attribute__((noreturn));
at present the noreturn attribute applies to f, whi
h
auses a warning sin
e f is not a
fun
tion, but in future it may apply to the fun
tion ****f. The pre
ise semanti
s of what
attributes in su
h
ases will apply to are not yet spe
ied. Where an assembler name for
an obje
t or fun
tion is spe
ied (see Se
tion 5.36 [Asm Labels, page 265), at present the
attribute must follow the asm spe
i
ation; in future, attributes before the asm spe
i
ation
may apply to the adja
ent de
larator, and those after it to the de
lared obje
t or fun
tion.
An attribute spe
ier list may, in future, be permitted to appear after the de
larator in
a fun
tion denition (before any old-style parameter de
larations or the fun
tion body).
Attribute spe
iers may be mixed with type qualiers appearing inside the [ of a parameter array de
larator, in the C99
onstru
t by whi
h su
h qualiers are applied to the
pointer to whi
h the array is impli
itly
onverted. Su
h attribute spe
iers apply to the
pointer, not to the array, but at present this is not implemented and they are ignored.
An attribute spe
ier list may appear at the start of a nested de
larator. At present,
there are some limitations in this usage: the attributes
orre
tly apply to the de
larator,
but for most individual attributes the semanti
s this implies are not implemented. When
attribute spe
iers follow the * of a pointer de
larator, they may be mixed with any type
qualiers present. The following des
ribes the formal semanti
s of this syntax. It will make
231
the most sense if you are familiar with the formal spe
i
ation of de
larators in the ISO C
standard.
Consider (as in C99 sub
lause 6.7.5 paragraph 4) a de
laration T D1, where T
ontains
de
laration spe
iers that spe
ify a type Type (su
h as int) and D1 is a de
larator that
ontains an identier ident. The type spe
ied for ident for derived de
larators whose type
does not in
lude an attribute spe
ier is as in the ISO C standard.
If D1 has the form ( attribute-spe
ifier-list D ), and the de
laration T D spe
ies
the type \derived-de
larator-type-list Type" for ident, then T D1 spe
ies the type \derivedde
larator-type-list attribute-spe
ier-list Type" for ident.
If D1 has the form * type-qualifier-and-attribute-spe
ifier-list D, and the de
laration T D spe
ies the type \derived-de
larator-type-list Type" for ident, then T D1 spe
ies the type \derived-de
larator-type-list type-qualier-and-attribute-spe
ier-list Type"
for ident.
For example,
void (__attribute__((noreturn)) ****f) (void);
spe
ies the type \pointer to pointer to pointer to pointer to non-returning fun
tion returning void". As another example,
har *__attribute__((aligned(8))) *f;
spe
ies the type \pointer to 8-byte-aligned pointer to
har". Note again that this does not
work with most attributes; for example, the usage of `aligned' and `noreturn' attributes
given above is not yet supported.
For
ompatibility with existing
ode written for
ompiler versions that did not implement
attributes on nested de
larators, some laxity is allowed in the pla
ing of attributes. If an
attribute that only applies to types is applied to a de
laration, it will be treated as applying
to the type of that de
laration. If an attribute that only applies to de
larations is applied
to the type of a de
laration, it will be treated as applying to that de
laration; and, for
ompatibility with
ode pla
ing the attributes immediately before the identier de
lared,
su
h an attribute applied to a fun
tion return type will be treated as applying to the
fun
tion type, and su
h an attribute applied to an array element type will be treated as
applying to the array type. If an attribute that only applies to fun
tion types is applied to
a pointer-to-fun
tion type, it will be treated as applying to the pointer target type; if su
h
an attribute is applied to a fun
tion return type that is not a pointer-to-fun
tion type, it
will be treated as applying to the fun
tion type.
*/
*/
232
Suppose the type uid_t happens to be short. ISO C does not allow this example,
be
ause subword arguments in old-style non-prototype denitions are promoted. Therefore
in this example the fun
tion denition's argument is really an int, whi
h does not mat
h
the prototype argument type of short.
This restri
tion of ISO C makes it hard to write
ode that is portable to traditional C
ompilers, be
ause the programmer does not know whether the uid_t type is short, int,
or long. Therefore, in
ases like these GNU C allows a prototype to override a later oldstyle denition. More pre
isely, in GNU C, a fun
tion prototype argument type overrides
the argument type spe
ied by a later old-style denition if the former type is the same as
the latter type before promotion. Thus in GNU C the above example is equivalent to the
following:
int isroot (uid_t);
int
isroot (uid_t x)
{
return x == 0;
}
GNU C++ does not support old-style fun tion denitions, so this extension is irrelevant.
233
the value of __alignof__ (foo1.y) is 1, even though its a
tual alignment is probably 2 or
4, the same as __alignof__ (int).
It is an error to ask for the alignment of an in
omplete type.
This attribute spe
ies a minimum alignment for the variable or stru
ture eld,
measured in bytes. For example, the de
laration:
int x __attribute__ ((aligned (16))) = 0;
auses the
ompiler to allo
ate the global variable x on a 16-byte boundary. On
a 68040, this
ould be used in
onjun
tion with an asm expression to a
ess the
move16 instru
tion whi
h requires 16-byte aligned operands.
You
an also spe
ify the alignment of stru
ture elds. For example, to
reate a
double-word aligned int pair, you
ould write:
stru
t foo { int x[2 __attribute__ ((aligned (8))); };
234
As in the pre
eding examples, you
an expli
itly spe
ify the alignment (in bytes)
that you wish the
ompiler to use for a given variable or stru
ture eld. Alternatively, you
an leave out the alignment fa
tor and just ask the
ompiler to
align a variable or eld to the maximum useful alignment for the target ma
hine
you are
ompiling for. For example, you
ould write:
short array[3 __attribute__ ((aligned));
Whenever you leave out the alignment fa
tor in an aligned attribute spe
i
ation, the
ompiler automati
ally sets the alignment for the de
lared variable or
eld to the largest alignment whi
h is ever used for any data type on the target
ma
hine you are
ompiling for. Doing this
an often make
opy operations more
e
ient, be
ause the
ompiler
an use whatever instru
tions
opy the biggest
hunks of memory when performing
opies to or from the variables or elds
that you have aligned this way.
The aligned attribute
an only in
rease the alignment; but you
an de
rease
it by spe
ifying pa
ked as well. See below.
Note that the ee
tiveness of aligned attributes may be limited by inherent
limitations in your linker. On many systems, the linker is only able to arrange
for variables to be aligned up to a
ertain maximum alignment. (For some
linkers, the maximum supported alignment may be very very small.) If your
linker is only able to align variables up to a maximum of 8 byte alignment, then
spe
ifying aligned(16) in an __attribute__ will still only provide you with
8 byte alignment. See your linker do
umentation for further information.
leanup (
leanup_fun
tion )
The
leanup attribute runs a fun
tion when the variable goes out of s
ope.
This attribute
an only be applied to auto fun
tion s
ope variables; it may not
be applied to parameters or variables with stati
storage duration. The fun
tion
must take one parameter, a pointer to a type
ompatible with the variable. The
return value of the fun
tion (if any) is ignored.
If `-fex
eptions' is enabled, then
leanup fun
tion will be run during the sta
k
unwinding that happens during the pro
essing of the ex
eption. Note that the
leanup attribute does not allow the ex
eption to be
aught, only to perform
an a
tion. It is undened what happens if
leanup fun
tion does not return
normally.
ommon
no
ommon The
ommon attribute requests GCC to pla
e a variable in \
ommon" storage.
The no
ommon attribute requests the opposite|to allo
ate spa
e for it dire
tly.
These attributes override the default
hosen by the `-fno-
ommon' and
`-f
ommon'
ags respe
tively.
depre
ated
The depre
ated attribute results in a warning if the variable is used anywhere
in the sour
e le. This is useful when identifying variables that are expe
ted
to be removed in a future version of a program. The warning also in
ludes the
lo
ation of the de
laration of the depre
ated variable, to enable users to easily
nd further information about why the variable is depre
ated, or what they
should do instead. Note that the warning only o
urs for uses:
235
This attribute spe
ies the data type for the de
laration|whi
hever type
orresponds to the mode mode. This in ee
t lets you request an integer or
oating
point type a
ording to its width.
You may also spe
ify a mode of `byte' or `__byte__' to indi
ate the mode
orresponding to a one-byte integer, `word' or `__word__' for the mode of a oneword integer, and `pointer' or `__pointer__' for the mode used to represent
pointers.
pa ked
The pa
ked attribute spe
ies that a variable or stru
ture eld should have the
smallest possible alignment|one byte for a variable, and one bit for a eld,
unless you spe
ify a larger value with the aligned attribute.
Here is a stru
ture in whi
h the eld x is pa
ked, so that it immediately follows
a:
stru
t foo
{
har a;
int x[2 __attribute__ ((pa
ked));
};
Normally, the
ompiler pla
es the obje
ts it generates in se
tions like data and
bss. Sometimes, however, you need additional se
tions, or you need
ertain
parti
ular variables to appear in spe
ial se
tions, for example to map to spe
ial
hardware. The se
tion attribute spe
ies that a variable (or fun
tion) lives
in a parti
ular se
tion. For example, this small program uses several spe
i
se
tion names:
stru
t duart a __attribute__ ((se
tion ("DUART_A"))) = { 0 };
stru
t duart b __attribute__ ((se
tion ("DUART_B"))) = { 0 };
har sta
k[10000 __attribute__ ((se
tion ("STACK"))) = { 0 };
int init_data __attribute__ ((se
tion ("INITDATA"))) = 0;
main()
{
/* Initialize sta
k pointer */
init_sp (sta
k + sizeof (sta
k));
/* Initialize initialized data */
mem
py (&init_data, &data, &edata - &data);
236
You may only use the shared attribute along with se
tion attribute with a
fully initialized global denition be
ause of the way linkers work. See se
tion
attribute for more information.
The shared attribute is only available on Mi
rosoft Windows.
tls_model ("tls_model ")
The tls_model attribute sets thread-lo
al storage model (see Se
tion 5.49
[Thread-Lo
al, page 331) of a parti
ular __thread variable, overriding
`-ftls-model='
ommand line swit
h on a per-variable basis. The tls model
argument should be one of global-dynami
, lo
al-dynami
, initial-exe
or lo
al-exe
.
This attribute, atta
hed to a fun
tion parameter whi
h is a union, means that
the
orresponding argument may have the type of any union member, but the
argument is passed as if its type were that of the rst union member. For more
details see See Se
tion 5.32 [Type Attributes, page 238. You
an also use this
attribute on a typedef for a union data type; then it applies to all fun
tion
parameters with that type.
unused
This attribute, atta
hed to a variable, means that the variable is meant to be
possibly unused. GCC will not produ
e a warning for this variable.
237
ve tor_size (bytes )
This attribute spe
ies the ve
tor size for the variable, measured in bytes. For
example, the de
laration:
int foo __attribute__ ((ve
tor_size (16)));
auses the
ompiler to set the mode for foo, to be 16 bytes, divided into int
sized units. Assuming a 32-bit int (a ve
tor of 4 units of 4 bytes), the
orresponding mode of foo will be V4SI.
This attribute is only appli
able to integral and
oat s
alars, although arrays,
pointers, and fun
tion return values are allowed in
onjun
tion with this
onstru
t.
Aggregates with this attribute are invalid, even if they are of the same size as
a
orresponding s
alar. For example, the de
laration:
stru
t S { int a; };
stru
t S __attribute__ ((ve
tor_size (16))) foo;
is invalid even if the size of the stru
ture is the same as the size of the int.
The weak attribute is des
ribed in See Se
tion 5.24 [Fun
tion Attributes,
page 217.
weak
dllimport
The dllimport attribute is des
ribed in See Se
tion 5.24 [Fun
tion Attributes,
page 217.
dlexport The dllexport attribute is des ribed in See Se tion 5.24 [Fun tion Attributes,
page 217.
Use this attribute on the M32R/D to set the addressability of an obje
t. The
identier model-name is one of small, medium, or large, representing ea
h of
the
ode models.
Small model obje
ts live in the lower 16MB of memory (so that their addresses
an be loaded with the ld24 instru
tion).
Medium and large model obje
ts may live anywhere in the 32-bit address spa
e
(the
ompiler will generate seth/add3 instru
tions to load their addresses).
Two attributes are
urrently dened for i386
ongurations: ms_stru
t and g
_stru
t
ms_stru
t
g
_stru
t
If pa
ked is used on a stru
ture, or if bit-elds are used it may be that the
Mi
rosoft ABI pa
ks them dierently than GCC would normally pa
k them.
Parti
ularly when moving pa
ked data between fun
tions
ompiled with GCC
and the native Mi
rosoft
ompiler (either via fun
tion
all or as data in a le),
it may be ne
essary to a
ess either format.
238
If a variable has the below100 attribute (BELOW100 is allowed also), GCC will
pla
e the variable in the rst 0x100 bytes of memory and use spe
ial op
odes
to a
ess it. Su
h variables will be pla
ed in either the .bss_below100 se
tion
or the .data_below100 se
tion.
This attribute spe
ies a minimum alignment (in bytes) for variables of the
spe
ied type. For example, the de
larations:
stru
t S { short f[3; } __attribute__ ((aligned (8)));
typedef int more_aligned_int __attribute__ ((aligned (8)));
for
e the
ompiler to insure (as far as it
an) that ea
h variable whose type
is stru
t S or more_aligned_int will be allo
ated and aligned at least on a
8-byte boundary. On a SPARC, having all variables of type stru
t S aligned to
8-byte boundaries allows the
ompiler to use the ldd and std (doubleword load
and store) instru
tions when
opying one variable of type stru
t S to another,
thus improving run-time e
ien
y.
Note that the alignment of any given stru
t or union type is required by the
ISO C standard to be at least a perfe
t multiple of the lowest
ommon multiple
of the alignments of all of the members of the stru
t or union in question. This
means that you
an ee
tively adjust the alignment of a stru
t or union type
239
pa ked
Whenever you leave out the alignment fa
tor in an aligned attribute spe
i
ation, the
ompiler automati
ally sets the alignment for the type to the largest
alignment whi
h is ever used for any data type on the target ma
hine you are
ompiling for. Doing this
an often make
opy operations more e
ient, be
ause the
ompiler
an use whatever instru
tions
opy the biggest
hunks of
memory when performing
opies to or from the variables whi
h have types that
you have aligned this way.
In the example above, if the size of ea
h short is 2 bytes, then the size of the
entire stru
t S type is 6 bytes. The smallest power of two whi
h is greater
than or equal to that is 8, so the
ompiler sets the alignment for the entire
stru
t S type to 8 bytes.
Note that although you
an ask the
ompiler to sele
t a time-e
ient alignment
for a given type and then de
lare only individual stand-alone obje
ts of that
type, the
ompiler's ability to sele
t a time-e
ient alignment is primarily useful
only when you plan to
reate arrays of variables having the relevant (e
iently
aligned) type. If you de
lare or use arrays of variables of an e
iently-aligned
type, then it is likely that your program will also be doing pointer arithmeti
(or
subs
ripting, whi
h amounts to the same thing) on pointers to the relevant type,
and the
ode that the
ompiler generates for these pointer arithmeti
operations
will often be more e
ient for e
iently-aligned types than for other types.
The aligned attribute
an only in
rease the alignment; but you
an de
rease
it by spe
ifying pa
ked as well. See below.
Note that the ee
tiveness of aligned attributes may be limited by inherent
limitations in your linker. On many systems, the linker is only able to arrange
for variables to be aligned up to a
ertain maximum alignment. (For some
linkers, the maximum supported alignment may be very very small.) If your
linker is only able to align variables up to a maximum of 8 byte alignment, then
spe
ifying aligned(16) in an __attribute__ will still only provide you with
8 byte alignment. See your linker do
umentation for further information.
This attribute, atta
hed to stru
t or union type denition, spe
ies that ea
h
member of the stru
ture or union is pla
ed to minimize the memory required.
When atta
hed to an enum denition, it indi
ates that the smallest integral type
should be used.
Spe
ifying this attribute for stru
t and union types is equivalent to spe
ifying
the pa
ked attribute on ea
h of the stru
ture or union members. Spe
ifying
240
You may only spe
ify this attribute on the denition of a enum, stru
t or union,
not on a typedef whi
h does not also dene the enumerated type, stru
ture or
union.
transparent_union
This attribute, atta
hed to a union type denition, indi
ates that any fun
tion
parameter having that union type
auses
alls to that fun
tion to be treated in
a spe
ial way.
First, the argument
orresponding to a transparent union type
an be of any
type in the union; no
ast is required. Also, if the union
ontains a pointer type,
the
orresponding argument
an be a null pointer
onstant or a void pointer
expression; and if the union
ontains a void pointer type, the
orresponding
argument
an be any pointer expression. If the union member type is a pointer,
qualiers like
onst on the referen
ed type must be respe
ted, just as with
normal pointer
onversions.
Se
ond, the argument is passed to the fun
tion using the
alling
onventions of
the rst member of the transparent union, not the
alling
onventions of the
union itself. All members of the union must have the same ma
hine representation; this is ne
essary for this argument passing to work properly.
Transparent unions are designed for library fun
tions that have multiple interfa
es for
ompatibility reasons. For example, suppose the wait fun
tion must
a
ept either a value of type int * to
omply with Posix, or a value of type
union wait * to
omply with the 4.1BSD interfa
e. If wait's parameter were
void *, wait would a
ept both kinds of arguments, but it would also a
ept
any other pointer type and this would make argument type
he
king less useful.
Instead, <sys/wait.h> might dene the interfa
e as follows:
typedef union
{
int *__ip;
union wait *__up;
} wait_status_ptr_t __attribute__ ((__transparent_union__));
pid_t wait (wait_status_ptr_t);
241
unused
When atta
hed to a type (in
luding a union or a stru
t), this attribute means
that variables of that type are meant to appear possibly unused. GCC will not
produ
e a warning for any variables of that type, even if the variable appears to
do nothing. This is often the
ase with lo
k or thread
lasses, whi
h are usually
dened and then not referen
ed, but
ontain
onstru
tors and destru
tors that
have nontrivial bookkeeping fun
tions.
depre ated
The depre
ated attribute results in a warning if the type is used anywhere in
the sour
e le. This is useful when identifying types that are expe
ted to be
removed in a future version of a program. If possible, the warning also in
ludes
the lo
ation of the de
laration of the depre
ated type, to enable users to easily
nd further information about why the type is depre
ated, or what they should
do instead. Note that the warnings only o
ur for uses and then only if the type
is being applied to an identier that itself is not being de
lared as depre
ated.
typedef int T1 __attribute__ ((depre
ated));
T1 x;
typedef T1 T2;
T2 y;
typedef T1 T3 __attribute__ ((depre
ated));
T3 z __attribute__ ((depre
ated));
A
esses to obje
ts with types with this attribute are not subje
ted to typebased alias analysis, but are instead assumed to be able to alias any other
type of obje
ts, just like the
har type. See `-fstri
t-aliasing' for more
information on aliasing issues.
Example of use:
typedef short __attribute__((__may_alias__)) short_a;
int
main (void)
{
242
int a = 0x12345678;
short_a *b = (short_a *) &a;
b[1 = 0;
if (a == 0x12345678)
abort();
}
exit(0);
If you repla
ed short_a with short in the variable de
laration, the above program would abort when
ompiled with `-fstri
t-aliasing', whi
h is on by
default at `-O2' or above in re
ent GCC versions.
On those ARM targets that support dllimport (su
h as Symbian OS), you
an
use the notshared attribute to indi
ate that the virtual table and other similar
data for a
lass should not be exported from a DLL. For example:
lass __de
lspe
(notshared) C {
publi
:
__de
lspe
(dllimport) C();
virtual void f();
}
__de
lspe
(dllexport)
C::C() {}
In this
ode, C::C is exported from the
urrent DLL, but the virtual table for
C is not exported. (You
an use __attribute__ instead of __de
lspe
if you
prefer, but most Symbian OS
ode uses __de
lspe
.)
Two attributes are
urrently dened for i386
ongurations: ms_stru
t and
g
_stru
t
ms_stru
t
g
_stru
t
If pa
ked is used on a stru
ture, or if bit-elds are used it may be that the
Mi
rosoft ABI pa
ks them dierently than GCC would normally pa
k them.
Parti
ularly when moving pa
ked data between fun
tions
ompiled with GCC
and the native Mi
rosoft
ompiler (either via fun
tion
all or as data in a le),
it may be ne
essary to a
ess either format.
Currently `-m[no-ms-bitfields' is provided for the Mi
rosoft Windows X86
ompilers to mat
h the native Mi
rosoft
ompiler.
To spe
ify multiple attributes, separate them by
ommas within the double parentheses:
for example, `__attribute__ ((aligned (16), pa
ked))'.
243
overhead; in addition, if any of the a
tual argument values are
onstant, their known values
may permit simpli
ations at
ompile time so that not all of the inline fun
tion's
ode needs
to be in
luded. The ee
t on
ode size is less predi
table; obje
t
ode may be larger or
smaller with fun
tion inlining, depending on the parti
ular
ase. Inlining of fun
tions is an
optimization and it really \works" only in optimizing
ompilation. If you don't use `-O', no
fun
tion is really inline.
Inline fun
tions are in
luded in the ISO C99 standard, but there are
urrently substantial
dieren
es between what GCC implements and what the ISO C99 standard requires.
To de
lare a fun
tion inline, use the inline keyword in its de
laration, like this:
inline int
in
(int *a)
{
(*a)++;
}
(If you are writing a header le to be in
luded in ISO C programs, write __inline__
instead of inline. See Se
tion 5.38 [Alternate Keywords, page 268.) You
an also make
all \simple enough" fun
tions inline with the option `-finline-fun
tions'.
Note that
ertain usages in a fun
tion denition
an make it unsuitable for inline substitution. Among these usages are: use of varargs, use of allo
a, use of variable sized data
types (see Se
tion 5.13 [Variable Length, page 211), use of
omputed goto (see Se
tion 5.3
[Labels as Values, page 203), use of nonlo
al goto, and nested fun
tions (see Se
tion 5.4
[Nested Fun
tions, page 204). Using `-Winline' will warn when a fun
tion marked inline
ould not be substituted, and will give the reason for the failure.
Note that in C and Obje
tive-C, unlike C++, the inline keyword does not ae
t the
linkage of the fun
tion.
GCC automati
ally inlines member fun
tions dened within the
lass body of C++
programs even if they are not expli
itly de
lared inline. (You
an override this with
`-fno-default-inline'; see Se
tion 3.5 [Options Controlling C++ Diale
t, page 24.)
When a fun
tion is both inline and stati
, if all
alls to the fun
tion are integrated
into the
aller, and the fun
tion's address is never used, then the fun
tion's own assembler
ode is never referen
ed. In this
ase, GCC does not a
tually output assembler
ode for
the fun
tion, unless you spe
ify the option `-fkeep-inline-fun
tions'. Some
alls
annot
be integrated for various reasons (in parti
ular,
alls that pre
ede the fun
tion's denition
annot be integrated, and neither
an re
ursive
alls within the denition). If there is a
nonintegrated
all, then the fun
tion is
ompiled to assembler
ode as usual. The fun
tion
must also be
ompiled as usual if the program refers to its address, be
ause that
an't be
inlined.
When an inline fun
tion is not stati
, then the
ompiler must assume that there may be
alls from other sour
e les; sin
e a global symbol
an be dened only on
e in any program,
the fun
tion must not be dened in the other sour
e les, so the
alls therein
annot be
integrated. Therefore, a non-stati
inline fun
tion is always
ompiled on its own in the
usual fashion.
If you spe
ify both inline and extern in the fun
tion denition, then the denition is
used only for inlining. In no
ase is the fun
tion
ompiled on its own, not even if you refer
to its address expli
itly. Su
h an address be
omes an external referen
e, as if you had only
de
lared the fun
tion, and had not dened it.
244
This
ombination of inline and extern has almost the ee
t of a ma
ro. The way to
use it is to put a fun
tion denition in a header le with these keywords, and put another
opy of the denition (la
king inline and extern) in a library le. The denition in the
header le will
ause most
alls to the fun
tion to be inlined. If any uses of the fun
tion
remain, they will refer to the single
opy in the library.
Sin
e GCC eventually will implement ISO C99 semanti
s for inline fun
tions, it is best
to use stati
inline only to guarantee
ompatibility. (The existing semanti
s will remain
available when `-std=gnu89' is spe
ied, but eventually the default will be `-std=gnu99'
and that will implement the C99 semanti
s, though it does not do so yet.)
GCC does not inline any fun
tions when not optimizing unless you spe
ify the
`always_inline' attribute for the fun
tion, like this:
/* Prototype. */
inline void foo (
onst
har) __attribute__((always_inline));
Here angle is the C expression for the input operand while result is that of the output
operand. Ea
h has `"f"' as its operand
onstraint, saying that a
oating point register
is required. The `=' in `=f' indi
ates that the operand is an output; all output operands'
onstraints must use `='. The
onstraints use the same language used in the ma
hine
des
ription (see Se
tion 5.35 [Constraints, page 250).
Ea
h operand is des
ribed by an operand-
onstraint string followed by the C expression
in parentheses. A
olon separates the assembler template from the rst output operand and
another separates the last output operand from the rst input, if any. Commas separate
the operands within ea
h group. The total number of operands is
urrently limited to 30;
this limitation may be lifted in some future version of GCC.
If there are no output operands but there are input operands, you must pla
e two
onse
utive
olons surrounding the pla
e where the output operands would go.
As of GCC version 3.1, it is also possible to spe
ify input and output operands using
symboli
names whi
h
an be referen
ed within the assembler
ode. These names are
spe
ied inside square bra
kets pre
eding the
onstraint string, and
an be referen
ed inside
the assembler
ode using %[name instead of a per
entage sign followed by the operand
number. Using named operands the above example
ould look like:
asm ("fsinx %[angle,%[output"
: [output "=f" (result)
: [angle "f" (angle));
Note that the symboli
operand names have no relation whatsoever to other C identiers.
You may use any name you like, even those of existing C symbols, but you must ensure
that no two operands within the same assembler
onstru
t use the same symboli
name.
245
Output operand expressions must be lvalues; the
ompiler
an
he
k this. The input
operands need not be lvalues. The
ompiler
annot
he
k whether the operands have data
types that are reasonable for the instru
tion being exe
uted. It does not parse the assembler
instru
tion template and does not know what it means or even whether it is valid assembler
input. The extended asm feature is most often used for ma
hine instru
tions the
ompiler
itself does not know exist. If the output expression
annot be dire
tly addressed (for example, it is a bit-eld), your
onstraint must allow a register. In that
ase, GCC will use the
register as the output of the asm, and then store that register into the output.
The ordinary output operands must be write-only; GCC will assume that the values in
these operands before the instru
tion are dead and need not be generated. Extended asm
supports input-output or read-write operands. Use the
onstraint
hara
ter `+' to indi
ate
su
h an operand and list it with the output operands. You should only use read-write
operands when the
onstraints for the operand (or the operand in whi
h only some of the
bits are to be
hanged) allow a register.
You may, as an alternative, logi
ally split its fun
tion into two separate operands, one
input operand and one write-only output operand. The
onne
tion between them is expressed by
onstraints whi
h say they need to be in the same lo
ation when the instru
tion
exe
utes. You
an use the same C expression for both operands, or dierent expressions.
For example, here we write the (
titious) `
ombine' instru
tion with bar as its read-only
sour
e operand and foo as its read-write destination:
asm ("
ombine %2,%0" : "=r" (foo) : "0" (foo), "g" (bar));
The
onstraint `"0"' for operand 1 says that it must o
upy the same lo
ation as operand 0.
A number in
onstraint is allowed only in an input operand and it must refer to an output
operand.
Only a number in the
onstraint
an guarantee that one operand will be in the same pla
e
as another. The mere fa
t that foo is the value of both operands is not enough to guarantee
that they will be in the same pla
e in the generated assembler
ode. The following would
not work reliably:
asm ("
ombine %2,%0" : "=r" (foo) : "r" (foo), "g" (bar));
Various optimizations or reloading
ould
ause operands 0 and 1 to be in dierent registers; GCC knows no reason not to do so. For example, the
ompiler might nd a
opy of
the value of foo in one register and use it for operand 1, but generate the output operand
0 in a dierent register (
opying it afterward to foo's own address). Of
ourse, sin
e the
register for operand 1 is not even mentioned in the assembler
ode, the result will not work,
but GCC
an't tell that.
As of GCC version 3.1, one may write [name instead of the operand number for a
mat
hing
onstraint. For example:
asm ("
moveq %1,%2,%[result"
: [result "=r"(result)
: "r" (test), "r"(new), "[result"(old));
Sometimes you need to make an asm operand be a spe
i
register, but there's no mat
hing
onstraint letter for that register by itself. To for
e the operand into that register, use a lo
al
variable for the operand and spe
ify the register in the variable de
laration. See Se
tion 5.37
[Expli
it Reg Vars, page 266. Then for the asm operand, use any register
onstraint letter
that mat
hes the register:
246
("r0") = ...;
("r1") = ...;
asm ("r0");
(result) : "0" (p1), "r" (p2));
In the above example, beware that a register that is
all-
lobbered by the target ABI will
be overwritten by any fun
tion
all in the assignment, in
luding library
alls for arithmeti
operators. Assuming it is a
all-
lobbered register, this may happen to r0 above by the
assignment to p2. If you have to use su
h a register, use temporary variables for expressions
between the register assignment and use:
int t1 = ...;
register int *p1 asm
register int *p2 asm
register int *result
asm ("sysint" : "=r"
("r0") = ...;
("r1") = t1;
asm ("r0");
(result) : "0" (p1), "r" (p2));
Some instru
tions
lobber spe
i
hard registers. To des
ribe this, write a third
olon
after the input operands, followed by the names of the
lobbered hard registers (given as
strings). Here is a realisti
example for the VAX:
asm volatile ("mov
3 %0,%1,%2"
: /* no outputs */
: "g" (from), "g" (to), "g" (
ount)
: "r0", "r1", "r2", "r3", "r4", "r5");
You may not write a
lobber des
ription in a way that overlaps with an input or output
operand. For example, you may not have an operand des
ribing a register
lass with one
member if you mention that register in the
lobber list. Variables de
lared to live in spe
i
registers (see Se
tion 5.37 [Expli
it Reg Vars, page 266), and used as asm input or output
operands must have no part mentioned in the
lobber des
ription. There is no way for
you to spe
ify that an input operand is modied without also spe
ifying it as an output
operand. Note that if all the output operands you spe
ify are for this purpose (and hen
e
unused), you will then also need to spe
ify volatile for the asm
onstru
t, as des
ribed
below, to prevent GCC from deleting the asm statement as unused.
If you refer to a parti
ular hardware register from the assembler
ode, you will probably
have to list the register after the third
olon to tell the
ompiler the register's value is
modied. In some assemblers, the register names begin with `%'; to produ
e one `%' in the
assembler
ode, you must write `%%' in the input.
If your assembler instru
tion
an alter the
ondition
ode register, add `
' to the list
of
lobbered registers. GCC on some ma
hines represents the
ondition
odes as a spe
i
hardware register; `
' serves to name this register. On other ma
hines, the
ondition
ode
is handled dierently, and spe
ifying `
' has no ee
t. But it is valid no matter what the
ma
hine.
If your assembler instru
tions a
ess memory in an unpredi
table fashion, add `memory'
to the list of
lobbered registers. This will
ause GCC to not keep memory values
a
hed in
registers a
ross the assembler instru
tion and not optimize stores or loads to that memory.
You will also want to add the volatile keyword if the memory ae
ted is not listed in the
inputs or outputs of the asm, as the `memory'
lobber does not
ount as a side-ee
t of the
asm. If you know how large the a
essed memory is, you
an add it as input or output but
if this is not known, you should add `memory'. As an example, if you a
ess ten bytes of a
string, you
an use a memory input like:
247
Note that in the following example the memory input is ne
essary, otherwise GCC might
optimize the store to x away:
int foo ()
{
int x = 42;
int *y = &x;
int result;
asm ("magi
stuff a
essing an 'int' pointed to by '%1'"
"=&d" (r) : "a" (y), "m" (*y));
return result;
}
You
an put multiple assembler instru
tions together in a single asm template, separated
by the
hara
ters normally used in assembly
ode for the system. A
ombination that works
in most pla
es is a newline to break the line, plus a tab
hara
ter to move to the instru
tion eld (written as `\n\t'). Sometimes semi
olons
an be used, if the assembler allows
semi
olons as a line-breaking
hara
ter. Note that some assembler diale
ts use semi
olons
to start a
omment. The input operands are guaranteed not to use any of the
lobbered
registers, and neither will the output operands' addresses, so you
an read and write the
lobbered registers as many times as you like. Here is an example of multiple instru
tions
in a template; it assumes the subroutine _foo a
epts arguments in registers 9 and 10:
asm ("movl %0,r9\n\tmovl %1,r10\n\t
all _foo"
: /* no outputs */
: "g" (from), "g" (to)
: "r9", "r10");
Unless an output operand has the `&'
onstraint modier, GCC may allo
ate it in the same
register as an unrelated input operand, on the assumption the inputs are
onsumed before
the outputs are produ
ed. This assumption may be false if the assembler
ode a
tually
onsists of more than one instru
tion. In su
h a
ase, use `&' for ea
h output operand that
may not overlap an input. See Se
tion 5.35.3 [Modiers, page 253.
If you want to test the
ondition
ode produ
ed by an assembler instru
tion, you must
in
lude a bran
h and a label in the asm
onstru
t, as follows:
asm ("
lr %0\n\tfrob %1\n\tbeq 0f\n\tmov #1,%0\n0:"
: "g" (result)
: "g" (input));
This assumes your assembler supports lo
al labels, as the GNU assembler and most Unix
assemblers do.
Speaking of labels, jumps from one asm to another are not supported. The
ompiler's
optimizers do not know about these jumps, and therefore they
annot take a
ount of them
when de
iding how to optimize.
Usually the most
onvenient way to use these asm instru
tions is to en
apsulate them in
ma
ros that look like fun
tions. For example,
#define sin(x)
\
({ double __value, __arg = (x);
\
asm ("fsinx %1,%0": "=f" (__value): "f" (__arg));
__value; })
Here the variable __arg is used to make sure that the instru
tion operates on a proper
double value, and to a
ept only those arguments x whi
h
an
onvert automati
ally to a
double.
248
Another way to make sure the instru
tion operates on the
orre
t data type is to use
a
ast in the asm. This is dierent from using a variable __arg in that it
onverts more
dierent types. For example, if the desired type were int,
asting the argument to int
would a
ept a pointer with no
omplaint, while assigning the argument to an int variable
named __arg would warn about using a pointer unless the
aller expli
itly
asts it.
If an asm has output operands, GCC assumes for optimization purposes the instru
tion
has no side ee
ts ex
ept to
hange the output operands. This does not mean instru
tions
with a side ee
t
annot be used, but you must be
areful, be
ause the
ompiler may
eliminate them if the output operands aren't used, or move them out of loops, or repla
e
two with one if they
onstitute a
ommon subexpression. Also, if your instru
tion does
have a side ee
t on a variable that otherwise appears not to
hange, the old value of the
variable may be reused later if it happens to be found in a register.
You
an prevent an asm instru
tion from being deleted by writing the keyword volatile
after the asm. For example:
#define get_and_set_priority(new)
({ int __old;
asm volatile ("get_and_set_priority %0, %1"
: "=g" (__old) : "g" (new));
__old; })
\
\
\
\
The volatile keyword indi
ates that the instru
tion has important side-ee
ts. GCC will
not delete a volatile asm if it is rea
hable. (The instru
tion
an still be deleted if GCC
an prove that
ontrol-
ow will never rea
h the lo
ation of the instru
tion.) Note that
even a volatile asm instru
tion
an be moved relative to other
ode, in
luding a
ross jump
instru
tions. For example, on many targets there is a system register whi
h
an be set to
ontrol the rounding mode of
oating point operations. You might try setting it with a
volatile asm, like this PowerPC example:
asm volatile("mtfsf 255,%0" : : "f" (fpenv));
sum = x + y;
This will not work reliably, as the
ompiler may move the addition ba
k before the volatile
asm. To make it work you need to add an arti
ial dependen
y to the asm referen
ing a
variable in the
ode you don't want moved, for example:
asm volatile ("mtfsf 255,%1" : "=X"(sum): "f"(fpenv));
sum = x + y;
Similarly, you
an't expe
t a sequen
e of volatile asm instru
tions to remain perfe
tly
onse
utive. If you want
onse
utive output, use a single asm. Also, GCC will perform
some optimizations a
ross a volatile asm instru
tion; GCC does not \forget everything"
when it en
ounters a volatile asm instru
tion the way some other
ompilers do.
An asm instru
tion without any output operands will be treated identi
ally to a volatile
asm instru
tion.
It is a natural idea to look for a way to give a
ess to the
ondition
ode left by the
assembler instru
tion. However, when we attempted to implement this, we found no way
to make it work reliably. The problem is that output operands might need reloading,
whi
h would result in additional following \store" instru
tions. On most ma
hines, these
instru
tions would alter the
ondition
ode before there was time to test it. This problem
doesn't arise for ordinary \test" and \
ompare" instru
tions be
ause they don't have any
output operands.
249
For reasons similar to those des
ribed above, it is not possible to give an assembler
instru
tion a
ess to the
ondition
ode left by previous instru
tions.
If you are writing a header le that should be in
ludable in ISO C programs, write
__asm__ instead of asm. See Se
tion 5.38 [Alternate Keywords, page 268.
Some targets require that GCC tra
k the size of ea
h instru
tion used in order to generate
orre
t
ode. Be
ause the nal length of an asm is only known by the assembler, GCC
must make an estimate as to how big it will be. The estimate is formed by
ounting the
number of statements in the pattern of the asm and multiplying that by the length of
the longest instru
tion on that pro
essor. Statements in the asm are identied by newline
hara
ters and whatever statement separator
hara
ters are supported by the assembler; on
most pro
essors this is the `;'
hara
ter.
Normally, GCC's estimate is perfe
tly adequate to ensure that
orre
t
ode is generated,
but it is possible to
onfuse the
ompiler if you use pseudo instru
tions or assembler ma
ros
that expand into multiple real instru
tions or if you use assembler dire
tives that expand to
more spa
e in the obje
t le than would be needed for a single instru
tion. If this happens
then the assembler will produ
e a diagnosti
saying that a label is unrea
hable.
There are several rules on the usage of sta
k-like regs in asm operands insns. These rules
apply only to the operands that are sta
k-like regs:
1. Given a set of input regs that die in an asm operands, it is ne
essary to know whi
h
are impli
itly popped by the asm, and whi
h must be expli
itly popped by g
.
An input reg that is impli
itly popped by the asm must be expli
itly
lobbered, unless
it is
onstrained to mat
h an output operand.
2. For any input reg that is impli
itly popped by an asm, it is ne
essary to know how to
adjust the sta
k to
ompensate for the pop. If any non-popped input is
loser to the
top of the reg-sta
k than the impli
itly popped reg, it would not be possible to know
what the sta
k looked like|it's not
lear how the rest of the sta
k \slides up".
All impli
itly popped input regs must be
loser to the top of the reg-sta
k than any
input that is not impli
itly popped.
It is possible that if an input dies in an insn, reload might use the input reg for an
output reload. Consider this example:
asm ("foo" : "=t" (a) : "f" (b));
This asm says that input B is not popped by the asm, and that the asm pushes a result
onto the reg-sta
k, i.e., the sta
k is one deeper after the asm than it was before. But,
it is possible that reload will think that it
an use the same reg for both the input and
the output, if input B dies in this insn.
If any input operand uses the f
onstraint, all output reg
onstraints must use the &
early
lobber.
The asm above would be written as
asm ("foo" : "=&t" (a) : "f" (b));
250
3. Some operands need to be in parti
ular pla
es on the sta
k. All output operands fall in
this
ategory|there is no other way to know whi
h regs the outputs appear in unless
the user indi
ates this in the
onstraints.
Output operands must spe
i
ally indi
ate whi
h reg an output appears in after an
asm. =f is not allowed: the operand
onstraints must sele
t a
lass with a single reg.
4. Output operands may not be \inserted" between existing sta
k regs. Sin
e no 387 op
ode uses a read/write operand, all output operands are dead before the asm operands,
and are pushed by the asm operands. It makes no sense to push anywhere but the top
of the reg-sta
k.
Output operands must start at the top of the reg-sta
k: output operands may not
\skip" a reg.
5. Some asm statements may need extra sta
k spa
e for internal
al
ulations. This
an
be guaranteed by
lobbering sta
k registers unrelated to the inputs and outputs.
Here are a
ouple of reasonable asms to want to write. This asm takes one input, whi
h
is internally popped, and produ
es two outputs.
asm ("fsin
os" : "=t" (
os), "=u" (sin) : "0" (inp));
This asm takes two inputs, whi
h are popped by the fyl2xp1 op
ode, and repla
es them
with one output. The user must
ode the st(1)
lobber for reg-sta
k.
to know that
fyl2xp1 pops both inputs.
asm ("fyl2xp1" : "=t" (result) : "0" (x), "u" (y) : "st(1)");
The simplest kind of
onstraint is a string full of letters, ea
h of whi
h des
ribes one kind
of operand that is permitted. Here are the letters that are allowed:
whitespa
e
Whitespa
e
hara
ters are ignored and
an be inserted at any position ex
ept
the rst. This enables ea
h alternative for dierent operands to be visually
aligned in the ma
hine des
ription even if they have dierent number of
onstraints and modiers.
`m'
A memory operand is allowed, with any kind of address that the ma
hine supports in general.
`o'
A memory operand is allowed, but only if the address is osettable. This
means that adding a small integer (a
tually, the width in bytes of the operand,
as determined by its ma
hine mode) may be added to the address and the result
is also a valid memory address.
For example, an address whi
h is
onstant is osettable; so is an address that
is the sum of a register and a
onstant (as long as a slightly larger
onstant
251
is also within the range of address-osets supported by the ma
hine); but an
autoin
rement or autode
rement address is not osettable. More
ompli
ated
indire
t/indexed addresses may or may not be osettable depending on the
other addressing modes that the ma
hine supports.
Note that in an output operand whi
h
an be mat
hed by another operand,
the
onstraint letter `o' is valid only when a
ompanied by both `<' (if the
target ma
hine has prede
rement addressing) and `>' (if the target ma
hine has
prein
rement addressing).
`V'
A memory operand that is not osettable. In other words, anything that would
t the `m'
onstraint but not the `o'
onstraint.
`<'
`>'
`r'
`i'
An immediate integer operand (one with
onstant value) is allowed. This in
ludes symboli
onstants whose values will be known only at assembly time or
later.
`n'
`F'
`G', `H'
`s'
252
is be
ause the load into the register
an be done with a `moveq' instru
tion. We
arrange for this to happen by dening the letter `K' to mean \any integer outside
the range 128 to 127", and then spe
ifying `Ks' in the operand
onstraints.
`g'
Any register, memory or immediate integer operand is allowed, ex
ept for registers that are not general registers.
`X'
Any operand whatsoever is allowed.
`0', `1', `2', . . . `9'
An operand that mat
hes the spe
ied operand number is allowed. If a digit
is used together with letters within the same alternative, the digit should
ome
last.
This number is allowed to be more than a single digit. If multiple digits are en
ountered
onse
utively, they are interpreted as a single de
imal integer. There
is s
ant
han
e for ambiguity, sin
e to-date it has never been desirable that
`10' be interpreted as mat
hing either operand 1 or operand 0. Should this be
desired, one
an use multiple alternatives instead.
This is
alled a mat
hing
onstraint and what it really means is that the assembler has only a single operand that lls two roles whi
h asm distinguishes. For
example, an add instru
tion uses two input operands and an output operand,
but on most CISC ma
hines an add instru
tion really has only two operands,
one of them an input-output operand:
addl #35,r12
Mat
hing
onstraints are used in these
ir
umstan
es. More pre
isely, the two
operands that mat
h must in
lude one input-only operand and one output-only
operand. Moreover, the digit must be a smaller number than the number of
the operand that uses it in the
onstraint.
`p'
An operand that is a valid memory address is allowed. This is for \load address"
and \push address" instru
tions.
`p' in the
onstraint must be a
ompanied by address_operand as the predi
ate
in the mat
h_operand. This predi
ate interprets the mode spe
ied in the
mat
h_operand as the mode of the memory referen
e for whi
h the address
would be valid.
other-letters
Other letters
an be dened in ma
hine-dependent fashion to stand for parti
ular
lasses of registers or other arbitrary operand types. `d', `a' and `f'
are dened on the 68000/68020 to stand for data, address and
oating point
registers.
Sometimes a single instru
tion has multiple alternative sets of possible operands. For example, on the 68000, a logi
al-or instru
tion
an
ombine register or an immediate value
into memory, or it
an
ombine any kind of operand into a register; but it
annot
ombine
one memory lo
ation into another.
These
onstraints are represented as multiple alternatives. An alternative
an be des
ribed by a series of letters for ea
h operand. The overall
onstraint for an operand is
253
made from the letters for this operand from the rst alternative, a
omma, the letters for
this operand from the se
ond alternative, a
omma, and so on until the last alternative.
If all the operands t any one alternative, the instru
tion is valid. Otherwise, for ea
h
alternative, the
ompiler
ounts how many instru
tions must be added to
opy the operands
so that that alternative applies. The alternative requiring the least
opying is
hosen. If
two alternatives need the same amount of
opying, the one that
omes rst is
hosen. These
hoi
es
an be altered with the `?' and `!'
hara
ters:
?
Disparage slightly the alternative that the `?' appears in, as a
hoi
e when no
alternative applies exa
tly. The
ompiler regards this alternative as one unit
more
ostly for ea
h `?' that appears in it.
!
Disparage severely the alternative that the `!' appears in. This alternative
an
still be used if it ts without reloading, but if reloading is needed, some other
alternative will be used.
254
`#'
Says that all following
hara
ters, up to the next
omma, are to be ignored as
a
onstraint. They are signi
ant only for
hoosing register preferen
es.
`*'
Says that the following
hara
ter should be ignored when
hoosing register
preferen
es. `*' has no ee
t on the meaning of the
onstraint as a
onstraint,
and no ee
t on reloading.
Whenever possible, you should use the general-purpose
onstraint letters in asm arguments,
sin
e they will
onvey meaning more readily to people reading your
ode. Failing that, use
the
onstraint letters that usually have very similar meanings a
ross ar
hite
tures. The
most
ommonly used
onstraints are `m' and `r' (for memory and general-purpose registers
respe
tively; see Se
tion 5.35.1 [Simple Constraints, page 250), and `I', usually the letter
indi
ating the most
ommon immediate-
onstant format.
For ea
h ma
hine ar
hite
ture, the `
onfig/ma
hine /ma
hine.h' le denes additional
onstraints. These
onstraints are used by the
ompiler itself for instru
tion generation, as
well as for asm statements; therefore, some of the
onstraints are not parti
ularly interesting
for asm. The
onstraints are dened through these ma
ros:
REG_CLASS_FROM_LETTER
CONST_OK_FOR_LETTER_P
Immediate
onstant
onstraints, for non-
oating point
onstants of word size
or smaller pre
ision (usually upper
ase).
CONST_DOUBLE_OK_FOR_LETTER_P
Immediate onstant onstraints, for all oating point onstants and for onstants of greater than word size pre ision (usually upper ase).
EXTRA_CONSTRAINT
Spe
ial
ases of registers or memory. This ma
ro is not required, and is only
dened for some ma
hines.
Inspe
ting these ma
ro denitions in the
ompiler sour
e for your ma
hine is the best
way to be
ertain you have the right
onstraints. However, here is a summary of the
ma
hine-dependent
onstraints available on some parti
ular ma
hines.
ARM family|`arm.h'
f
Floating-point register
One of the
oating-point
onstants 0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0 or
10.0
255
Uv
A memory referen e suitable for VFP load/store insns (reg+ onstant oset)
Uy
Uq
e
b
Temporary register r0
y
z
K
L
M
Constant integer 0
Constant that ts in 8 bits
Constant integer 1
Constant integer 8, 16, or 24
Constant integer 1
256
Ve tor register
`MQ' register
`CTR' register
`LINK' register
Unsigned 16-bit
onstant shifted left 16 bits (use `L' instead for
SImode
onstants)
Exa t power of 2
Zero
Intel 386|`i386.h'
q
f
t
u
a
b
257
`d' register
`di' register
`si' register
`xmm' SSE register
MMX register
Constant in range 0 to 31 (for 32-bit shifts)
Constant in range 0 to 63 (for 64-bit shifts)
`0xff'
D
S
x
y
I
J
K
L
M
N
Z
Intel IA-64|`ia64.h'
a
b
`0xffff'
0, 1, 2, or 3 (shifts for lea instru
tion)
Constant in range 0 to 255 (for out instru
tion)
Constant in range 0 to 0xffffffff or symboli
referen
e known to
t spe
ied range. (for using immediates in zero extending 32-bit
to 64-bit x86-64 instru
tions)
Constant in range 2147483648 to 2147483647 or symboli
referen
e known to t spe
ied range. (for using immediates in 64-bit
x86-64 instru
tions)
Standard 80387
oating point
onstant
General register r0 to r3 for addl instru
tion
Bran
h register
258
Floating-point register
9-bit signed integer onstant for load and store postin rements
FRV|`frv.h'
a
t
u
v
w
x
z
A
B
C
G
I
J
L
M
N
O
P
IP2K|`ip2k.h'
a
f
j
k
b
y
z
q
d
u
R
259
260
Integer 1
Integer 1
Zero
MIPS|`mips.h'
d
f
h
`Lo' register
y
z
I
Zero
Zero-extended 16-bit
onstant (for logi
instru
tions)
O
P
G
Q
R
S
261
Motorola 680x0|`m68k.h'
a
Address register
Data register
f
68881
oating-point register, if available
I
Integer in the range 1 to 8
J
16-bit signed number
K
Signed number whose magnitude is greater than 0x80
L
Integer in the range 8 to 1
M
Signed number whose magnitude is greater than 0x100
G
Floating point
onstant that is not a 68881
onstant
Motorola 68HC11 & 68HC12 families|`m68h
11.h'
a
Register `a'
b
Register `b'
d
Register `d'
q
An 8-bit register
t
Temporary soft register .tmp
u
A soft register .d1 to .d31
w
Sta
k pointer register
x
Register `x'
y
Register `y'
z
Pseudo register `z' (repla
ed by `x' or `y' at the end)
A
An address register: x, y or z
B
An address register: x or y
D
Register pair (x:d) to form a 32-bit value
L
Constants in the range 65536 to 65535
M
Constants whose 16-bit low part is zero
N
Constant integer 1 or 1
O
Constant integer 16
P
Constants in the range 8 to 2
SPARC|`spar
.h'
f
Floating-point register on the SPARC-V8 ar
hite
ture and lower
oating-point register on the SPARC-V9 ar
hite
ture.
e
Floating-point register. It is equivalent to `f' on the SPARC-V8
ar
hite
ture and
ontains both lower and upper
oating-point registers on the SPARC-V9 ar
hite
ture.
d
262
Floating-point register. It is only valid on the SPARC-V9 ar hite ture when the Visual Instru tion Set is available.
Zero
Same as `K', ex
ept that it veries that bits that are not in the
lower 32-bit range are all zero. Must be used instead of `K' for
modes wider than SImode
Floating-point zero
Even register
Ve tor zero
TMS320C3x/C4x|`
4x.h'
a
Auxiliary (address) register (ar0-ar7)
b
263
(0..4095)
(-524288..524287)
264
Q
R
0..9:
H,Q:
D,S,H:
0,F:
Memory referen e without index register but with long displa ement.
U
W
Xstormy16|`stormy16.h'
a
Register r0.
b
Register r1.
Register r2.
Register r8.
Registers r0 through r7.
e
y
J
K
L
265
The onstant 0.
Xtensa|`xtensa.h'
a
This spe
ies that the name to be used for the variable foo in the assembler
ode should
be `myfoo' rather than the usual `_foo'.
On systems where an unders
ore is normally prepended to the name of a C fun
tion or
variable, this feature allows you to dene names for the linker that do not start with an
unders
ore.
It does not make sense to use this feature with a non-stati
lo
al variable sin
e su
h
variables do not have assembler names. If you are trying to put the variable in a parti
ular
register, see Se
tion 5.37 [Expli
it Reg Vars, page 266. GCC presently a
epts su
h
ode
with a warning, but will probably be
hanged to issue an error, rather than a warning, in
the future.
You
annot use asm in this way in a fun
tion denition ; but you
an get the same ee
t
by writing a de
laration for the fun
tion before its denition and putting asm there, like
this:
extern fun
() asm ("FUNC");
fun
(x, y)
int x, y;
/* . . . */
266
It is up to you to make sure that the assembler names you
hoose do not
on
i
t with
any other assembler symbols. Also, you must not use a register name; that would produ
e
ompletely invalid assembler
ode. GCC does not as yet have the ability to store stati
variables in registers. Perhaps that will be added.
Here a5 is the name of the register whi
h should be used. Choose a register whi
h is
normally saved and restored by fun
tion
alls on your ma
hine, so that library routines will
not
lobber it.
Naturally the register name is
pu-dependent, so you would need to
onditionalize your
program a
ording to
pu type. The register a5 would be a good
hoi
e on a 68000 for a
variable of pointer type. On ma
hines with register windows, be sure to
hoose a \global"
register that is not ae
ted magi
ally by the fun
tion
all me
hanism.
In addition, operating systems on one type of
pu may dier in how they name the
registers; then you would need additional
onditionals. For example, some 68000 operating
systems
all this register %a5.
Eventually there may be a way of asking the
ompiler to
hoose a register automati
ally,
but rst we need to gure out how it should
hoose and how to enable you to guide the
hoi
e. No solution is evident.
Dening a global register variable in a
ertain register reserves that register entirely for
this use, at least within the
urrent
ompilation. The register will not be allo
ated for any
other purpose in the fun
tions in the
urrent
ompilation. The register will not be saved
and restored by these fun
tions. Stores into this register are never deleted even if they
would appear to be dead, but referen
es may be deleted or moved or simplied.
267
It is not safe to a
ess the global register variables from signal handlers, or from more
than one thread of
ontrol, be
ause the system library routines may temporarily use the
register for other things (unless you re
ompile them spe
ially for the task at hand).
It is not safe for one fun
tion that uses a global register variable to
all another su
h
fun
tion foo by way of a third fun
tion lose that was
ompiled without knowledge of this
variable (i.e. in a dierent sour
e le in whi
h the variable wasn't de
lared). This is be
ause
lose might save the register and put some other value there. For example, you
an't expe
t
a global register variable to be available in the
omparison-fun
tion that you pass to qsort,
sin
e qsort might have put something else in that register. (If you are prepared to re
ompile
qsort with the same global register variable, you
an solve this problem.)
If you want to re
ompile qsort or other sour
e les whi
h do not a
tually use your global
register variable, so that they will not use that register for any other purpose, then it su
es
to spe
ify the
ompiler option `-ffixed-reg '. You need not a
tually add a global register
de
laration to their sour
e
ode.
A fun
tion whi
h
an alter the value of a global register variable
annot safely be
alled
from a fun
tion
ompiled without this variable, be
ause it
ould
lobber the value the
aller
expe
ts to nd there on return. Therefore, the fun
tion whi
h is the entry point into the
part of the program that uses the global register variable must expli
itly save and restore
the value whi
h belongs to its
aller.
On most ma
hines, longjmp will restore to ea
h global register variable the value it had
at the time of the setjmp. On some ma
hines, however, longjmp will not
hange the value
of global register variables. To be portable, the fun
tion that
alled setjmp should make
other arrangements to save the values of the global register variables, and to restore them
in a longjmp. This way, the same thing will happen regardless of what longjmp does.
All global register variable de
larations must pre
ede all fun
tion denitions. If su
h a
de
laration
ould appear after fun
tion denitions, the de
laration would be too late to
prevent the register from being used for other purposes in the pre
eding fun
tions.
Global register variables may not have initial values, be
ause an exe
utable le has no
means to supply initial
ontents for a register.
On the SPARC, there are reports that g3 . . . g7 are suitable registers, but
ertain library
fun
tions, su
h as getwd, as well as the subroutines for division and remainder, modify g3
and g4. g1 and g2 are lo
al temporaries.
On the 68000, a2 . . . a5 should be suitable, as should d2 . . . d7. Of
ourse, it will not
do to use more than a few of those.
Here a5 is the name of the register whi
h should be used. Note that this is the same syntax
used for dening global register variables, but for a lo
al variable it would appear within a
fun
tion.
Naturally the register name is
pu-dependent, but this is not a problem, sin
e spe
i
registers are most often useful with expli
it assembler instru
tions (see Se
tion 5.34 [Extended Asm, page 244). Both of these things generally require that you
onditionalize your
program a
ording to
pu type.
268
In addition, operating systems on one type of
pu may dier in how they name the
registers; then you would need additional
onditionals. For example, some 68000 operating
systems
all this register %a5.
Dening su
h a register variable does not reserve the register; it remains available for
other uses in pla
es where
ow
ontrol determines the variable's value is not live.
This option does not guarantee that GCC will generate
ode that has this variable in the
register you spe
ify at all times. You may not
ode an expli
it referen
e to this register
in the assembler instru
tion template part of an asm statement and assume it will always
refer to this variable. However, using the variable as an asm operand guarantees that the
spe
ied register is used for the operand.
Stores into lo
al register variables may be deleted when they appear to be dead a
ording
to data
ow analysis. Referen
es to lo
al register variables may be deleted or moved or
simplied.
As for global register variables, it's re
ommended that you
hoose a register whi
h is
normally saved and restored by fun
tion
alls on your ma
hine, so that library routines
will not
lobber it. A
ommon pitfall is to initialize multiple
all-
lobbered registers with
arbitrary expressions, where a fun
tion
all or library
all for an arithmeti
operator will
overwrite a register value from a previous assignment, for example r0 below:
register int *p1 asm ("r0") = ...;
register int *p2 asm ("r1") = ...;
`-pedanti
' and other options
ause warnings for many GNU C extensions. You
an prevent su
h warnings within one expression by writing __extension__ before the expression.
__extension__ has no ee
t aside from this.
269
appeared, where fun
tion-name is the name of the lexi
ally-en
losing
fun
tion. This name is the unadorned name of the fun
tion.
__FUNCTION__ is another name for __fun
__. Older versions of GCC re
ognize only this
name. However, it is not standardized. For maximum portability, we re
ommend you use
__fun
__, but provide a fallba
k denition with the prepro
essor:
#if __STDC_VERSION__ < 199901L
# if __GNUC__ >= 2
# define __fun
__ __FUNCTION__
# else
# define __fun
__ "<unknown>"
# endif
#endif
extern "C" {
extern int printf (
har *, ...);
}
lass a {
publi
:
void sub (int i)
{
printf ("__FUNCTION__ = %s\n", __FUNCTION__);
printf ("__PRETTY_FUNCTION__ = %s\n", __PRETTY_FUNCTION__);
}
};
int
main (void)
270
a ax;
ax.sub (0);
return 0;
__FUNCTION__ = sub
__PRETTY_FUNCTION__ = void a::sub(int)
These identiers are not prepro
essor ma
ros. In GCC 3.3 and earlier, in C only, __
FUNCTION__ and __PRETTY_FUNCTION__ were treated as string literals; they
ould be used
to initialize
har arrays, and they
ould be
on
atenated with other string literals. GCC
3.4 and later treat them as variables, like __fun
__. In C++, __FUNCTION__ and __PRETTY_
FUNCTION__ have always been variables.
271
The int type spe
ies the base type, while the attribute spe
ies the ve
tor size for the
variable, measured in bytes. For example, the de
laration above
auses the
ompiler to set
the mode for the v4si type to be 16 bytes wide and divided into int sized units. For a
32-bit int this means a ve
tor of 4 units of 4 bytes, and the
orresponding mode of foo will
be V4SI.
The ve
tor_size attribute is only appli
able to integral and
oat s
alars, although
arrays, pointers, and fun
tion return values are allowed in
onjun
tion with this
onstru
t.
All the basi
integer types
an be used as base types, both as signed and as unsigned:
har, short, int, long, long long. In addition, float and double
an be used to build
oating-point ve
tor types.
Spe
ifying a
ombination that is not valid for the
urrent ar
hite
ture will
ause GCC to
synthesize the instru
tions using a narrower mode. For example, if you spe
ify a variable
of type V4SI and your ar
hite
ture does not allow for this spe
i
SIMD type, GCC will
produ
e
ode that uses 4 SIs.
The types dened in this manner
an be used with a subset of normal C operations.
Currently, GCC will allow using the following operators on these types: +, -, *, /, unary
minus, ^, |, &, ~.
The operations behave like C++ valarrays. Addition is dened as the addition of the
orresponding elements of the operands. For example, in the
ode below, ea
h of the 4
elements in a will be added to the
orresponding 4 elements in b and the resulting ve
tor
will be stored in
.
typedef int v4si __attribute__ ((ve
tor_size (16)));
v4si a, b,
;
= a + b;
Subtra
tion, multipli
ation, division, and the logi
al operations operate in a similar manner. Likewise, the result of using the unary minus or
omplement operators on a ve
tor type
is a ve
tor whose elements are the negative or
omplemented values of the
orresponding
elements in the operand.
You
an de
lare variables and use them in fun
tion
alls and returns, as well as in assignments and some
asts. You
an spe
ify a ve
tor type as a return type for a fun
tion.
Ve
tor types
an also be used as fun
tion arguments. It is possible to
ast from one ve
tor
type to another, provided they are of the same size (in fa
t, you
an also
ast ve
tors to
and from other datatypes of the same size).
You
annot operate between ve
tors of dierent lengths or dierent signedness without a
ast.
272
A port that supports hardware ve
tor operations, usually provides a set of built-in fun
tions that
an be used to operate on ve
tors. For example, a fun
tion to add two ve
tors
and multiply the result by a third
ould look like this:
v4si f (v4si a, v4si b, v4si
)
{
v4si tmp = __builtin_addv4si (a, b);
return __builtin_mulv4si (tmp,
);
}
5.43 Osetof
GCC implements for both C and C++ a synta
ti
extension to implement the offsetof
ma
ro.
primary:
"__builtin_offsetof" "(" typename "," offsetof_member_designator ")"
offsetof_member_designator:
identifier
| offsetof_member_designator "." identifier
| offsetof_member_designator "[" expr ""
is a suitable denition of the offsetof ma
ro. In C++, type may be dependent. In either
ase, member may
onsist of a single identier, or a sequen
e of member a
esses and array
referen
es.
273
The ISO C99 fun
tions _Exit, a
oshf, a
oshl, a
osh, asinhf, asinhl, asinh,
atanhf, atanhl, atanh,
absf,
absl,
abs,
a
osf,
a
oshf,
a
oshl,
a
osh,
a
osl,
a
os,
argf,
argl,
arg,
asinf,
asinhf,
asinhl,
asinh,
asinl,
asin,
atanf,
atanhf,
atanhl,
atanh,
atanl,
atan,
brtf,
brtl,
brt,
osf,
oshf,
oshl,
osh,
osl,
os,
expf,
expl,
exp,
imagf,
imagl,
imag,
onjf,
onjl,
onj,
opysignf,
opysignl,
opysign,
powf,
powl,
pow,
projf,
projl,
proj,
realf,
reall,
real,
sinf,
sinhf,
sinhl,
sinh,
sinl,
sin,
sqrtf,
sqrtl,
sqrt,
tanf,
tanhf,
tanhl,
tanh,
tanl,
tan, erf
f, erf
l,
erf
, erff, erfl, erf, exp2f, exp2l, exp2, expm1f, expm1l, expm1, fdimf, fdiml, fdim,
fmaf, fmal, fmaxf, fmaxl, fmax, fma, fminf, fminl, fmin, hypotf, hypotl, hypot,
ilogbf, ilogbl, ilogb, imaxabs, isblank, iswblank, lgammaf, lgammal, lgamma, llabs,
llrintf, llrintl, llrint, llroundf, llroundl, llround, log1pf, log1pl, log1p,
log2f, log2l, log2, logbf, logbl, logb, lrintf, lrintl, lrint, lroundf, lroundl,
lround, nearbyintf, nearbyintl, nearbyint, nextafterf, nextafterl, nextafter,
nexttowardf, nexttowardl, nexttoward, remainderf, remainderl, remainder, remquof,
remquol, remquo, rintf, rintl, rint, roundf, roundl, round, s
alblnf, s
alblnl,
s
albln, s
albnf, s
albnl, s
albn, snprintf, tgammaf, tgammal, tgamma, trun
f,
trun
l, trun
, vfs
anf, vs
anf, vsnprintf and vss
anf are handled as built-in
fun
tions ex
ept in stri
t ISO C90 mode (`-ansi' or `-std=
89').
There are also built-in versions of the ISO C99 fun
tions a
osf, a
osl, asinf, asinl,
atan2f, atan2l, atanf, atanl,
eilf,
eill,
osf,
oshf,
oshl,
osl, expf, expl,
fabsf, fabsl, floorf, floorl, fmodf, fmodl, frexpf, frexpl, ldexpf, ldexpl, log10f,
log10l, logf, logl, modfl, modf, powf, powl, sinf, sinhf, sinhl, sinl, sqrtf, sqrtl,
tanf, tanhf, tanhl and tanl that are re
ognized in any mode sin
e ISO C90 reserves these
names for the purpose to whi
h ISO C99 puts them. All these fun
tions have
orresponding
versions prexed with __builtin_.
The ISO C94 fun
tions iswalnum, iswalpha, isw
ntrl, iswdigit, iswgraph, iswlower,
iswprint, iswpun
t, iswspa
e, iswupper, iswxdigit, towlower and towupper are handled as built-in fun
tions ex
ept in stri
t ISO C90 mode (`-ansi' or `-std=
89').
The ISO C90 fun
tions abort, abs, a
os, asin, atan2, atan,
allo
,
eil,
osh,
os, exit, exp, fabs, floor, fmod, fprintf, fputs, frexp, fs
anf, isalnum, isalpha,
is
ntrl, isdigit, isgraph, islower, isprint, ispun
t, isspa
e, isupper, isxdigit,
tolower, toupper, labs, ldexp, log10, log, mallo
, mem
mp, mem
py, memset, modf, pow,
printf, put
har, puts, s
anf, sinh, sin, snprintf, sprintf, sqrt, ss
anf, str
at,
str
hr, str
mp, str
py, str
spn, strlen, strn
at, strn
mp, strn
py, strpbrk,
strr
hr, strspn, strstr, tanh, tan, vfprintf, vprintf and vsprintf are all re
ognized
as built-in fun
tions unless `-fno-builtin' is spe
ied (or `-fno-builtin-fun
tion ' is
spe
ied for an individual fun
tion). All of these fun
tions have
orresponding versions
prexed with __builtin_.
GCC provides built-in versions of the ISO C99
oating point
omparison ma
ros that
avoid raising ex
eptions for unordered operands. They have the same names as the standard ma
ros ( isgreater, isgreaterequal, isless, islessequal, islessgreater, and
isunordered) , with __builtin_ prexed. We intend for a library implementor to be able
to simply #define ea
h standard ma
ro to its built-in equivalent.
274
#define foo(x)
__builtin_
hoose_expr (
__builtin_types_
ompatible_p (typeof (x), double),
foo_double (x),
__builtin_
hoose_expr (
__builtin_types_
ompatible_p (typeof (x), float),
foo_float (x),
/* The void expression results in a
ompile-time error \
when assigning the result to something. */
\
(void)0))
275
\
\
\
\
\
\
\
Note: This
onstru
t is only available for C. Furthermore, the unused expression
(exp1 or exp2 depending on the value of
onst exp) may still generate syntax errors.
This may
hange in future revisions.
You may use this built-in fun
tion in either a ma
ro or an inline fun
tion. However, if
you use it in an inlined fun
tion and pass an argument of the fun
tion as the argument
to the built-in, GCC will never return 1 when you
all the inline fun
tion with a string
onstant or
ompound literal (see Se
tion 5.19 [Compound Literals, page 214) and
will not return 1 when you pass a
onstant numeri
value to the inline fun
tion unless
you spe
ify the `-O' option.
You may also use __builtin_
onstant_p in initializers for stati
data. For instan
e,
you
an write
stati
onst int table[ = {
__builtin_
onstant_p (EXPRESSION) ? (EXPRESSION) : -1,
/* . . . */
};
276
(`-fprofile-ar
s'), as programmers are notoriously bad at predi
ting how their
programs a
tually perform. However, there are appli
ations in whi
h this data is
hard to
olle
t.
The return value is the value of exp, whi
h should be an integral expression. The
value of
must be a
ompile-time
onstant. The semanti
s of the built-in are that it
is expe
ted that exp ==
. For example:
if (__builtin_expe
t (x, 0))
foo ();
would indi
ate that we do not expe
t to
all foo, sin
e we expe
t x to be zero. Sin
e
you are limited to integral expressions for exp, you should use
onstru
tions su
h as
if (__builtin_expe
t (ptr != NULL, 1))
error ();
Data prefet
h does not generate faults if addr is invalid, but the address expression
itself must be valid. For example, a prefet
h of p->next will not fault if p->next is
not a valid address, but evaluation will fault if p is not a valid address.
If the target does not support data prefet
h, the address expression is evaluated if it
in
ludes side ee
ts but no other
ode is generated and GCC does not issue a warning.
double __builtin_huge_val (void)
[Built-in Fun
tion
Returns a positive innity, if supported by the
oating-point format, else DBL_MAX.
This fun
tion is suitable for implementing the ISO C ma
ro HUGE_VAL.
float __builtin_huge_valf (void)
[Built-in Fun
tion
Similar to __builtin_huge_val, ex
ept the return type is float.
277
278
279
These built-in fun
tions are available for the Alpha family of pro
essors, depending on the
ommand-line swit
hes used.
The following built-in fun
tions are always available. They all generate the ma
hine
instru
tion that is part of the name.
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
long
__builtin_alpha_implver (void)
__builtin_alpha_rp
(void)
__builtin_alpha_amask (long)
__builtin_alpha_
mpbge (long, long)
__builtin_alpha_extbl (long, long)
__builtin_alpha_extwl (long, long)
__builtin_alpha_extll (long, long)
__builtin_alpha_extql (long, long)
__builtin_alpha_extwh (long, long)
__builtin_alpha_extlh (long, long)
__builtin_alpha_extqh (long, long)
__builtin_alpha_insbl (long, long)
__builtin_alpha_inswl (long, long)
__builtin_alpha_insll (long, long)
__builtin_alpha_insql (long, long)
__builtin_alpha_inswh (long, long)
__builtin_alpha_inslh (long, long)
__builtin_alpha_insqh (long, long)
__builtin_alpha_mskbl (long, long)
__builtin_alpha_mskwl (long, long)
__builtin_alpha_mskll (long, long)
__builtin_alpha_mskql (long, long)
__builtin_alpha_mskwh (long, long)
__builtin_alpha_msklh (long, long)
__builtin_alpha_mskqh (long, long)
__builtin_alpha_umulh (long, long)
__builtin_alpha_zap (long, long)
__builtin_alpha_zapnot (long, long)
The following built-in fun
tions are always with `-mmax' or `-m
pu=
pu ' where
pu is
p
a56 or later. They all generate the ma
hine instru
tion that is part of the name.
long
long
long
long
long
long
long
long
long
long
long
long
long
__builtin_alpha_pklb (long)
__builtin_alpha_pkwb (long)
__builtin_alpha_unpkbl (long)
__builtin_alpha_unpkbw (long)
__builtin_alpha_minub8 (long, long)
__builtin_alpha_minsb8 (long, long)
__builtin_alpha_minuw4 (long, long)
__builtin_alpha_minsw4 (long, long)
__builtin_alpha_maxub8 (long, long)
__builtin_alpha_maxsb8 (long, long)
__builtin_alpha_maxuw4 (long, long)
__builtin_alpha_maxsw4 (long, long)
__builtin_alpha_perr (long, long)
280
The following built-in fun
tions are always with `-m
ix' or `-m
pu=
pu ' where
pu is
ev67 or later. They all generate the ma
hine instru
tion that is part of the name.
long __builtin_alpha_
ttz (long)
long __builtin_alpha_
tlz (long)
long __builtin_alpha_
tpop (long)
The following builtins are available on systems that use the OSF/1 PAL
ode. Normally
they invoke the rduniq and wruniq PAL
alls, but when invoked with `-mtls-kernel',
they invoke rdval and wrval.
void *__builtin_thread_pointer (void)
void __builtin_set_thread_pointer (void *)
These built-in fun
tions are available for the ARM family of pro
essors, when the
`-m
pu=iwmmxt' swit
h is used:
typedef int v2si __attribute__ ((ve
tor_size (8)));
typedef short v4hi __attribute__ ((ve
tor_size (8)));
typedef
har v8qi __attribute__ ((ve
tor_size (8)));
int __builtin_arm_getw
x (int)
void __builtin_arm_setw
x (int, int)
int __builtin_arm_textrmsb (v8qi, int)
int __builtin_arm_textrmsh (v4hi, int)
int __builtin_arm_textrmsw (v2si, int)
int __builtin_arm_textrmub (v8qi, int)
int __builtin_arm_textrmuh (v4hi, int)
int __builtin_arm_textrmuw (v2si, int)
v8qi __builtin_arm_tinsrb (v8qi, int)
v4hi __builtin_arm_tinsrh (v4hi, int)
v2si __builtin_arm_tinsrw (v2si, int)
long long __builtin_arm_tmia (long long, int, int)
long long __builtin_arm_tmiabb (long long, int, int)
long long __builtin_arm_tmiabt (long long, int, int)
long long __builtin_arm_tmiaph (long long, int, int)
long long __builtin_arm_tmiatb (long long, int, int)
long long __builtin_arm_tmiatt (long long, int, int)
int __builtin_arm_tmovmskb (v8qi)
int __builtin_arm_tmovmskh (v4hi)
int __builtin_arm_tmovmskw (v2si)
long long __builtin_arm_wa
b (v8qi)
long long __builtin_arm_wa
h (v4hi)
long long __builtin_arm_wa
w (v2si)
v8qi __builtin_arm_waddb (v8qi, v8qi)
v8qi __builtin_arm_waddbss (v8qi, v8qi)
v8qi __builtin_arm_waddbus (v8qi, v8qi)
v4hi __builtin_arm_waddh (v4hi, v4hi)
v4hi __builtin_arm_waddhss (v4hi, v4hi)
v4hi __builtin_arm_waddhus (v4hi, v4hi)
v2si __builtin_arm_waddw (v2si, v2si)
v2si __builtin_arm_waddwss (v2si, v2si)
v2si __builtin_arm_waddwus (v2si, v2si)
v8qi __builtin_arm_walign (v8qi, v8qi, int)
long long __builtin_arm_wand(long long, long long)
long long __builtin_arm_wandn (long long, long long)
v8qi __builtin_arm_wavg2b (v8qi, v8qi)
v8qi __builtin_arm_wavg2br (v8qi, v8qi)
v4hi
v4hi
v8qi
v4hi
v2si
v8qi
v4hi
v2si
v8qi
v4hi
v2si
long
long
long
long
v4hi
v4hi
v8qi
v4hi
v2si
v8qi
v4hi
v2si
v8qi
v4hi
v2si
v8qi
v4hi
v2si
v4hi
v4hi
v4hi
long
v2si
v2si
v8qi
v8qi
v4hi
v4hi
long
long
v4hi
v4hi
v2si
v2si
v2si
v2si
v2si
v2si
v4hi
long
long
v4hi
v4hi
v2si
v2si
long
long
281
282
v4hi
v4hi
v2si
v2si
long
long
v4hi
v4hi
v2si
v2si
v8qi
v8qi
v8qi
v4hi
v4hi
v4hi
v2si
v2si
v2si
v4hi
v2si
long
v4hi
v2si
long
v4hi
v2si
long
v4hi
v2si
long
v8qi
v4hi
v2si
v8qi
v4hi
v2si
long
long
GCC provides many FR-V-spe
i
built-in fun
tions. In general, these fun
tions are intended to be
ompatible with those des
ribed by FR-V Family, Softune C/C++ Compiler
Manual (V6), Fujitsu Semi
ondu
tor. The two ex
eptions are __MDUNPACKH and __MBTOHE,
the g
forms of whi
h pass 128-bit values by pointer rather than by value.
Most of the fun
tions are named after spe
i
FR-V instru
tions. Su
h fun
tions are said
to be \dire
tly mapped" and are summarized here in tabular form.
The arguments to the built-in fun
tions
an be divided into three groups: register numbers,
ompile-time
onstants and run-time values. In order to make this
lassi
ation
lear at a
glan
e, the arguments and return values are given the following pseudo types:
Pseudo type
Real C type
Constant? Des
ription
uh
unsigned short
No
an unsigned halfword
283
No
an unsigned word
No
a signed word
No
an unsigned doubleword
No
a signed doubleword
Yes
an integer
onstant
Yes
an ACC register number
Yes
an IACC register number
These pseudo types are not dened by GCC, they are simply a notational
onvenien
e
used in this manual.
Arguments of type uh, uw1, sw1, uw2 and sw2 are evaluated at run time. They
orrespond
to register operands in the underlying FR-V instru
tions.
onst arguments represent immediate operands in the underlying FR-V instru
tions.
They must be
ompile-time
onstants.
a
arguments are evaluated at
ompile time and spe
ify the number of an a
umulator
register. For example, an a
argument of 2 will sele
t the ACC2 register.
ia
arguments are similar to a
arguments but spe
ify the number of an IACC register.
See see Se
tion 5.45.3.4 [Other Built-in Fun
tions, page 285 for more details.
uw1
sw1
uw2
sw2
onst
a
ia
unsigned int
int
unsigned long long
long long
int
int
int
The fun
tions listed below map dire
tly to FR-V I-type instru
tions.
Fun
tion prototype
Example usage
= __ADDSS (a, b )
= __SCAN (a, b )
b = __SCUTSS (a )
= __SLASS (a, b )
__SMASS (a, b )
__SMSSS (a, b )
__SMU (a, b )
= __SMUL (a, b )
= __SUBSS (a, b )
= __UMUL (a, b )
Assembly output
ADDSS a,b,
SCAN a,b,
SCUTSS a,b
SLASS a,b,
SMASS a,b
SMSSS a,b
SMU a,b
SMUL a,b,
SUBSS a,b,
UMUL a,b,
The fun
tions listed below map dire
tly to FR-V M-type instru
tions.
Fun
tion prototype
Example usage
Assembly output
b = __MABSHS (a )
__MADDACCS (b, a )
= __MADDHSS (a, b )
= __MADDHUS (a, b )
= __MAND (a, b )
__MASACCS (b, a )
= __MAVEH (a, b )
b = __MBTOH (a )
__MBTOHE (&b, a )
__MCLRACC (a )
MABSHS a,b
MADDACCS a,b
MADDHSS a,b,
MADDHUS a,b,
MAND a,b,
MASACCS a,b
MAVEH a,b,
MBTOH a,b
MBTOHE a,b
MCLRACC a
284
__MCLRACCA ()
= __M
op1 (a, b )
= __M
op2 (a, b )
= __MCPLHI (a, b )
= __MCPLI (a, b )
__MCPXIS (
, a, b )
__MCPXIU (
, a, b )
__MCPXRS (
, a, b )
__MCPXRU (
, a, b )
= __MCUT (a, b )
= __MCUTSS (a, b )
__MDADDACCS (b, a )
__MDASACCS (b, a )
= __MDCUTSSI (a, b )
= __MDPACKH (a, b )
= __MDROTLI (a, b )
__MDSUBACCS (b, a )
__MDUNPACKH (&b, a )
= __MEXPDHD (a, b )
= __MEXPDHW (a, b )
= __MHDSETH (a, b )
b = __MHDSETS (a )
b = __MHSETHIH (b, a )
b = __MHSETHIS (b, a )
b = __MHSETLOH (b, a )
b = __MHSETLOS (b, a )
b = __MHTOB (a )
__MMACHS (
, a, b )
__MMACHU (
, a, b )
__MMRDHS (
, a, b )
__MMRDHU (
, a, b )
__MMULHS (
, a, b )
__MMULHU (
, a, b )
__MMULXHS (
, a, b )
__MMULXHU (
, a, b )
b = __MNOT (a )
= __MOR (a, b )
= __MPACKH (a, b )
= __MQADDHSS (a, b )
= __MQADDHUS (a, b )
__MQCPXIS (
, a, b )
__MQCPXIU (
, a, b )
__MQCPXRS (
, a, b )
__MQCPXRU (
, a, b )
= __MQLCLRHS (a, b )
= __MQLMTHS (a, b )
__MQMACHS (
, a, b )
MCLRACCA
M
op1 a,b,
M
op2 a,b,
MCPLHI a,#b,
MCPLI a,#b,
MCPXIS a,b,
MCPXIU a,b,
MCPXRS a,b,
MCPXRU a,b,
MCUT a,b,
MCUTSS a,b,
MDADDACCS a,b
MDASACCS a,b
MDCUTSSI a,#b,
MDPACKH a,b,
MDROTLI a,#b,
MDSUBACCS a,b
MDUNPACKH a,b
MEXPDHD a,#b,
MEXPDHW a,#b,
MHDSETH a,#b,
MHDSETS #a,b
MHSETHIH #a,b
MHSETHIS #a,b
MHSETLOH #a,b
MHSETLOS #a,b
MHTOB a,b
MMACHS a,b,
MMACHU a,b,
MMRDHS a,b,
MMRDHU a,b,
MMULHS a,b,
MMULHU a,b,
MMULXHS a,b,
MMULXHU a,b,
MNOT a,b
MOR a,b,
MPACKH a,b,
MQADDHSS a,b,
MQADDHUS a,b,
MQCPXIS a,b,
MQCPXIU a,b,
MQCPXRS a,b,
MQCPXRU a,b,
MQLCLRHS a,b,
MQLMTHS a,b,
MQMACHS a,b,
__MQMACHU (
, a, b )
__MQMACXHS (
, a, b )
__MQMULHS (
, a, b )
__MQMULHU (
, a, b )
__MQMULXHS (
, a, b )
__MQMULXHU (
, a, b )
= __MQSATHS (a, b )
= __MQSLLHI (a, b )
= __MQSRAHI (a, b )
= __MQSUBHSS (a, b )
= __MQSUBHUS (a, b )
__MQXMACHS (
, a, b )
__MQXMACXHS (
, a, b )
b = __MRDACC (a )
b = __MRDACCG (a )
= __MROTLI (a, b )
= __MROTRI (a, b )
= __MSATHS (a, b )
= __MSATHU (a, b )
= __MSLLHI (a, b )
= __MSRAHI (a, b )
= __MSRLHI (a, b )
__MSUBACCS (b, a )
= __MSUBHSS (a, b )
= __MSUBHUS (a, b )
__MTRAP ()
b = __MUNPACKH (a )
= __MWCUT (a, b )
__MWTACC (b, a )
__MWTACCG (b, a )
= __MXOR (a, b )
285
MQMACHU a,b,
MQMACXHS a,b,
MQMULHS a,b,
MQMULHU a,b,
MQMULXHS a,b,
MQMULXHU a,b,
MQSATHS a,b,
MQSLLHI a,b,
MQSRAHI a,b,
MQSUBHSS a,b,
MQSUBHUS a,b,
MQXMACHS a,b,
MQXMACXHS a,b,
MRDACC a,b
MRDACCG a,b
MROTLI a,#b,
MROTRI a,#b,
MSATHS a,b,
MSATHU a,b,
MSLLHI a,#b,
MSRAHI a,#b,
MSRLHI a,#b,
MSUBACCS a,b
MSUBHSS a,b,
MSUBHUS a,b,
MTRAP
MUNPACKH a,b
MWCUT a,b,
MWTACC a,b
MWTACCG a,b
MXOR a,b,
This se
tion des
ribes built-in fun
tions that are not named after a spe
i
FR-V instru
tion.
sw2 __IACCreadll (ia
reg )
Return the full 64-bit value of IACC0. The reg argument is reserved for future
expansion and must be 0.
Return the value of IACC0H if reg is 0 and IACC0L if reg is 1. Other values
of reg are reje
ted as invalid.
Set the full 64-bit value of IACC0 to x. The reg argument is reserved for future
expansion and must be 0.
286
These built-in fun
tions are available for the i386 and x86-64 family of
omputers, depending
on the
ommand-line swit
hes used.
The following ma
hine modes are available for use with MMX built-in fun
tions (see
Se
tion 5.42 [Ve
tor Extensions, page 271): V2SI for a ve
tor of two 32-bit integers, V4HI
for a ve
tor of four 16-bit integers, and V8QI for a ve
tor of eight 8-bit integers. Some of
the built-in fun
tions operate on MMX registers as a whole 64-bit entity, these use DI as
their mode.
If 3Dnow extensions are enabled, V2SF is used as a mode for a ve
tor of two 32-bit
oating
point values.
If SSE extensions are enabled, V4SF is used for a ve
tor of four 32-bit
oating point
values. Some instru
tions use a ve
tor of four 32-bit integers, these use V4SI. Finally, some
instru
tions operate on an entire ve
tor register, interpreting it as a 128-bit integer, these
use mode TI.
The following built-in fun
tions are made available by `-mmmx'. All of them generate the
ma
hine instru
tion that is part of the name.
v8qi __builtin_ia32_paddb (v8qi, v8qi)
v4hi __builtin_ia32_paddw (v4hi, v4hi)
v2si __builtin_ia32_paddd (v2si, v2si)
v8qi __builtin_ia32_psubb (v8qi, v8qi)
v4hi __builtin_ia32_psubw (v4hi, v4hi)
v2si __builtin_ia32_psubd (v2si, v2si)
v8qi __builtin_ia32_paddsb (v8qi, v8qi)
v4hi __builtin_ia32_paddsw (v4hi, v4hi)
v8qi __builtin_ia32_psubsb (v8qi, v8qi)
v4hi __builtin_ia32_psubsw (v4hi, v4hi)
v8qi __builtin_ia32_paddusb (v8qi, v8qi)
v4hi __builtin_ia32_paddusw (v4hi, v4hi)
v8qi __builtin_ia32_psubusb (v8qi, v8qi)
v4hi __builtin_ia32_psubusw (v4hi, v4hi)
v4hi __builtin_ia32_pmullw (v4hi, v4hi)
v4hi __builtin_ia32_pmulhw (v4hi, v4hi)
di __builtin_ia32_pand (di, di)
di __builtin_ia32_pandn (di,di)
di __builtin_ia32_por (di, di)
di __builtin_ia32_pxor (di, di)
v8qi __builtin_ia32_p
mpeqb (v8qi, v8qi)
v4hi __builtin_ia32_p
mpeqw (v4hi, v4hi)
v2si __builtin_ia32_p
mpeqd (v2si, v2si)
v8qi __builtin_ia32_p
mpgtb (v8qi, v8qi)
v4hi __builtin_ia32_p
mpgtw (v4hi, v4hi)
v2si
v8qi
v4hi
v2si
v8qi
v4hi
v2si
v8qi
v4hi
v8qi
287
The following built-in fun
tions are made available either with `-msse', or with a
ombination of `-m3dnow' and `-mar
h=athlon'. All of them generate the ma
hine instru
tion
that is part of the name.
v4hi __builtin_ia32_pmulhuw (v4hi, v4hi)
v8qi __builtin_ia32_pavgb (v8qi, v8qi)
v4hi __builtin_ia32_pavgw (v4hi, v4hi)
v4hi __builtin_ia32_psadbw (v8qi, v8qi)
v8qi __builtin_ia32_pmaxub (v8qi, v8qi)
v4hi __builtin_ia32_pmaxsw (v4hi, v4hi)
v8qi __builtin_ia32_pminub (v8qi, v8qi)
v4hi __builtin_ia32_pminsw (v4hi, v4hi)
int __builtin_ia32_pextrw (v4hi, int)
v4hi __builtin_ia32_pinsrw (v4hi, int, int)
int __builtin_ia32_pmovmskb (v8qi)
void __builtin_ia32_maskmovq (v8qi, v8qi,
har *)
void __builtin_ia32_movntq (di *, di)
void __builtin_ia32_sfen
e (void)
The following built-in fun
tions are available when `-msse' is used. All of them generate
the ma
hine instru
tion that is part of the name.
int __builtin_ia32_
omieq (v4sf, v4sf)
int __builtin_ia32_
omineq (v4sf, v4sf)
int __builtin_ia32_
omilt (v4sf, v4sf)
int __builtin_ia32_
omile (v4sf, v4sf)
int __builtin_ia32_
omigt (v4sf, v4sf)
int __builtin_ia32_
omige (v4sf, v4sf)
int __builtin_ia32_u
omieq (v4sf, v4sf)
int __builtin_ia32_u
omineq (v4sf, v4sf)
int __builtin_ia32_u
omilt (v4sf, v4sf)
int __builtin_ia32_u
omile (v4sf, v4sf)
int __builtin_ia32_u
omigt (v4sf, v4sf)
int __builtin_ia32_u
omige (v4sf, v4sf)
v4sf __builtin_ia32_addps (v4sf, v4sf)
v4sf __builtin_ia32_subps (v4sf, v4sf)
v4sf __builtin_ia32_mulps (v4sf, v4sf)
v4sf __builtin_ia32_divps (v4sf, v4sf)
v4sf __builtin_ia32_addss (v4sf, v4sf)
v4sf __builtin_ia32_subss (v4sf, v4sf)
v4sf __builtin_ia32_mulss (v4sf, v4sf)
v4sf __builtin_ia32_divss (v4sf, v4sf)
v4si __builtin_ia32_
mpeqps (v4sf, v4sf)
v4si __builtin_ia32_
mpltps (v4sf, v4sf)
v4si __builtin_ia32_
mpleps (v4sf, v4sf)
v4si __builtin_ia32_
mpgtps (v4sf, v4sf)
v4si __builtin_ia32_
mpgeps (v4sf, v4sf)
v4si __builtin_ia32_
mpunordps (v4sf, v4sf)
v4si __builtin_ia32_
mpneqps (v4sf, v4sf)
288
The following built-in fun
tions are available when `-msse' is used.
v4sf __builtin_ia32_loadaps (float *)
Generates the movaps ma
hine instru
tion as a load from memory.
void __builtin_ia32_storeaps (float *, v4sf)
Generates the movaps ma
hine instru
tion as a store to memory.
v4sf __builtin_ia32_loadups (float *)
Generates the movups ma
hine instru
tion as a load from memory.
void __builtin_ia32_storeups (float *, v4sf)
Generates the movups ma
hine instru
tion as a store to memory.
v4sf __builtin_ia32_loadsss (float *)
Generates the movss ma
hine instru
tion as a load from memory.
289
The following built-in fun
tions are available when `-msse3' is used. All of them generate
the ma
hine instru
tion that is part of the name.
v2df __builtin_ia32_addsubpd (v2df, v2df)
v2df __builtin_ia32_addsubps (v2df, v2df)
v2df __builtin_ia32_haddpd (v2df, v2df)
v2df __builtin_ia32_haddps (v2df, v2df)
v2df __builtin_ia32_hsubpd (v2df, v2df)
v2df __builtin_ia32_hsubps (v2df, v2df)
v16qi __builtin_ia32_lddqu (
har
onst *)
void __builtin_ia32_monitor (void *, unsigned int, unsigned int)
v2df __builtin_ia32_movddup (v2df)
v4sf __builtin_ia32_movshdup (v4sf)
v4sf __builtin_ia32_movsldup (v4sf)
void __builtin_ia32_mwait (unsigned int, unsigned int)
The following built-in fun
tions are available when `-msse3' is used.
v2df __builtin_ia32_loadddup (double
onst *)
Generates the movddup ma
hine instru
tion as a load from memory.
The following built-in fun
tions are available when `-m3dnow' is used. All of them generate
the ma
hine instru
tion that is part of the name.
void
v8qi
v2si
v2sf
v2sf
v2si
v2si
v2si
v2sf
v2sf
v2sf
v2sf
v2sf
v2sf
v2sf
v2sf
v2sf
v2sf
v2sf
v4hi
__builtin_ia32_femms (void)
__builtin_ia32_pavgusb (v8qi, v8qi)
__builtin_ia32_pf2id (v2sf)
__builtin_ia32_pfa
(v2sf, v2sf)
__builtin_ia32_pfadd (v2sf, v2sf)
__builtin_ia32_pf
mpeq (v2sf, v2sf)
__builtin_ia32_pf
mpge (v2sf, v2sf)
__builtin_ia32_pf
mpgt (v2sf, v2sf)
__builtin_ia32_pfmax (v2sf, v2sf)
__builtin_ia32_pfmin (v2sf, v2sf)
__builtin_ia32_pfmul (v2sf, v2sf)
__builtin_ia32_pfr
p (v2sf)
__builtin_ia32_pfr
pit1 (v2sf, v2sf)
__builtin_ia32_pfr
pit2 (v2sf, v2sf)
__builtin_ia32_pfrsqrt (v2sf)
__builtin_ia32_pfrsqrtit1 (v2sf, v2sf)
__builtin_ia32_pfsub (v2sf, v2sf)
__builtin_ia32_pfsubr (v2sf, v2sf)
__builtin_ia32_pi2fd (v2si)
__builtin_ia32_pmulhrw (v4hi, v4hi)
290
The following built-in fun
tions are available when both `-m3dnow' and `-mar
h=athlon'
are used. All of them generate the ma
hine instru
tion that is part of the name.
v2si
v2sf
v2sf
v2sf
v2sf
v2si
__builtin_ia32_pf2iw (v2sf)
__builtin_ia32_pfna
(v2sf, v2sf)
__builtin_ia32_pfpna
(v2sf, v2sf)
__builtin_ia32_pi2fw (v2si)
__builtin_ia32_pswapdsf (v2sf)
__builtin_ia32_pswapdsi (v2si)
The MIPS64 ar
hite
ture in
ludes a number of instru
tions that operate on pairs of singlepre
ision
oating-point values. Ea
h pair is pa
ked into a 64-bit
oating-point register, with
one element being designated the \upper half" and the other being designated the \lower
half".
GCC supports paired-single operations using both the generi
ve
tor extensions (see Se
tion 5.42 [Ve
tor Extensions, page 271) and a
olle
tion of MIPS-spe
i
built-in fun
tions.
Both kinds of support are enabled by the `-mpaired-single'
ommand-line option.
The ve
tor type asso
iated with paired-single values is usually
alled v2sf. It
an be
dened in C as follows:
typedef float v2sf __attribute__ ((ve
tor_size (8)));
v2sf values are initialized in the same way as aggregates. For example:
v2sf a = {1.5, 9.1};
v2sf b;
float e, f;
b = (v2sf) {e, f};
Note: The CPU's endianness determines whi
h value is stored in the upper half of a
register and whi
h value is stored in the lower half. On little-endian targets, the rst value
is the lower one and the se
ond value is the upper one. The opposite order applies to
big-endian targets. For example, the
ode above will set the lower half of a to 1.5 on
little-endian targets and 9.1 on big-endian targets.
The table below lists the v2sf operations for whi
h hardware support exists. a, b and
are
v2sf values and x is an integral value.
C
ode
MIPS instru
tion
a+b
a-b
-a
a*b
a*b+
a*b-
-(a * b +
)
-(a * b -
)
x?a:b
add.ps
sub.ps
neg.ps
mul.ps
madd.ps
msub.ps
nmadd.ps
nmsub.ps
movn.ps/movz.ps
Note that the multiply-a
umulate instru
tions
an be disabled using the
ommand-line
option -mno-fused-madd.
291
The following paired-single fun
tions map dire
tly to a parti
ular MIPS instru
tion. Please
refer to the ar
hite
ture spe
i
ation for details on what ea
h instru
tion does.
v2sf __builtin_mips_pll_ps (v2sf, v2sf)
Pair lower lower (pll.ps).
v2sf __builtin_mips_pul_ps (v2sf, v2sf)
Pair upper lower (pul.ps).
v2sf __builtin_mips_plu_ps (v2sf, v2sf)
Pair lower upper (plu.ps).
v2sf __builtin_mips_puu_ps (v2sf, v2sf)
Pair upper upper (puu.ps).
v2sf __builtin_mips_
vt_ps_s (float, float)
Convert pair to paired single (
vt.ps.s).
float __builtin_mips_
vt_s_pl (v2sf)
Convert pair lower to single (
vt.s.pl).
float __builtin_mips_
vt_s_pu (v2sf)
Convert pair upper to single (
vt.s.pu).
v2sf __builtin_mips_abs_ps (v2sf)
Absolute value (abs.ps).
v2sf __builtin_mips_alnv_ps (v2sf, v2sf, int)
Align variable (alnv.ps).
Note: The value of the third parameter must be 0 or 4 modulo 8, otherwise the
result will be unpredi
table. Please read the instru
tion des
ription for details.
The following multi-instru
tion fun
tions are also available. In ea
h
ase,
ond
an be
any of the 16
oating-point
onditions: f, un, eq, ueq, olt, ult, ole, ule, sf, ngle, seq,
ngl, lt, nge, le or ngt.
v2sf __builtin_mips_movt_
_
ond _ps (v2sf a, v2sf b, v2sf
, v2sf d )
v2sf __builtin_mips_movf_
_
ond _ps (v2sf a, v2sf b, v2sf
, v2sf d )
movt.ps/movf.ps).
The movt fun
tions return the value x
omputed by:
.
ond.ps
,a,b
mov.ps x,
movt.ps x,d,
The movf fun
tions are similar but use movf.ps instead of movt.ps.
int __builtin_mips_upper_
_
ond _ps (v2sf a, v2sf b )
int __builtin_mips_lower_
_
ond _ps (v2sf a, v2sf b )
Comparison of two paired-single values (
.
ond.ps, b
1t/b
1f).
These fun
tions
ompare a and b using
.
ond.ps and return either the upper
292
v2sf a, b;
if (__builtin_mips_upper_
_eq_ps (a, b))
upper_halves_are_equal ();
else
upper_halves_are_unequal ();
if (__builtin_mips_lower_
_eq_ps (a, b))
lower_halves_are_equal ();
else
lower_halves_are_unequal ();
The MIPS-3D Appli
ation-Spe
i
Extension (ASE) in
ludes additional paired-single instru
tions that are designed to improve the performan
e of 3D graphi
s operations. Support
for these instru
tions is
ontrolled by the `-mips3d'
ommand-line option.
The fun
tions listed below map dire
tly to a parti
ular MIPS-3D instru
tion. Please refer
to the ar
hite
ture spe
i
ation for more details on what ea
h instru
tion does.
v2sf __builtin_mips_addr_ps (v2sf, v2sf)
Redu
tion add (addr.ps).
v2sf __builtin_mips_mulr_ps (v2sf, v2sf)
Redu
tion multiply (mulr.ps).
v2sf __builtin_mips_
vt_pw_ps (v2sf)
The following multi-instru
tion fun
tions are also available. In ea
h
ase,
ond
an be
any of the 16
oating-point
onditions: f, un, eq, ueq, olt, ult, ole, ule, sf, ngle, seq,
ngl, lt, nge, le or ngt.
293
v2sf a, b;
if (__builtin_mips_upper_
abs_eq_ps (a, b))
upper_halves_are_equal ();
else
upper_halves_are_unequal ();
if (__builtin_mips_lower_
abs_eq_ps (a, b))
lower_halves_are_equal ();
else
lower_halves_are_unequal ();
The movf fun
tions are similar but use movf.ps instead of movt.ps.
int
int
int
int
294
int
int
int
int
GCC provides an interfa
e for the PowerPC family of pro
essors to a
ess the AltiVe
operations des
ribed in Motorola's AltiVe
Programming Interfa
e Manual. The interfa
e
is made available by in
luding <altive
.h> and using `-maltive
' and `-mabi=altive
'.
The interfa
e supports the following ve
tor types.
ve
tor unsigned
har
ve
tor signed
har
ve
tor bool
har
ve
tor
ve
tor
ve
tor
ve
tor
unsigned short
signed short
bool short
pixel
ve
tor
ve
tor
ve
tor
ve
tor
unsigned int
signed int
bool int
float
GCC's implementation of the high-level language interfa
e available from C and C++
ode
diers from Motorola's do
umentation in several ways.
A ve
tor
onstant is a list of
onstant expressions within
urly bra
es.
A ve
tor initializer requires no
ast if the ve
tor
onstant is of the same type as the
variable it is initializing.
If signed or unsigned is omitted, the signedness of the ve
tor type is the default
signedness of the base type. The default varies depending on the operating system, so
a portable program should always spe
ify the signedness.
295
Compiling with `-maltive
' adds keywords __ve
tor, __pixel, and __bool. Ma
ros
`ve
tor', pixel, and bool are dened in <altive
.h> and
an be undened.
GCC allows using a typedef name as the type spe
ier for a ve
tor type.
For C, overloaded fun
tions are implemented with ma
ros so the following does not
work:
ve
_add ((ve
tor signed int){1, 2, 3, 4}, foo);
Sin
e ve
_add is a ma
ro, the ve
tor
onstant in the example is treated as four separate
arguments. Wrap the entire argument in parentheses for this to work.
Note: Only the <altive
.h> interfa
e is supported. Internally, GCC uses built-in fun
tions to a
hieve the fun
tionality in the aforementioned header le, but they are not supported and are subje
t to
hange without noti
e.
The following interfa
es are supported for the generi
and spe
i
AltiVe
operations
and the AltiVe
predi
ates. In
ases where there is a dire
t mapping between generi
and
spe
i
operations, only the generi
names are shown here, although the spe
i
operations
an also be used.
Arguments that are do
umented as
onst int require literal integral values within the
range required for that operation.
ve
tor
ve
tor
ve
tor
ve
tor
signed
har ve
_add (ve
tor bool
har, ve
tor signed
har);
signed
har ve
_add (ve
tor signed
har, ve
tor bool
har);
signed
har ve
_add (ve
tor signed
har, ve
tor signed
har);
unsigned
har ve
_add (ve
tor bool
har, ve
tor unsigned
har);
unsigned
har ve
_add (ve
tor unsigned
har, ve
tor bool
har);
unsigned
har ve
_add (ve
tor unsigned
har,
ve
tor unsigned
har);
signed short ve
_add (ve
tor bool short, ve
tor signed short);
signed short ve
_add (ve
tor signed short, ve
tor bool short);
signed short ve
_add (ve
tor signed short, ve
tor signed short);
unsigned short ve
_add (ve
tor bool short,
ve
tor unsigned short);
unsigned short ve
_add (ve
tor unsigned short,
ve
tor bool short);
unsigned short ve
_add (ve
tor unsigned short,
ve
tor unsigned short);
signed int ve
_add (ve
tor bool int, ve
tor signed int);
signed int ve
_add (ve
tor signed int, ve
tor bool int);
signed int ve
_add (ve
tor signed int, ve
tor signed int);
unsigned int ve
_add (ve
tor bool int, ve
tor unsigned int);
unsigned int ve
_add (ve
tor unsigned int, ve
tor bool int);
unsigned int ve
_add (ve
tor unsigned int, ve
tor unsigned int);
float ve
_add (ve
tor float, ve
tor float);
296
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
signed int ve
_vadduwm (ve
tor bool int, ve
tor signed int);
signed int ve
_vadduwm (ve
tor signed int, ve
tor bool int);
signed int ve
_vadduwm (ve
tor signed int, ve
tor signed int);
unsigned int ve
_vadduwm (ve
tor bool int, ve
tor unsigned int);
unsigned int ve
_vadduwm (ve
tor unsigned int, ve
tor bool int);
unsigned int ve
_vadduwm (ve
tor unsigned int,
ve
tor unsigned int);
signed
har ve
_vaddubm (ve
tor bool
har, ve
tor signed
har);
signed
har ve
_vaddubm (ve
tor signed
har, ve
tor bool
har);
signed
har ve
_vaddubm (ve
tor signed
har, ve
tor signed
har);
unsigned
har ve
_vaddubm (ve
tor bool
har,
ve
tor unsigned
har);
ve
tor unsigned
har ve
_vaddubm (ve
tor unsigned
har,
ve
tor bool
har);
ve
tor unsigned
har ve
_vaddubm (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor unsigned int ve
_add
(ve
tor unsigned int, ve
tor unsigned int);
ve
tor unsigned
har ve
_adds (ve
tor bool
har, ve
tor unsigned
har);
ve
tor unsigned
har ve
_adds (ve
tor unsigned
har, ve
tor bool
har);
ve
tor unsigned
har ve
_adds (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor signed
har ve
_adds (ve
tor bool
har, ve
tor signed
har);
ve
tor signed
har ve
_adds (ve
tor signed
har, ve
tor bool
har);
ve
tor signed
har ve
_adds (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned short ve
_adds (ve
tor bool short,
ve
tor unsigned short);
ve
tor unsigned short ve
_adds (ve
tor unsigned short,
ve
tor bool short);
ve
tor unsigned short ve
_adds (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor signed short ve
_adds (ve
tor bool short, ve
tor signed short);
ve
tor signed short ve
_adds (ve
tor signed short, ve
tor bool short);
ve
tor signed short ve
_adds (ve
tor signed short, ve
tor signed short);
ve
tor unsigned int ve
_adds (ve
tor bool int, ve
tor unsigned int);
ve
tor unsigned int ve
_adds (ve
tor unsigned int, ve
tor bool int);
ve
tor unsigned int ve
_adds (ve
tor unsigned int, ve
tor unsigned int);
ve
tor signed int ve
_adds (ve
tor bool int, ve
tor signed int);
ve
tor signed int ve
_adds (ve
tor signed int, ve
tor bool int);
ve
tor signed int ve
_adds (ve
tor signed int, ve
tor signed int);
ve
tor signed int ve
_vaddsws (ve
tor bool int, ve
tor signed int);
ve
tor signed int ve
_vaddsws (ve
tor signed int, ve
tor bool int);
ve
tor signed int ve
_vaddsws (ve
tor signed int, ve
tor signed int);
ve
tor unsigned int ve
_vadduws (ve
tor bool int, ve
tor unsigned int);
ve
tor unsigned int ve
_vadduws (ve
tor unsigned int, ve
tor bool int);
ve
tor unsigned int ve
_vadduws (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor signed short ve
_vaddshs (ve
tor
ve
tor
ve
tor signed short ve
_vaddshs (ve
tor
ve
tor
ve
tor signed short ve
_vaddshs (ve
tor
ve
tor
bool short,
signed short);
signed short,
bool short);
signed short,
signed short);
bool short,
unsigned short);
unsigned short,
bool short);
unsigned short,
unsigned short);
ve
tor signed
har ve
_vaddsbs (ve
tor bool
har, ve
tor signed
har);
ve
tor signed
har ve
_vaddsbs (ve
tor signed
har, ve
tor bool
har);
ve
tor signed
har ve
_vaddsbs (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned
har ve
_vaddubs (ve
tor
ve
tor
ve
tor unsigned
har ve
_vaddubs (ve
tor
ve
tor
ve
tor unsigned
har ve
_vaddubs (ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
bool
har,
unsigned
har);
unsigned
har,
bool
har);
unsigned
har,
unsigned
har);
297
298
bool
bool
bool
bool
signed short,
signed short);
unsigned short,
unsigned short);
ve
tor bool
har ve
_v
mpequb (ve
tor signed
har, ve
tor signed
har);
ve
tor bool
har ve
_v
mpequb (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor bool int ve
_
mpge (ve
tor float, ve
tor float);
ve
tor bool
har ve
_
mpgt (ve
tor unsigned
har, ve
tor unsigned
har);
ve
tor bool
har ve
_
mpgt (ve
tor signed
har, ve
tor signed
har);
ve
tor bool short ve
_
mpgt (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor bool short ve
_
mpgt (ve
tor signed short, ve
tor signed short);
ve
tor bool int ve
_
mpgt (ve
tor unsigned int, ve
tor unsigned int);
ve
tor bool int ve
_
mpgt (ve
tor signed int, ve
tor signed int);
ve
tor bool int ve
_
mpgt (ve
tor float, ve
tor float);
ve
tor bool int ve
_v
mpgtfp (ve
tor float, ve
tor float);
ve
tor bool int ve
_v
mpgtsw (ve
tor signed int, ve
tor signed int);
ve
tor bool int ve
_v
mpgtuw (ve
tor unsigned int, ve
tor unsigned int);
ve
tor bool short ve
_v
mpgtsh (ve
tor signed short,
ve
tor signed short);
ve
tor bool short ve
_v
mpgtuh (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor bool
har ve
_v
mpgtsb (ve
tor signed
har, ve
tor signed
har);
ve
tor bool
har ve
_v
mpgtub (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor bool int ve
_
mple (ve
tor float, ve
tor float);
ve
tor bool
har ve
_
mplt (ve
tor unsigned
har, ve
tor unsigned
har);
ve
tor bool
har ve
_
mplt (ve
tor signed
har, ve
tor signed
har);
299
300
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
ve
_dst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
void
void
void
void
void
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
ve
_dstst
(
onst
(
onst
(
onst
(
onst
(
onst
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
ve
_dststt
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
ve
_dstt
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
(
onst
301
302
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
303
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
har
har
har
har
har
har
har
har
har
ve
_lvsl
ve
_lvsl
ve
_lvsl
ve
_lvsl
ve
_lvsl
ve
_lvsl
ve
_lvsl
ve
_lvsl
ve
_lvsl
(int,
(int,
(int,
(int,
(int,
(int,
(int,
(int,
(int,
onst
onst
onst
onst
onst
onst
onst
onst
onst
volatile
volatile
volatile
volatile
volatile
volatile
volatile
volatile
volatile
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
har
har
har
har
har
har
har
har
har
ve
_lvsr
ve
_lvsr
ve
_lvsr
ve
_lvsr
ve
_lvsr
ve
_lvsr
ve
_lvsr
ve
_lvsr
ve
_lvsr
(int,
(int,
(int,
(int,
(int,
(int,
(int,
(int,
(int,
onst
onst
onst
onst
onst
onst
onst
onst
onst
volatile
volatile
volatile
volatile
volatile
volatile
volatile
volatile
volatile
ve
tor float ve
_madd (ve
tor float, ve
tor float, ve
tor float);
ve
tor signed short ve
_madds (ve
tor signed short,
ve
tor signed short,
ve
tor signed short);
ve
tor unsigned
har ve
_max (ve
tor bool
har, ve
tor unsigned
har);
ve
tor unsigned
har ve
_max (ve
tor unsigned
har, ve
tor bool
har);
ve
tor unsigned
har ve
_max (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor signed
har ve
_max (ve
tor bool
har, ve
tor signed
har);
ve
tor signed
har ve
_max (ve
tor signed
har, ve
tor bool
har);
ve
tor signed
har ve
_max (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned short ve
_max (ve
tor bool short,
ve
tor unsigned short);
ve
tor unsigned short ve
_max (ve
tor unsigned short,
ve
tor bool short);
ve
tor unsigned short ve
_max (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor signed short ve
_max (ve
tor bool short, ve
tor signed short);
ve
tor signed short ve
_max (ve
tor signed short, ve
tor bool short);
ve
tor signed short ve
_max (ve
tor signed short, ve
tor signed short);
ve
tor unsigned int ve
_max (ve
tor bool int, ve
tor unsigned int);
ve
tor unsigned int ve
_max (ve
tor unsigned int, ve
tor bool int);
ve
tor unsigned int ve
_max (ve
tor unsigned int, ve
tor unsigned int);
ve
tor signed int ve
_max (ve
tor bool int, ve
tor signed int);
ve
tor signed int ve
_max (ve
tor signed int, ve
tor bool int);
ve
tor signed int ve
_max (ve
tor signed int, ve
tor signed int);
ve
tor float ve
_max (ve
tor float, ve
tor float);
ve
tor float ve
_vmaxfp (ve
tor float, ve
tor float);
ve
tor signed int ve
_vmaxsw (ve
tor bool int, ve
tor signed int);
ve
tor signed int ve
_vmaxsw (ve
tor signed int, ve
tor bool int);
ve
tor signed int ve
_vmaxsw (ve
tor signed int, ve
tor signed int);
304
ve
tor unsigned int ve
_vmaxuw (ve
tor bool int, ve
tor unsigned int);
ve
tor unsigned int ve
_vmaxuw (ve
tor unsigned int, ve
tor bool int);
ve
tor unsigned int ve
_vmaxuw (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor signed short ve
_vmaxsh (ve
tor bool short, ve
tor signed short);
ve
tor signed short ve
_vmaxsh (ve
tor signed short, ve
tor bool short);
ve
tor signed short ve
_vmaxsh (ve
tor signed short,
ve
tor signed short);
ve
tor unsigned short ve
_vmaxuh (ve
tor
ve
tor
ve
tor unsigned short ve
_vmaxuh (ve
tor
ve
tor
ve
tor unsigned short ve
_vmaxuh (ve
tor
ve
tor
bool short,
unsigned short);
unsigned short,
bool short);
unsigned short,
unsigned short);
ve
tor signed
har ve
_vmaxsb (ve
tor bool
har, ve
tor signed
har);
ve
tor signed
har ve
_vmaxsb (ve
tor signed
har, ve
tor bool
har);
ve
tor signed
har ve
_vmaxsb (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned
har ve
_vmaxub (ve
tor
ve
tor
ve
tor unsigned
har ve
_vmaxub (ve
tor
ve
tor
ve
tor unsigned
har ve
_vmaxub (ve
tor
ve
tor
bool
har,
unsigned
har);
unsigned
har,
bool
har);
unsigned
har,
unsigned
har);
ve
tor bool
har ve
_mergeh (ve
tor bool
har, ve
tor bool
har);
ve
tor signed
har ve
_mergeh (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned
har ve
_mergeh (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor bool short ve
_mergeh (ve
tor bool short, ve
tor bool short);
ve
tor pixel ve
_mergeh (ve
tor pixel, ve
tor pixel);
ve
tor signed short ve
_mergeh (ve
tor signed short,
ve
tor signed short);
ve
tor unsigned short ve
_mergeh (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor float ve
_mergeh (ve
tor float, ve
tor float);
ve
tor bool int ve
_mergeh (ve
tor bool int, ve
tor bool int);
ve
tor signed int ve
_mergeh (ve
tor signed int, ve
tor signed int);
ve
tor unsigned int ve
_mergeh (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor bool short ve
_vmrghh (ve
tor bool short, ve
tor bool short);
ve
tor signed short ve
_vmrghh (ve
tor signed short,
ve
tor signed short);
ve
tor unsigned short ve
_vmrghh (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor pixel ve
_vmrghh (ve
tor pixel, ve
tor pixel);
ve
tor bool
har ve
_vmrghb (ve
tor bool
har, ve
tor bool
har);
ve
tor signed
har ve
_vmrghb (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned
har ve
_vmrghb (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor bool
har ve
_mergel (ve
tor bool
har, ve
tor bool
har);
ve
tor signed
har ve
_mergel (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned
har ve
_mergel (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor bool short ve
_mergel (ve
tor bool short, ve
tor bool short);
ve
tor pixel ve
_mergel (ve
tor pixel, ve
tor pixel);
ve
tor signed short ve
_mergel (ve
tor signed short,
ve
tor signed short);
ve
tor unsigned short ve
_mergel (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor float ve
_mergel (ve
tor float, ve
tor float);
ve
tor bool int ve
_mergel (ve
tor bool int, ve
tor bool int);
ve
tor signed int ve
_mergel (ve
tor signed int, ve
tor signed int);
ve
tor unsigned int ve
_mergel (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor float ve
_vmrglw (ve
tor float, ve
tor float);
ve
tor signed int ve
_vmrglw (ve
tor signed int, ve
tor signed int);
ve
tor unsigned int ve
_vmrglw (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor bool int ve
_vmrglw (ve
tor bool int, ve
tor bool int);
ve
tor bool short ve
_vmrglh (ve
tor bool short, ve
tor bool short);
ve
tor signed short ve
_vmrglh (ve
tor signed short,
ve
tor signed short);
ve
tor unsigned short ve
_vmrglh (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor pixel ve
_vmrglh (ve
tor pixel, ve
tor pixel);
ve
tor bool
har ve
_vmrglb (ve
tor bool
har, ve
tor bool
har);
ve
tor signed
har ve
_vmrglb (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned
har ve
_vmrglb (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor unsigned short ve
_mfvs
r (void);
ve
tor unsigned
har ve
_min (ve
tor bool
har, ve
tor unsigned
har);
ve
tor unsigned
har ve
_min (ve
tor unsigned
har, ve
tor bool
har);
ve
tor unsigned
har ve
_min (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor signed
har ve
_min (ve
tor bool
har, ve
tor signed
har);
ve
tor signed
har ve
_min (ve
tor signed
har, ve
tor bool
har);
ve
tor signed
har ve
_min (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned short ve
_min (ve
tor bool short,
ve
tor unsigned short);
ve
tor unsigned short ve
_min (ve
tor unsigned short,
ve
tor bool short);
ve
tor unsigned short ve
_min (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor signed short ve
_min (ve
tor bool short, ve
tor signed short);
ve
tor signed short ve
_min (ve
tor signed short, ve
tor bool short);
ve
tor signed short ve
_min (ve
tor signed short, ve
tor signed short);
ve
tor unsigned int ve
_min (ve
tor bool int, ve
tor unsigned int);
ve
tor unsigned int ve
_min (ve
tor unsigned int, ve
tor bool int);
305
306
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
unsigned int ve
_min (ve
tor unsigned int, ve
tor unsigned int);
signed int ve
_min (ve
tor bool int, ve
tor signed int);
signed int ve
_min (ve
tor signed int, ve
tor bool int);
signed int ve
_min (ve
tor signed int, ve
tor signed int);
float ve
_min (ve
tor float, ve
tor float);
bool short,
unsigned short);
unsigned short,
bool short);
unsigned short,
unsigned short);
ve
tor signed
har ve
_vminsb (ve
tor bool
har, ve
tor signed
har);
ve
tor signed
har ve
_vminsb (ve
tor signed
har, ve
tor bool
har);
ve
tor signed
har ve
_vminsb (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned
har ve
_vminub (ve
tor
ve
tor
ve
tor unsigned
har ve
_vminub (ve
tor
ve
tor
ve
tor unsigned
har ve
_vminub (ve
tor
ve
tor
bool
har,
unsigned
har);
unsigned
har,
bool
har);
unsigned
har,
unsigned
har);
ve
_mtvs
r
ve
_mtvs
r
ve
_mtvs
r
ve
_mtvs
r
ve
_mtvs
r
ve
_mtvs
r
ve
_mtvs
r
ve
_mtvs
r
ve
_mtvs
r
ve
_mtvs
r
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
signed int);
unsigned int);
bool int);
signed short);
unsigned short);
bool short);
pixel);
signed
har);
unsigned
har);
bool
har);
307
308
ve tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
unsigned int ve
_or (ve
tor unsigned int, ve
tor bool int);
unsigned int ve
_or (ve
tor unsigned int, ve
tor unsigned int);
bool short ve
_or (ve
tor bool short, ve
tor bool short);
signed short ve
_or (ve
tor bool short, ve
tor signed short);
signed short ve
_or (ve
tor signed short, ve
tor bool short);
signed short ve
_or (ve
tor signed short, ve
tor signed short);
unsigned short ve
_or (ve
tor bool short, ve
tor unsigned short);
unsigned short ve
_or (ve
tor unsigned short, ve
tor bool short);
unsigned short ve
_or (ve
tor unsigned short,
ve
tor unsigned short);
signed
har ve
_or (ve
tor bool
har, ve
tor signed
har);
bool
har ve
_or (ve
tor bool
har, ve
tor bool
har);
signed
har ve
_or (ve
tor signed
har, ve
tor bool
har);
signed
har ve
_or (ve
tor signed
har, ve
tor signed
har);
unsigned
har ve
_or (ve
tor bool
har, ve
tor unsigned
har);
unsigned
har ve
_or (ve
tor unsigned
har, ve
tor bool
har);
unsigned
har ve
_or (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor signed
har ve
_pa
k (ve
tor signed short, ve
tor signed short);
ve
tor unsigned
har ve
_pa
k (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor bool
har ve
_pa
k (ve
tor bool short, ve
tor bool short);
ve
tor signed short ve
_pa
k (ve
tor signed int, ve
tor signed int);
ve
tor unsigned short ve
_pa
k (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor bool short ve
_pa
k (ve
tor bool int, ve
tor bool int);
ve
tor bool short ve
_vpkuwum (ve
tor bool int, ve
tor bool int);
ve
tor signed short ve
_vpkuwum (ve
tor signed int, ve
tor signed int);
ve
tor unsigned short ve
_vpkuwum (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor bool
har ve
_vpkuhum (ve
tor bool short, ve
tor bool short);
ve
tor signed
har ve
_vpkuhum (ve
tor signed short,
ve
tor signed short);
ve
tor unsigned
har ve
_vpkuhum (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor pixel ve
_pa
kpx (ve
tor unsigned int, ve
tor unsigned int);
ve
tor unsigned
har ve
_pa
ks (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor signed
har ve
_pa
ks (ve
tor signed short, ve
tor signed short);
ve
tor unsigned short ve
_pa
ks (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor signed short ve
_pa
ks (ve
tor signed int, ve
tor signed int);
ve
tor signed short ve
_vpkswss (ve
tor signed int, ve
tor signed int);
ve
tor unsigned short ve
_vpkuwus (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor signed
har ve
_vpkshss (ve
tor signed short,
ve
tor signed short);
ve
tor unsigned
har ve
_vpkuhus (ve
tor unsigned short,
ve
tor unsigned short);
309
310
ve
tor signed int ve
_rl (ve
tor signed int, ve
tor unsigned int);
ve
tor unsigned int ve
_rl (ve
tor unsigned int, ve
tor unsigned int);
ve
tor signed int ve
_vrlw (ve
tor signed int, ve
tor unsigned int);
ve
tor unsigned int ve
_vrlw (ve
tor unsigned int, ve
tor unsigned int);
ve
tor signed short ve
_vrlh (ve
tor signed short,
ve
tor unsigned short);
ve
tor unsigned short ve
_vrlh (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor signed
har ve
_vrlb (ve
tor signed
har, ve
tor unsigned
har);
ve
tor unsigned
har ve
_vrlb (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor float ve
_round (ve
tor float);
ve
tor float ve
_rsqrte (ve
tor float);
ve
tor float ve
_sel (ve
tor float, ve
tor float, ve
tor bool int);
ve
tor float ve
_sel (ve
tor float, ve
tor float, ve
tor unsigned int);
ve
tor signed int ve
_sel (ve
tor signed int,
ve
tor signed int,
ve
tor bool int);
ve
tor signed int ve
_sel (ve
tor signed int,
ve
tor signed int,
ve
tor unsigned int);
ve
tor unsigned int ve
_sel (ve
tor unsigned int,
ve
tor unsigned int,
ve
tor bool int);
ve
tor unsigned int ve
_sel (ve
tor unsigned int,
ve
tor unsigned int,
ve
tor unsigned int);
ve
tor bool int ve
_sel (ve
tor bool int,
ve
tor bool int,
ve
tor bool int);
ve
tor bool int ve
_sel (ve
tor bool int,
ve
tor bool int,
ve
tor unsigned int);
ve
tor signed short ve
_sel (ve
tor signed short,
ve
tor signed short,
ve
tor bool short);
ve
tor signed short ve
_sel (ve
tor signed short,
ve
tor signed short,
ve
tor unsigned short);
ve
tor unsigned short ve
_sel (ve
tor unsigned short,
ve
tor unsigned short,
ve
tor bool short);
ve
tor unsigned short ve
_sel (ve
tor unsigned short,
ve
tor unsigned short,
ve
tor unsigned short);
ve
tor bool short ve
_sel (ve
tor bool short,
ve
tor bool short,
ve
tor bool short);
ve
tor bool short ve
_sel (ve
tor bool short,
ve
tor bool short,
ve
tor unsigned short);
ve
tor signed
har ve
_sel (ve
tor signed
har,
311
312
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
onst int);
ve
tor pixel ve
_sld (ve
tor pixel,
ve
tor pixel,
onst int);
ve
tor signed
har ve
_sld (ve
tor signed
har,
ve
tor signed
har,
onst int);
ve
tor unsigned
har ve
_sld (ve
tor unsigned
har,
ve
tor unsigned
har,
onst int);
ve
tor bool
har ve
_sld (ve
tor bool
har,
ve
tor bool
har,
onst int);
ve
tor signed int ve
_sll (ve
tor signed int,
ve
tor unsigned int);
ve
tor signed int ve
_sll (ve
tor signed int,
ve
tor unsigned short);
ve
tor signed int ve
_sll (ve
tor signed int,
ve
tor unsigned
har);
ve
tor unsigned int ve
_sll (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor unsigned int ve
_sll (ve
tor unsigned int,
ve
tor unsigned short);
ve
tor unsigned int ve
_sll (ve
tor unsigned int,
ve
tor unsigned
har);
ve
tor bool int ve
_sll (ve
tor bool int,
ve
tor unsigned int);
ve
tor bool int ve
_sll (ve
tor bool int,
ve
tor unsigned short);
ve
tor bool int ve
_sll (ve
tor bool int,
ve
tor unsigned
har);
ve
tor signed short ve
_sll (ve
tor signed short,
ve
tor unsigned int);
ve
tor signed short ve
_sll (ve
tor signed short,
ve
tor unsigned short);
ve
tor signed short ve
_sll (ve
tor signed short,
ve
tor unsigned
har);
ve
tor unsigned short ve
_sll (ve
tor unsigned short,
ve
tor unsigned int);
ve
tor unsigned short ve
_sll (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor unsigned short ve
_sll (ve
tor unsigned short,
ve
tor unsigned
har);
ve
tor bool short ve
_sll (ve
tor bool short, ve
tor unsigned int);
ve
tor bool short ve
_sll (ve
tor bool short, ve
tor unsigned short);
ve
tor bool short ve
_sll (ve
tor bool short, ve
tor unsigned
har);
ve
tor pixel ve
_sll (ve
tor pixel, ve
tor unsigned int);
ve
tor pixel ve
_sll (ve
tor pixel, ve
tor unsigned short);
ve
tor pixel ve
_sll (ve
tor pixel, ve
tor unsigned
har);
ve
tor signed
har ve
_sll (ve
tor signed
har, ve
tor unsigned int);
ve
tor signed
har ve
_sll (ve
tor signed
har, ve
tor unsigned short);
ve
tor signed
har ve
_sll (ve
tor signed
har, ve
tor unsigned
har);
ve
tor unsigned
har ve
_sll (ve
tor unsigned
har,
ve
tor unsigned int);
ve
tor unsigned
har ve
_sll (ve
tor unsigned
har,
ve
tor unsigned short);
ve
tor unsigned
har ve
_sll (ve
tor unsigned
har,
313
314
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor signed
har ve
_vspltb (ve
tor signed
har,
onst int);
ve
tor unsigned
har ve
_vspltb (ve
tor unsigned
har,
onst int);
ve
tor bool
har ve
_vspltb (ve
tor bool
har,
onst int);
ve
tor signed
har ve
_splat_s8 (
onst int);
ve
tor signed short ve
_splat_s16 (
onst int);
ve
tor signed int ve
_splat_s32 (
onst int);
ve
tor unsigned
har ve
_splat_u8 (
onst int);
signed int ve
_srl (ve
tor signed int, ve
tor unsigned int);
signed int ve
_srl (ve
tor signed int, ve
tor unsigned short);
signed int ve
_srl (ve
tor signed int, ve
tor unsigned
har);
unsigned int ve
_srl (ve
tor unsigned int, ve
tor unsigned int);
unsigned int ve
_srl (ve
tor unsigned int,
ve
tor unsigned short);
ve
tor unsigned int ve
_srl (ve
tor unsigned int, ve
tor unsigned
har);
ve
tor bool int ve
_srl (ve
tor bool int, ve
tor unsigned int);
315
316
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
void
void
void
void
void
void
void
bool int ve
_srl (ve
tor bool int, ve
tor unsigned short);
bool int ve
_srl (ve
tor bool int, ve
tor unsigned
har);
signed short ve
_srl (ve
tor signed short, ve
tor unsigned int);
signed short ve
_srl (ve
tor signed short,
ve
tor unsigned short);
signed short ve
_srl (ve
tor signed short, ve
tor unsigned
har);
unsigned short ve
_srl (ve
tor unsigned short,
ve
tor unsigned int);
unsigned short ve
_srl (ve
tor unsigned short,
ve
tor unsigned short);
unsigned short ve
_srl (ve
tor unsigned short,
ve
tor unsigned
har);
bool short ve
_srl (ve
tor bool short, ve
tor unsigned int);
bool short ve
_srl (ve
tor bool short, ve
tor unsigned short);
bool short ve
_srl (ve
tor bool short, ve
tor unsigned
har);
pixel ve
_srl (ve
tor pixel, ve
tor unsigned int);
pixel ve
_srl (ve
tor pixel, ve
tor unsigned short);
pixel ve
_srl (ve
tor pixel, ve
tor unsigned
har);
signed
har ve
_srl (ve
tor signed
har, ve
tor unsigned int);
signed
har ve
_srl (ve
tor signed
har, ve
tor unsigned short);
signed
har ve
_srl (ve
tor signed
har, ve
tor unsigned
har);
unsigned
har ve
_srl (ve
tor unsigned
har,
ve
tor unsigned int);
unsigned
har ve
_srl (ve
tor unsigned
har,
ve
tor unsigned short);
unsigned
har ve
_srl (ve
tor unsigned
har,
ve
tor unsigned
har);
bool
har ve
_srl (ve
tor bool
har, ve
tor unsigned int);
bool
har ve
_srl (ve
tor bool
har, ve
tor unsigned short);
bool
har ve
_srl (ve
tor bool
har, ve
tor unsigned
har);
float ve
_sro (ve
tor float, ve
tor signed
har);
float ve
_sro (ve
tor float, ve
tor unsigned
har);
signed int ve
_sro (ve
tor signed int, ve
tor signed
har);
signed int ve
_sro (ve
tor signed int, ve
tor unsigned
har);
unsigned int ve
_sro (ve
tor unsigned int, ve
tor signed
har);
unsigned int ve
_sro (ve
tor unsigned int, ve
tor unsigned
har);
signed short ve
_sro (ve
tor signed short, ve
tor signed
har);
signed short ve
_sro (ve
tor signed short, ve
tor unsigned
har);
unsigned short ve
_sro (ve
tor unsigned short,
ve
tor signed
har);
unsigned short ve
_sro (ve
tor unsigned short,
ve
tor unsigned
har);
pixel ve
_sro (ve
tor pixel, ve
tor signed
har);
pixel ve
_sro (ve
tor pixel, ve
tor unsigned
har);
signed
har ve
_sro (ve
tor signed
har, ve
tor signed
har);
signed
har ve
_sro (ve
tor signed
har, ve
tor unsigned
har);
unsigned
har ve
_sro (ve
tor unsigned
har, ve
tor signed
har);
unsigned
har ve
_sro (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
ve
_st
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
ve
_ste
void
void
void
void
void
ve
_stvewx
ve
_stvewx
ve
_stvewx
ve
_stvewx
ve
_stvewx
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
void
void
void
void
void
void
ve
_stvehx
ve
_stvehx
ve
_stvehx
ve
_stvehx
ve
_stvehx
ve
_stvehx
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
void
void
void
void
ve
_stvebx
ve
_stvebx
ve
_stvebx
ve
_stvebx
(ve
tor
(ve
tor
(ve
tor
(ve
tor
void
void
void
void
ve
_stl
ve
_stl
ve
_stl
ve
_stl
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
float,
float,
signed
signed
int,
int,
int,
int,
317
318
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
_stl
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
signed
har ve
_sub (ve
tor bool
har, ve
tor signed
har);
signed
har ve
_sub (ve
tor signed
har, ve
tor bool
har);
signed
har ve
_sub (ve
tor signed
har, ve
tor signed
har);
unsigned
har ve
_sub (ve
tor bool
har, ve
tor unsigned
har);
unsigned
har ve
_sub (ve
tor unsigned
har, ve
tor bool
har);
unsigned
har ve
_sub (ve
tor unsigned
har,
ve
tor unsigned
har);
signed short ve
_sub (ve
tor bool short, ve
tor signed short);
signed short ve
_sub (ve
tor signed short, ve
tor bool short);
signed short ve
_sub (ve
tor signed short, ve
tor signed short);
unsigned short ve
_sub (ve
tor bool short,
ve
tor unsigned short);
unsigned short ve
_sub (ve
tor unsigned short,
ve
tor bool short);
unsigned short ve
_sub (ve
tor unsigned short,
ve
tor unsigned short);
signed int ve
_sub (ve
tor bool int, ve
tor signed int);
signed int ve
_sub (ve
tor signed int, ve
tor bool int);
signed int ve
_sub (ve
tor signed int, ve
tor signed int);
unsigned int ve
_sub (ve
tor bool int, ve
tor unsigned int);
unsigned int ve
_sub (ve
tor unsigned int, ve
tor bool int);
unsigned int ve
_sub (ve
tor unsigned int, ve
tor unsigned int);
float ve
_sub (ve
tor float, ve
tor float);
signed int ve
_vsubuwm (ve
tor bool int, ve
tor signed int);
signed int ve
_vsubuwm (ve
tor signed int, ve
tor bool int);
signed int ve
_vsubuwm (ve
tor signed int, ve
tor signed int);
unsigned int ve
_vsubuwm (ve
tor bool int, ve
tor unsigned int);
unsigned int ve
_vsubuwm (ve
tor unsigned int, ve
tor bool int);
unsigned int ve
_vsubuwm (ve
tor unsigned int,
ve
tor unsigned int);
signed
har ve
_vsububm (ve
tor bool
har, ve
tor signed
har);
signed
har ve
_vsububm (ve
tor signed
har, ve
tor bool
har);
signed
har ve
_vsububm (ve
tor signed
har, ve
tor signed
har);
unsigned
har ve
_vsububm (ve
tor bool
har,
ve
tor unsigned
har);
ve
tor unsigned
har ve
_vsububm (ve
tor unsigned
har,
ve
tor bool
har);
ve
tor unsigned
har ve
_vsububm (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor unsigned int ve
_sub
(ve
tor unsigned int, ve
tor unsigned int);
ve
tor unsigned
har ve
_subs (ve
tor bool
har, ve
tor unsigned
har);
ve
tor unsigned
har ve
_subs (ve
tor unsigned
har, ve
tor bool
har);
ve
tor unsigned
har ve
_subs (ve
tor unsigned
har,
ve
tor unsigned
har);
ve
tor signed
har ve
_subs (ve
tor bool
har, ve
tor signed
har);
ve
tor signed
har ve
_subs (ve
tor signed
har, ve
tor bool
har);
ve
tor signed
har ve
_subs (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned short ve
_subs (ve
tor bool short,
ve
tor unsigned short);
ve
tor unsigned short ve
_subs (ve
tor unsigned short,
ve
tor bool short);
ve
tor unsigned short ve
_subs (ve
tor unsigned short,
ve
tor unsigned short);
ve
tor signed short ve
_subs (ve
tor bool short, ve
tor signed short);
ve
tor signed short ve
_subs (ve
tor signed short, ve
tor bool short);
ve
tor signed short ve
_subs (ve
tor signed short, ve
tor signed short);
ve
tor unsigned int ve
_subs (ve
tor bool int, ve
tor unsigned int);
ve
tor unsigned int ve
_subs (ve
tor unsigned int, ve
tor bool int);
ve
tor unsigned int ve
_subs (ve
tor unsigned int, ve
tor unsigned int);
ve
tor signed int ve
_subs (ve
tor bool int, ve
tor signed int);
ve
tor signed int ve
_subs (ve
tor signed int, ve
tor bool int);
ve
tor signed int ve
_subs (ve
tor signed int, ve
tor signed int);
ve
tor signed int ve
_vsubsws (ve
tor bool int, ve
tor signed int);
ve
tor signed int ve
_vsubsws (ve
tor signed int, ve
tor bool int);
ve
tor signed int ve
_vsubsws (ve
tor signed int, ve
tor signed int);
ve
tor unsigned int ve
_vsubuws (ve
tor bool int, ve
tor unsigned int);
ve
tor unsigned int ve
_vsubuws (ve
tor unsigned int, ve
tor bool int);
ve
tor unsigned int ve
_vsubuws (ve
tor unsigned int,
ve
tor unsigned int);
ve
tor signed short ve
_vsubshs (ve
tor bool short,
ve
tor signed short);
319
320
signed short,
bool short);
signed short,
signed short);
bool short,
unsigned short);
unsigned short,
bool short);
unsigned short,
unsigned short);
ve
tor signed
har ve
_vsubsbs (ve
tor bool
har, ve
tor signed
har);
ve
tor signed
har ve
_vsubsbs (ve
tor signed
har, ve
tor bool
har);
ve
tor signed
har ve
_vsubsbs (ve
tor signed
har, ve
tor signed
har);
ve
tor unsigned
har ve
_vsububs (ve
tor
ve
tor
ve
tor unsigned
har ve
_vsububs (ve
tor
ve
tor
ve
tor unsigned
har ve
_vsububs (ve
tor
ve
tor
bool
har,
unsigned
har);
unsigned
har,
bool
har);
unsigned
har,
unsigned
har);
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
321
322
int
int
int
int
int
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
ve
_all_eq
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
ve
_all_ge
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
ve
_all_gt
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
int
int
int
int
int
int
int
int
int
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
ve
_all_le
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
ve
_all_lt
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
ve
_all_ne
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
323
324
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
ve
_any_eq
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
ve
_any_ge
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
int
int
int
int
int
int
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
int
int
int
int
int
int
int
int
int
int
int
int
int
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
ve
_any_gt
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
ve
_any_le
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
ve
_any_lt
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
325
326
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
int
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
ve
_any_ne
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
(ve
tor
GCC supports SIMD operations on the SPARC using both the generi
ve
tor extensions
(see Se
tion 5.42 [Ve
tor Extensions, page 271) as well as built-in fun
tions for the SPARC
Visual Instru
tion Set (VIS). When you use the `-mvis' swit
h, the VIS extension is exposed
as the following built-in fun
tions:
typedef
typedef
typedef
typedef
typedef
327
Solaris targets support the
mn_err (or __
mn_err__) format
he
k.
mn_err a
epts a subset of the standard printf
onversions, and the two-argument %b
onversion for displaying
bit-elds. See the Solaris man page for
mn_err for more information.
The ARM target denes pragmas for
ontrolling the default addition of long_
all and
short_
all attributes to fun
tions. See Se
tion 5.24 [Fun
tion Attributes, page 217, for
information about the ee
ts of these attributes.
long_
alls
Set all subsequent fun tions to have the long_ all attribute.
no_long_ alls
Set all subsequent fun tions to have the short_ all attribute.
long_ alls_off
Do not ae t the long_ all or short_ all attributes of subsequent fun tions.
The RS/6000 and PowerPC targets dene one pragma for
ontrolling whether or not the
long
all attribute is added to fun
tion de
larations by default. This pragma overrides the
`-mlong
all' option, but not the long
all and short
all attributes. See Se
tion 3.17.23
[RS/6000 and PowerPC Options, page 155, for more information about when long
alls are
and are not ne
essary.
long
all (1)
Apply the long all attribute to all subsequent fun tion de larations.
Do not apply the long all attribute to subsequent fun tion de larations.
328
The following pragmas are available for all ar
hite
tures running the Darwin operating
system. These are useful for
ompatibility with other Ma
OS
ompilers.
mark tokens ...
options align=alignment
This pragma sets the alignment of elds in stru
tures. The values of alignment
may be ma
68k, to emulate m68k alignment, or power, to emulate PowerPC
alignment. Uses of this pragma nest properly; to restore the previous setting,
use reset for the alignment.
This pragma de
lares variables to be possibly unused. GCC will not produ
e
warnings for the listed variables. The ee
t is similar to that of the unused
attribute, ex
ept that this pragma may appear anywhere within the variables'
s
opes.
The Solaris target supports #pragma redefine_extname (see Se
tion 5.47.5 [SymbolRenaming Pragmas, page 328). It also supports additional #pragma dire
tives for
ompatibility with the system
ompiler.
align alignment (variable [, variable ...)
This pragma
auses ea
h listed fun
tion to be
alled after main, or during shared
module unloading, by adding a
all to the .fini se
tion.
This pragma
auses ea
h listed fun
tion to be
alled during initialization (before
main) or during shared module loading, by adding a
all to the .init se
tion.
For
ompatibility with the Solaris and Tru64 UNIX system headers, GCC supports two
#pragma dire
tives whi
h
hange the name used in assembly for a given de
laration. These
pragmas are only available on platforms whose system headers need them. To get this ee
t
on all platforms supported by GCC, use the asm labels extension (see Se
tion 5.36 [Asm
Labels, page 265).
329
This pragma gives the C fun
tion oldname the assembly symbol newname. The
prepro
essor ma
ro __PRAGMA_REDEFINE_EXTNAME will be dened if this pragma
is available (
urrently only on Solaris).
extern_prefix string
This pragma
auses all subsequent external fun
tion and variable de
larations to
have string prepended to their assembly symbols. This ee
t may be terminated
with another extern_prefix pragma whose argument is an empty string. The
prepro
essor ma
ro __PRAGMA_EXTERN_PREFIX will be dened if this pragma is
available (
urrently only on Tru64 UNIX).
These pragmas and the asm labels extension intera
t in a
ompli
ated manner. Here are
some
orner
ases you may want to be aware of.
1. Both pragmas silently apply only to de
larations with external linkage. Asm labels do
not have this restri
tion.
2. In C++, both pragmas silently apply only to de
larations with \C" linkage. Again, asm
labels do not have this restri
tion.
3. If any of the three ways of
hanging the assembly name of a de
laration is applied to
a de
laration whose assembly name has already been determined (either by a previous
use of one of these features, or be
ause the
ompiler needed the assembly name in order
to generate
ode), and the new name is dierent, a warning issues and the name does
not
hange.
4. The oldname used by #pragma redefine_extname is always the C-language name.
5. If #pragma extern_prefix is in ee
t, and a de
laration o
urs with an asm label
atta
hed, the prex is silently ignored for that de
laration.
6. If #pragma extern_prefix and #pragma redefine_extname apply to the same de
laration, whi
hever triggered rst wins, and a warning issues if they
ontradi
t ea
h other.
(We would like to have #pragma redefine_extname always win, for
onsisten
y with
asm labels, but if #pragma extern_prefix triggers rst we have no way of knowing
that that happened.)
For
ompatibility with Win32, GCC supports a set of #pragma dire
tives whi
h
hange the
maximum alignment of members of stru
tures, unions, and
lasses subsequently dened.
The n value below always is required to be a small power of two and spe
ies the new
alignment in bytes.
1. #pragma pa
k(n ) simply sets the new alignment.
2. #pragma pa
k() sets the alignment to the one that was in ee
t when
ompilation
started (see also
ommand line option `-fpa
k-stru
t[=<n>' see Se
tion 3.18 [Code
Gen Options, page 178).
3. #pragma pa
k(push[,n ) pushes the
urrent alignment setting on an internal sta
k
and then optionally sets the new alignment.
4. #pragma pa
k(pop) restores the alignment setting to the one saved at the top of the
internal sta
k (and removes that sta
k entry). Note that #pragma pa
k([n ) does not
330
in
uen
e this internal sta
k; thus it is possible to have #pragma pa
k(push) followed
by multiple #pragma pa
k(n ) instan
es and nalized by a single #pragma pa
k(pop).
For
ompatibility with SVR4, GCC supports a set of #pragma dire
tives for de
laring symbols to be weak, and dening weak aliases.
#pragma weak symbol
This pragma de
lares symbol to be weak, as if the de
laration had the attribute
of the same name. The pragma may appear before or after the de
laration of
symbol, but must appear before either its rst use or its denition. It is not an
error for symbol to never be dened at all.
In this example, the user would be able to a
ess members of the unnamed union with
ode like `foo.b'. Note that only unnamed stru
ts and unions are allowed, you may not
have, for example, an unnamed int.
You must never
reate su
h stru
tures that
ause ambiguous eld denitions. For example, this stru
ture:
stru
t {
int a;
stru
t {
int a;
};
} foo;
It is ambiguous whi
h a is being referred to with `foo.a'. Su
h
onstru
ts are not supported and must be avoided. In the future, su
h
onstru
ts may be dete
ted and treated
as
ompilation errors.
Unless `-fms-extensions' is used, the unnamed eld must be a stru
ture or union denition without a tag (for example, `stru
t { int a; };'). If `-fms-extensions' is used, the
eld may also be a denition with a tag su
h as `stru
t foo { int a; };', a referen
e to
a previously dened stru
ture or union su
h as `stru
t foo;', or a referen
e to a typedef
name for a previously dened stru
ture or union type.
331
The __thread spe
ier may be used alone, with the extern or stati
spe
iers, but
with no other storage
lass spe
ier. When used with extern or stati
, __thread must
appear immediately after the other storage
lass spe
ier.
The __thread spe
ier may be applied to any global, le-s
oped stati
, fun
tion-s
oped
stati
, or stati
data member of a
lass. It may not be applied to blo
k-s
oped automati
or non-stati
data member.
When the address-of operator is applied to a thread-lo
al variable, it is evaluated at
run-time and returns the address of the
urrent thread's instan
e of that variable. An
address so obtained may be used by any thread. When a thread terminates, any pointers
to thread-lo
al variables in that thread be
ome invalid.
No stati
initialization may refer to the address of a thread-lo
al variable.
In C++, if an initializer is present for a thread-lo
al variable, it must be a
onstantexpression, as dened in 5.19.2 of the ANSI/ISO C++ standard.
See ELF Handling For Thread-Lo
al Storage (http://people.redhat.
om/drepper/tls.pdf)
for a detailed explanation of the four thread-lo
al storage addressing models, and how the
run-time is expe
ted to fun
tion.
The following are a set of
hanges to ISO/IEC 9899:1999 (aka C99) that do
ument the
exa
t semanti
s of the language extension.
5.1.2 Exe
ution environments
Add new text after paragraph 1
Within either exe
ution environment, a thread is a
ow of
ontrol within
a program. It is implementation dened whether or not there may be
more than one thread asso
iated with a program. It is implementation
dened how threads beyond the rst are
reated, the name and type of
the fun
tion
alled at thread startup, and how threads may be terminated.
However, obje
ts with thread storage duration shall be initialized before
thread startup.
6.2.4 Storage durations of obje
ts
Add new text before paragraph 3
332
The following are a set of
hanges to ISO/IEC 14882:1998 (aka C++98) that do
ument the
exa
t semanti
s of the language extension.
[intro.exe ution
Add __thread.
[basi
.start.main
[basi .start.term
Change paragraph 1
All obje
ts whi
h have neither thread storage duration, dynami
storage
duration nor are lo
al [. . . .
[d
l.st
333
334
335
will
ause a read of the volatile obje
t pointed to by sr
and stores the value into the volatile
obje
t pointed to by dst. There is no guarantee that these reads and writes are atomi
,
espe
ially for obje
ts larger than int.
Less obvious expressions are where something whi
h looks like an a
ess is used in a void
ontext. An example would be,
volatile int *sr
= somevalue ;
*sr
;
With C, su
h expressions are rvalues, and as rvalues
ause a read of the obje
t, GCC
interprets this as a read of the volatile being pointed to. The C++ standard spe
ies that
su
h expressions do not undergo lvalue to rvalue
onversion, and that the type of the
dereferen
ed obje
t may be in
omplete. The C++ standard does not spe
ify expli
itly that
it is this lvalue to rvalue
onversion whi
h is responsible for
ausing an a
ess. However,
there is reason to believe that it is, be
ause otherwise
ertain simple expressions be
ome
undened. However, be
ause it would surprise most programmers, G++ treats dereferen
ing
a pointer to volatile obje
t of
omplete type in a void
ontext as a read of the obje
t. When
the obje
t has in
omplete type, G++ issues a warning.
stru
t S;
stru
t T {int m;};
volatile S *ptr1 = somevalue ;
volatile T *ptr2 = somevalue ;
*ptr1;
336
*ptr2;
In this example, a warning is issued for *ptr1, and *ptr2
auses a read of the obje
t
pointed to. If you wish to for
e an error on the rst
ase, you must for
e a
onversion to
rvalue with, for instan
e a stati
ast, stati
_
ast<S>(*ptr1).
When using a referen
e to volatile, G++ does not treat equivalent expressions as a
esses
to volatiles, but instead issues a warning that no volatile is a
essed. The rationale for
this is that otherwise it be
omes di
ult to determine where volatile a
ess o
ur, and not
possible to ignore the return value from fun
tions returning volatile referen
es. Again, if
you wish to for
e a read,
ast the referen
e to an rvalue.
In the body of fn, rptr points to an unaliased integer and rref refers to a (dierent) unaliased
integer.
You may also spe
ify whether a member fun
tion's this pointer is unaliased by using
__restri
t__ as a member fun
tion qualier.
void T::fn () __restri
t__
{
/* . . . */
}
Within the body of T::fn, this will have the ee
tive denition T *__restri
t__
onst
this. Noti
e that the interpretation of a __restri
t__ member fun
tion qualier is dierent to that of
onst or volatile qualier, in that it is applied to the pointer rather than
the obje
t. This is
onsistent with other
ompilers whi
h implement restri
ted pointers.
As with all outermost parameter qualiers, __restri
t__ is ignored in fun
tion denition
mat
hing. This means you only need to spe
ify __restri
t__ in a fun
tion denition,
rather than in a fun
tion prototype as well.
337
338
Note: As of GCC 2.7.2, these #pragmas are not useful in most
ases, be
ause of COMDAT
support and the \key method" heuristi
mentioned in Se
tion 6.3 [Vague Linkage, page 336.
Using them
an a
tually
ause your program to grow due to unne
essary out-of-line
opies
of inline fun
tions. Currently (3.4) the only benet of these #pragmas is redu
ed dupli
ation
of debugging information, and that should be addressed soon on DWARF 2 targets with
the use of COMDAT groups.
#pragma interfa
e
#pragma interfa
e "subdir /obje
ts.h"
Use this dire
tive in header les that dene obje
t
lasses, to save spa
e in
most of the obje
t les that use those
lasses. Normally, lo
al
opies of
ertain
information (ba
kup
opies of inline member fun
tions, debugging information,
and the internal tables that implement virtual fun
tions) must be kept in ea
h
obje
t le that in
ludes
lass denitions. You
an use this pragma to avoid su
h
dupli
ation. When a header le
ontaining `#pragma interfa
e' is in
luded in
a
ompilation, this auxiliary information will not be generated (unless the main
input sour
e le itself uses `#pragma implementation'). Instead, the obje
t
les will
ontain referen
es to be resolved at link time.
The se
ond form of this dire
tive is useful for the
ase where you have multiple
headers with the same name in dierent dire
tories. If you use this form, you
must spe
ify the same string to `#pragma implementation'.
#pragma implementation
#pragma implementation "obje
ts.h"
Use this pragma in a main input le, when you want full output from in
luded
header les to be generated (and made globally visible). The in
luded header
le, in turn, should use `#pragma interfa
e'. Ba
kup
opies of inline member
fun
tions, debugging information, and the internal tables used to implement
virtual fun
tions are all generated in implementation les.
If you use `#pragma implementation' with no argument, it applies to an
in
lude le with the same basename1 as your sour
e le. For example, in
`all
lass.
', giving just `#pragma implementation' by itself is equivalent
to `#pragma implementation "all
lass.h"'.
In versions of GNU C++ prior to 2.6.0 `all
lass.h' was treated as an implementation le whenever you would in
lude it from `all
lass.
' even if
you never spe
ied `#pragma implementation'. This was deemed to be more
trouble than it was worth, however, and disabled.
Use the string argument if you want a single implementation le to in
lude
ode
from multiple header les. (You must also use `#in
lude' to in
lude the header
le; `#pragma implementation' only spe
ies how to use the le|it doesn't
a
tually in
lude it.)
There is no way to split up the
ontents of a single header le into multiple
implementation les.
A le's basename was the name stripped of all leading path information and of trailing suxes, su
h as
`.h' or `.C' or `.
'.
339
`#pragma implementation' and `#pragma interfa
e' also have an ee
t on fun
tion inlining.
If you dene a
lass in a header le marked with `#pragma interfa
e', the ee
t on
an inline fun
tion dened in that
lass is similar to an expli
it extern de
laration|the
ompiler emits no
ode at all to dene an independent version of the fun
tion. Its denition
is used only for inlining with its
allers.
Conversely, when you in
lude the same header le in a main sour
e le that de
lares it
as `#pragma implementation', the
ompiler emits
ode for the fun
tion itself; this denes
a version of the fun
tion that
an be found via pointers (or by
allers
ompiled without
inlining). If all
alls to the fun
tion
an be inlined, you
an avoid emitting the fun
tion
by
ompiling with `-fno-implement-inlines'. If any
alls were not inlined, you will get
linker errors.
340
When used with GNU ld version 2.8 or later on an ELF system su
h as GNU/Linux or
Solaris 2, or on Mi
rosoft Windows, G++ supports the Borland model. On other systems,
G++ implements neither automati
model.
A future version of G++ will support a hybrid model whereby the
ompiler will emit
any instantiations for whi
h the template denition is in
luded in the
ompile, and store
template denitions and instantiation
ontext information into the obje
t le for the rest.
The link wrapper will extra
t that information as ne
essary and invoke the
ompiler to
produ
e the remaining instantiations. The linker will then
ombine dupli
ate instantiations.
In the mean time, you have the following options for dealing with template instantiations:
1. Compile your template-using
ode with `-frepo'. The
ompiler will generate les with
the extension `.rpo' listing all of the template instantiations used in the
orresponding
obje
t les whi
h
ould be instantiated there; the link wrapper, `
olle
t2', will then
update the `.rpo' les to tell the
ompiler where to pla
e those instantiations and
rebuild any ae
ted obje
t les. The link-time overhead is negligible after the rst
pass, as the
ompiler will
ontinue to pla
e the instantiations in the same les.
This is your best option for appli
ation
ode written for the Borland model, as it will
just work. Code written for the Cfront model will need to be modied so that the
template denitions are available at one or more points of instantiation; usually this is
as simple as adding #in
lude <tmethods.
> to the end of ea
h template header.
For library
ode, if you want the library to provide all of the template instantiations
it needs, just try to link all of its obje
t les together; the link will fail, but
ause
the instantiations to be generated as a side ee
t. Be warned, however, that this may
ause
on
i
ts if multiple libraries try to provide the same instantiations. For greater
ontrol, use expli
it instantiation as des
ribed in the next option.
2. Compile your
ode with `-fno-impli
it-templates' to disable the impli
it generation
of template instan
es, and expli
itly instantiate all the ones you use. This approa
h
requires more knowledge of exa
tly whi
h instan
es you need than do the others, but it's
less mysterious and allows greater
ontrol. You
an s
atter the expli
it instantiations
throughout your program, perhaps putting them in the translation units where the
instan
es are used or the translation units that dene the templates themselves; you
an put all of the expli
it instantiations you need into one big le; or you
an
reate
small les like
#in
lude "Foo.h"
#in
lude "Foo.
"
for ea
h of the instan
es you need, and
reate a template instantiation library from
those.
If you are using Cfront-model
ode, you
an probably get away with not using
`-fno-impli
it-templates' when
ompiling les that don't `#in
lude' the member
template denitions.
If you use one big le to do the instantiations, you may want to
ompile it without
`-fno-impli
it-templates' so you get all of the instan
es required by your expli
it
instantiations (but not by any other les) without having to spe
ify them as well.
341
G++ has extended the template instantiation syntax given in the ISO standard to
allow forward de
laration of expli
it instantiations (with extern), instantiation of the
ompiler support data for a template
lass (i.e. the vtable) without instantiating any
of its members (with inline), and instantiation of only the stati
data members of a
template
lass, without the support data or member fun
tions (with (stati
):
extern template int max (int, int);
inline template
lass Foo<int>;
stati
template
lass Foo<int>;
6.6 Extra
ting the fun
tion pointer from a bound pointer to
member fun
tion
In C++, pointer to member fun
tions (PMFs) are implemented using a wide pointer of sorts
to handle all the possible
all me
hanisms; the PMF needs to store information about how
to adjust the `this' pointer, and if the fun
tion pointed to is virtual, where to nd the
vtable, and where in the vtable to look for the member fun
tion. If you are using PMFs in
an inner loop, you should really re
onsider that de
ision. If that is not an option, you
an
extra
t the pointer to the fun
tion that would be
alled for a given obje
t/PMF pair and
all it dire
tly inside the inner loop, to save a bit of time.
Note that you will still be paying the penalty for the
all through a fun
tion pointer; on
most modern ar
hite
tures, su
h a
all defeats the bran
h predi
tion features of the CPU.
This is also true of normal virtual fun
tion
alls.
The syntax for this extension is
extern A a;
extern int (A::*fp)();
typedef int (*fptr)(A *);
fptr p = (fptr)(a.*fp);
For PMF
onstants (i.e. expressions of the form `&Klasse::Member'), no obje
t is needed
to obtain the address of the fun
tion. They
an be
onverted to fun
tion pointers dire
tly:
fptr p1 = (fptr)(&A::foo);
342
In the following example, A would normally be
reated before B, but the init_
priority attribute has reversed that order:
Some_Class
Some_Class
Note that the parti
ular values of priority do not matter; only their relative
ordering.
java_interfa
e
This type attribute informs C++ that the
lass is a Java interfa
e. It may
only be applied to
lasses de
lared within an extern "Java" blo
k. Calls to
methods de
lared in this interfa
e will be dispat
hed using GCJ's interfa
e table
me
hanism, instead of regular virtual table dispat
h.
See also See Se
tion 6.8 [Strong Using, page 342.
namespa
e std {
namespa
e debug {
template <
lass T> stru
t A { };
}
using namespa
e debug __attribute ((__strong__));
template <> stru
t A<int> { };
// ok to spe
ialize
int main()
{
f (std::A<float>());
f (std::A<int>());
}
stru
t S { ~S(); };
extern void bar();
void foo()
{
S s;
bar();
}
343
These are two of the many ways for G++ to implement template instantiation.
See Se
tion 6.5 [Template Instantiation, page 339. The C++ standard
learly
denes how template denitions have to be organized a
ross implementation
units. G++ has an impli
it instantiation me
hanism that should work just ne
for standard-
onforming
ode.
-fstri
t-prototype
-fno-stri
t-prototype
Previously it was possible to use an empty prototype parameter list to indi
ate
an unspe
ied number of parameters (like C), rather than no parameters, as
C++ demands. This feature has been removed, ex
ept where it is required for
ba
kwards
ompatibility See Se
tion 6.11 [Ba
kwards Compatibility, page 344.
G++ allows a virtual fun
tion returning `void *' to be overridden by one returning a
dierent pointer type. This extension to the
ovariant return type rules is now depre
ated
and will be removed from a future version.
The G++ minimum and maximum operators (`<?' and `>?') and their
ompound forms
(`<?=') and `>?=') have been depre
ated and will be removed in a future version. Code using
these operators should be modied to use std::min and std::max instead.
The named return value extension has been depre
ated, and is now removed from G++.
344
The use of initializer lists with new expressions has been depre
ated, and is now removed
from G++.
Floating and
omplex non-type template parameters have been depre
ated, and are now
removed from G++.
The impli
it typename extension has been depre
ated and is now removed from G++.
The use of default arguments in fun
tion pointers, fun
tion typedefs and and other pla
es
where they are not permitted by the standard is depre
ated and will be removed from a
future version of G++.
G++ allows
oating-point literals to appear in integral
onstant expressions, e.g. ` enum
E { e = int(2.2 * 3.7) } ' This extension is depre
ated and will be removed from a future
version.
G++ allows stati
data members of
onst
oating-point type to be de
lared with an
initializer in a
lass denition. The standard only allows initializers for stati
members of
onst integral types and
onst enumeration types so this extension has been depre
ated and
will be removed from a future version.
Old C system header les did not
ontain an extern "C" {...} s
ope to set
the language. On su
h systems, all header les are impli
itly s
oped inside a C
language s
ope. Also, an empty prototype () will be treated as an unspe
ied
number of arguments, rather than no arguments, as C++ demands.
345
7.1
+load:
The GNU Obje
tive-C runtime provides a way that allows you to exe
ute
ode before the
exe
ution of the program enters the main fun
tion. The
ode is exe
uted on a per-
lass and
a per-
ategory basis, through a spe
ial
lass method +load.
This fa
ility is very useful if you want to initialize global variables whi
h
an be a
essed
by the program dire
tly, without sending a message to the
lass rst. The usual way
to initialize global variables, in the +initialize method, might not be useful be
ause
+initialize is only
alled when the rst message is sent to a
lass obje
t, whi
h in some
ases
ould be too late.
Suppose for example you have a FileStream
lass that de
lares Stdin, Stdout and
Stderr as global variables, like below:
FileStream *Stdin = nil;
FileStream *Stdout = nil;
FileStream *Stderr = nil;
implementation FileStream
+ (void)initialize
{
Stdin = [[FileStream new initWithFd:0;
Stdout = [[FileStream new initWithFd:1;
Stderr = [[FileStream new initWithFd:2;
}
/* Other methods here */
end
In this example, the initialization of Stdin, Stdout and Stderr in +initialize o
urs
too late. The programmer
an send a message to one of these obje
ts before the variables
are a
tually initialized, thus sending messages to the nil obje
t. The +initialize method
whi
h a
tually initializes the global variables is not invoked until the rst message is sent
to the
lass obje
t. The solution would require these variables to be initialized just before
entering main.
The
orre
t solution of the above problem is to use the +load method instead of
+initialize:
implementation FileStream
+ (void)load
{
Stdin = [[FileStream new initWithFd:0;
Stdout = [[FileStream new initWithFd:1;
346
The +load is a method that is not overridden by
ategories. If a
lass and a
ategory of
it both implement +load, both methods are invoked. This allows some additional initializations to be performed in a
ategory.
This me
hanism is not intended to be a repla
ement for +initialize. You should be
aware of its limitations when you de
ide to use it instead of +initialize.
The +load implementation in the GNU runtime guarantees you the following things:
In parti
ular, the following things, even if they
an work in a parti
ular
ase, are not
guaranteed:
You should make no assumptions about re
eiving +load in sibling
lasses when you write
+load of a
lass. The order in whi
h sibling
lasses re
eive +load is not guaranteed.
The order in whi
h +load and +initialize are
alled
ould be problemati
if this matters. If you don't allo
ate obje
ts inside +load, it is guaranteed that +load is
alled before
+initialize. If you
reate an obje
t inside +load the +initialize method of obje
t's
lass is invoked even if +load was not invoked. Note if you expli
itly
all +load on a
lass,
+initialize will be
alled rst. To avoid possible problems try to implement only one of
these methods.
The +load method is also invoked when a bundle is dynami
ally loaded into your running
program. This happens automati
ally without any intervening operation from you. When
you write bundles and you need to write +load you
an safely
reate and send messages to
obje
ts whose
lasses already exist in the running program. The same restri
tions as above
apply to
lasses dened in bundle.
347
unknown type
bit-elds
C
s
S
i
I
l
L
q
Q
f
d
v
#
:
*
?
b followed by the starting position of the bit-eld, the type of the
bit-eld and the size of the bit-eld (the bit-elds en
oding was
hanged from the NeXT's
ompiler en
oding, see below)
The en
oding of bit-elds has
hanged to allow bit-elds to be properly handled by the
runtime fun
tions that
ompute sizes and alignments of types that
ontain bit-elds. The
previous en
oding
ontained only the size of the bit-eld. Using only this information it is
not possible to reliably
ompute the size o
upied by the bit-eld. This is very important
in the presen
e of the Boehm's garbage
olle
tor be
ause the obje
ts are allo
ated using
the typed memory fa
ility available in this
olle
tor. The typed memory allo
ation requires
information about where the pointers are lo
ated inside the obje
t.
The position in the bit-eld is the position,
ounting in bits, of the bit
losest to the
beginning of the stru
ture.
The non-atomi
types are en
oded as follows:
pointers
`^' followed by the pointed type.
arrays
`[' followed by the number of elements in the array followed by the
type of the elements followed by `'
stru
tures
`{' followed by the name of the stru
ture (or `?' if the stru
ture is
unnamed), the `=' sign, the type of the members and by `}'
unions
`(' followed by the name of the stru
ture (or `?' if the union is unnamed), the `=' sign, the type of the members followed by `)'
Here are some types and their en
odings, as they are generated by the
ompiler on an
i386 ma
hine:
348
stru
t {
int i;
float f[3;
int a:3;
int b:2;
har
;
}
Compiler en
oding
[10i
{?=i[3fb128i3b131i2 }
In addition to the types the
ompiler also en
odes the type spe
iers. The table below
des
ribes the en
oding of the
urrent Obje
tive-C type spe
iers:
Spe
ier
onst
in
inout
out
by
opy
oneway
En
oding
r
n
N
o
O
V
The type spe
iers are en
oded just before the type. Unlike types however, the type
spe
iers are only en
oded when they appear in method argument types.
349
Here is an example of how to use this feature. Suppose you want to implement a
lass
whose instan
es hold a weak pointer referen
e; the following
lass does this:
interfa
e WeakPointer : Obje
t
{
onst void* weakPointer;
}
- initWithPointer:(
onst void*)p;
- (
onst void*)weakPointer;
end
implementation WeakPointer
+ (void)initialize
{
lass_ivar_set_g
invisible (self, "weakPointer", YES);
}
- initWithPointer:(
onst void*)p
{
weakPointer = p;
return self;
}
- (
onst void*)weakPointer
{
return weakPointer;
}
end
Weak pointers are supported through a new type
hara
ter spe
ier represented by the
`!'
hara
ter. The
lass_ivar_set_g
invisible() fun
tion adds or removes this spe
ier
to the string type des
ription of the instan
e variable named as argument.
The
onstant string obje
ts are by default instan
es of the NXConstantString
lass whi
h
is provided by the GNU Obje
tive-C runtime. To get the denition of this
lass you must
in
lude the `obj
/NXConstStr.h' header le.
User dened libraries may want to implement their own
onstant string
lass. To be able
to support them, the GNU Obje
tive-C
ompiler provides a new
ommand line options
`-f
onstant-string-
lass=
lass-name '. The provided
lass should adhere to a stri
t
stru
ture, the same as NXConstantString's stru
ture:
interfa
e MyConstantStringClass
{
350
Class isa;
har *
_string;
unsigned int len;
}
end
NXConstantString inherits from Obje
t; user
lass libraries may
hoose to inherit the
ustomized
onstant string
lass from a dierent
lass than Obje
t. There is no requirement
in the methods the
onstant string
lass has to implement, but the nal ivar layout of the
lass must be the
ompatible with the given stru
ture.
When the
ompiler
reates the stati
ally allo
ated
onstant string obje
t, the
_string
eld will be lled by the
ompiler with the string; the length eld will be lled by the
ompiler with the string length; the isa pointer will be lled with NULL by the
ompiler,
and it will later be xed up automati
ally at runtime by the GNU Obje
tive-C runtime
library to point to the
lass whi
h was set by the `-f
onstant-string-
lass' option when
the obje
t le is loaded (if you wonder how it works behind the s
enes, the name of the
lass to use, and the list of stati
obje
ts to xup, are stored by the
ompiler in the obje
t
le in a pla
e where the GNU runtime library will nd them at runtime).
As a result, when a le is
ompiled with the `-f
onstant-string-
lass' option, all the
onstant string obje
ts will be instan
es of the
lass spe
ied as argument to this option. It
is possible to have multiple
ompilation units referring to dierent
onstant string
lasses,
neither the
ompiler nor the linker impose any restri
tions in doing this.
tells the
ompiler that ea
h time it en
ounters WOAppli
ation as a
lass name, it
should repla
e it with GSWAppli
ation (that is, WOAppli
ation is just an alias for
GSWAppli
ation).
There are some
onstraints on how this
an be used|
WOAppli
ation (the alias) must not be an existing
lass;
GSWAppli
ation (the real
lass) must be an existing
lass.
351
8 Binary Compatibility
Binary
ompatibility en
ompasses several related
on
epts:
appli
ation binary interfa
e (ABI)
The set of runtime
onventions followed by all of the tools that deal with binary representations of a program, in
luding
ompilers, assemblers, linkers, and
language runtime support. Some ABIs are formal with a written spe
i
ation,
possibly designed by multiple interested parties. Others are simply the way
things are a
tually done by a parti
ular set of tools.
ABI
onforman
e
A
ompiler
onforms to an ABI if it generates
ode that follows all of the
spe
i
ations enumerated by that ABI. A library
onforms to an ABI if it is
implemented a
ording to that ABI. An appli
ation
onforms to an ABI if it
is built using tools that
onform to that ABI and does not
ontain sour
e
ode
that spe
i
ally
hanges behavior spe
ied by the ABI.
alling
onventions
Calling
onventions are a subset of an ABI that spe
ify of how arguments are
passed and fun
tion results are returned.
interoperability
Dierent sets of tools are interoperable if they generate les that
an be used
in the same program. The set of tools in
ludes
ompilers, assemblers, linkers,
libraries, header les, startup les, and debuggers. Binaries produ
ed by different sets of tools are not interoperable unless they implement the same ABI.
This applies to dierent versions of the same tools as well as tools from dierent
vendors.
inter
allability
Whether a fun
tion in a binary built by one set of tools
an
all a fun
tion in
a binary built by a dierent set of tools is a subset of interoperability.
implementation-dened features
Language standards in
lude lists of implementation-dened features whose behavior
an vary from one implementation to another. Some of these features
are normally
overed by a platform's ABI and others are not. The features
that are not
overed by an ABI generally ae
t how a program behaves, but
not inter
allability.
ompatibility
Conforman
e to the same ABI and the same behavior of implementation-dened
features are both relevant for
ompatibility.
The appli
ation binary interfa
e implemented by a C or C++
ompiler ae
ts
ode generation and runtime support for:
size and alignment of data types
layout of stru
tured types
alling
onventions
352
Similarly,
ompiling
ode with G++ that must use a C++ library other than the GNU C++
library requires spe
ifying the lo
ation of the header les for that other library.
353
The most straightforward way to link a program to use a parti
ular C++ library is to
use a C++ driver that spe
ies that C++ library by default. The g++ driver, for example,
tells the linker where to nd GCC's C++ library (`libstd
++') plus the other libraries and
startup les it needs, in the proper order.
If a program must use a dierent C++ library and it's not possible to do the nal link
using a C++ driver that uses that library by default, it is ne
essary to tell g++ the lo
ation
and name of that library. It might also be ne
essary to spe
ify dierent startup les and
other runtime support libraries, and to suppress the use of GCC's support libraries with
one or more of the options `-nostdlib', `-nostartfiles', and `-nodefaultlibs'.
354
355
On
e you know these things about how your
ode works when
ompiled, you
an look at
ea
h module to see whi
h modules should be optimized. g
ov helps you determine where
to work on optimization.
Software developers also use
overage testing in
on
ert with testsuites, to make sure
software is a
tually good enough for a release. Testsuites
an verify that a program works
as expe
ted; a
overage program tests to see how mu
h of the program is exer
ised by the
testsuite. Developers
an then determine what kinds of test
ases need to be added to the
testsuites to
reate both better testing and a better nal produ
t.
You should
ompile your
ode without optimization if you plan to use g
ov be
ause
the optimization, by
ombining some lines of
ode into one fun
tion, may not give you
as mu
h information as you need to look for `hot spots' where the
ode is using a great
deal of
omputer time. Likewise, be
ause g
ov a
umulates statisti
s by line (at the lowest
resolution), it works best with a programming style that pla
es only one statement on ea
h
line. If you use
ompli
ated ma
ros that expand to loops or to other
ontrol stru
tures,
the statisti
s are less helpful|they only report on the line where the ma
ro
all appears.
If your
omplex ma
ros behave like fun
tions, you
an repla
e them with inline fun
tions
to solve this problem.
g
ov
reates a logle
alled `sour
efile.g
ov' whi
h indi
ates how many times ea
h line
of a sour
e le `sour
efile.
' has exe
uted. You
an use these logles along with gprof
to aid in ne-tuning the performan
e of your programs. gprof gives timing information
you
an use along with the information you get from g
ov.
g
ov works only on
ode
ompiled with GCC. It is not
ompatible with any other proling
or test
overage me
hanism.
9.2 Invoking g ov
356
-h
--help
-v
--version
Display help about using g
ov (on the standard output), and exit without doing
any further pro
essing.
Display the g
ov version number (on the standard output), and exit without
doing any further pro
essing.
-a
--all-blo
ks
Write individual exe
ution
ounts for every basi
blo
k. Normally g
ov outputs
exe
ution
ounts only for the main blo
ks of a line. With this option you
an
determine if blo
ks within a single line are not being exe
uted.
-b
--bran
h-probabilities
Write bran
h frequen
ies to the output le, and write bran
h summary info to
the standard output. This option allows you to see how often ea
h bran
h in
your program was taken. Un
onditional bran
hes will not be shown, unless the
`-u' option is given.
-
--bran
h-
ounts
Write bran
h frequen
ies as the number of bran
hes taken, rather than the
per
entage of bran
hes taken.
-n
--no-output
-l
--long-file-names
Create long le names for in
luded sour
e les. For example, if the header
le `x.h'
ontains
ode, and was in
luded in the le `a.
', then running g
ov
on the le `a.
' will produ
e an output le
alled `a.
##x.h.g
ov' instead of
`x.h.g
ov'. This
an be useful if `x.h' is in
luded in multiple sour
e les. If you
use the `-p' option, both the in
luding and in
luded le names will be
omplete
path names.
-p
--preserve-paths
Preserve
omplete path information in the names of generated `.g
ov' les.
Without this option, just the lename
omponent is used. With this option, all
dire
tories are used, with `/'
hara
ters translated to `#'
hara
ters, `.' dire
tory
omponents removed and `..'
omponents renamed to `^'. This is useful if
sour
eles are in several dierent dire
tories. It also ae
ts the `-l' option.
-f
--fun
tion-summaries
357
-o dire
tory|file
--obje
t-dire
tory dire
tory
--obje
t-file file
Spe
ify either the dire
tory
ontaining the g
ov data les, or the obje
t path
name. The `.g
no', and `.g
da' data les are sear
hed for using this option. If
a dire
tory is spe
ied, the data les are in that dire
tory and named after the
sour
e le name, without its extension. If a le is spe
ied here, the data les
are named after that le, without its extension. If this option is not supplied,
it defaults to the
urrent dire
tory.
-u
--un
onditional-bran
hes
When bran
h probabilities are given, in
lude those of un
onditional bran
hes.
Un
onditional bran
hes are normally not interesting.
g
ov should be run with the
urrent dire
tory the same as that when you invoked the
ompiler. Otherwise it will not be able to lo
ate the sour
e les. g
ov produ
es les
alled
`mangledname.g
ov' in the
urrent dire
tory. These
ontain the
overage information of the
sour
e le they
orrespond to. One `.g
ov' le is produ
ed for ea
h sour
e le
ontaining
ode, whi
h was
ompiled to produ
e the data les. The mangledname part of the output
le name is usually simply the sour
e le name, but
an be something more
ompli
ated if
the `-l' or `-p' options are given. Refer to those options for details.
The `.g
ov' les
ontain the `:' separated elds along with program sour
e
ode. The
format is
exe
ution_
ount :line_number :sour
e line text
Additional blo
k information may su
eed ea
h line, when requested by
ommand line
option. The exe
ution
ount is `-' for lines
ontaining no
ode and `#####' for lines whi
h
were never exe
uted. Some lines of information at the start have line number of zero.
The preamble lines are of the form
-:0:tag :value
The ordering and number of these preamble lines will be augmented as g
ov development
progresses | do not rely on them remaining un
hanged. Use tag to lo
ate a parti
ular
preamble line.
The additional blo
k information is of the form
tag information
The information is human readable, but designed to be simple enough for ma
hine parsing
too.
When printing per
entages, 0% and 100% are only printed when the values are exa
tly
0% and 100% respe
tively. Other values whi
h would
onventionally be rounded to 0% or
100% are instead printed as the nearest non-boundary value.
When using g
ov, you must rst
ompile your program with two spe
ial GCC options:
`-fprofile-ar
s -ftest-
overage'. This tells the
ompiler to generate additional information needed by g
ov (basi
ally a
ow graph of the program) and also in
ludes additional
ode in the obje
t les for generating the extra proling information needed by g
ov. These
additional les are pla
ed in the dire
tory where the obje
t le is lo
ated.
358
Running the program will
ause prole output to be generated. For ea
h sour
e le
ompiled with `-fprofile-ar
s', an a
ompanying `.g
da' le will be pla
ed in the obje
t
le dire
tory.
Running g
ov with your program's sour
e le names as arguments will now produ
e a
listing of the
ode along with frequen
y of exe
ution for ea
h line. For example, if your
program is
alled `tmp.
', this is what you see when you use the basi
g
ov fa
ility:
$ g
-fprofile-ar
s -ftest-
overage tmp.
$ a.out
$ g
ov tmp.
90.00% of 10 sour
e lines exe
uted in file tmp.
Creating tmp.
.g
ov.
0:Sour
e:tmp.
0:Graph:tmp.g
no
0:Data:tmp.g
da
0:Runs:1
0:Programs:1
1:#in
lude <stdio.h>
2:
3:int main (void)
4:{
5: int i, total;
6:
7: total = 0;
8:
9: for (i = 0; i < 10; i++)
10:
total += i;
11:
12: if (total != 45)
13:
printf ("Failure\n");
14: else
15:
printf ("Su
ess\n");
16: return 0;
17:}
When you use the `-a' option, you will get individual blo
k
ounts, and the output looks
like this:
-:
-:
-:
-:
-:
-:
-:
-:
1:
1:
1:
-:
1:
-:
11:
11:
10:
10:
-:
0:Sour
e:tmp.
0:Graph:tmp.g
no
0:Data:tmp.g
da
0:Runs:1
0:Programs:1
1:#in
lude <stdio.h>
2:
3:int main (void)
4:{
4-blo
k 0
5: int i, total;
6:
7: total = 0;
8:
9: for (i = 0; i < 10; i++)
9-blo
k 0
10:
total += i;
10-blo
k 0
11:
1:
1:
#####:
$$$$$:
-:
1:
1:
1:
1:
-:
359
In this mode, ea
h basi
blo
k is only shown on one line { the last line of the blo
k.
A multi-line blo
k will only
ontribute to the exe
ution
ount of that last line, and other
lines will not be shown to
ontain
ode, unless previous blo
ks end on those lines. The
total exe
ution
ount of a line is shown and subsequent lines show the exe
ution
ounts for
individual blo
ks that end on that line. After ea
h blo
k, the bran
h and
all
ounts of the
blo
k will be shown, if the `-b' option is given.
Be
ause of the way GCC instruments
alls, a
all
ount
an be shown after a line with
no individual blo
ks. As you
an see, line 13
ontains a basi
blo
k that was not exe
uted.
When you use the `-b' option, your output looks like this:
$ g
ov -b tmp.
90.00% of 10 sour
e lines exe
uted in file tmp.
80.00% of 5 bran
hes exe
uted in file tmp.
80.00% of 5 bran
hes taken at least on
e in file tmp.
50.00% of 2
alls exe
uted in file tmp.
Creating tmp.
.g
ov.
360
-:
17:}
For ea
h fun
tion, a line is printed showing how many times the fun
tion is
alled, how
many times it returns and what per
entage of the fun
tion's blo
ks were exe
uted.
For ea
h basi
blo
k, a line is printed after the last line of the basi
blo
k des
ribing the
bran
h or
all that ends the basi
blo
k. There
an be multiple bran
hes and
alls listed for
a single sour
e line if there are multiple basi
blo
ks that end on that line. In this
ase, the
bran
hes and
alls are ea
h given a number. There is no simple way to map these bran
hes
and
alls ba
k to sour
e
onstru
ts. In general, though, the lowest numbered bran
h or
all
will
orrespond to the leftmost
onstru
t on the sour
e line.
For a bran
h, if it was exe
uted at least on
e, then a per
entage indi
ating the number
of times the bran
h was taken divided by the number of times the bran
h was exe
uted will
be printed. Otherwise, the message \never exe
uted" is printed.
For a
all, if it was exe
uted at least on
e, then a per
entage indi
ating the number of
times the
all returned divided by the number of times the
all was exe
uted will be printed.
This will usually be 100%, but may be less for fun
tions
all exit or longjmp, and thus
may not return every time they are
alled.
The exe
ution
ounts are
umulative. If the example program were exe
uted again without removing the `.g
da' le, the
ount for the number of times ea
h line in the sour
e was
exe
uted would be added to the results of the previous run(s). This is potentially useful in
several ways. For example, it
ould be used to a
umulate data over a number of program
runs as part of a test veri
ation suite, or to provide more a
urate long-term information
over a large number of program runs.
The data in the `.g
da' les is saved immediately before the program exits. For ea
h
sour
e le
ompiled with `-fprofile-ar
s', the proling
ode rst attempts to read in an
existing `.g
da' le; if the le doesn't mat
h the exe
utable (diering number of basi
blo
k
ounts) it will ignore the
ontents of the le. It then adds in the new exe
ution
ounts and
nally writes the data to the le.
an be
ompiled into one instru
tion on some ma
hines. In this
ase, there is no way for
g
ov to
al
ulate separate exe
ution
ounts for ea
h line be
ause there isn't separate
ode
for ea
h line. Hen
e the g
ov output looks like this if you
ompiled the program with
optimization:
100:
100:
100:
12:if (a != b)
13:
= 1;
14:else
100:
15:
361
= 0;
The output shows that this blo
k of
ode,
ombined by optimization, exe
uted 100 times.
In one sense this result is
orre
t, be
ause there was only one instru
tion representing all
four of these lines. However, the output does not indi
ate how many times the result was
0 and how many times the result was 1.
Inlineable fun
tions
an
reate unexpe
ted line
ounts. Line
ounts are shown for the
sour
e
ode of the inlineable fun
tion, but what is shown depends on where the fun
tion is
inlined, or if it is not inlined at all.
If the fun
tion is not inlined, the
ompiler must emit an out of line
opy of the fun
tion, in
any obje
t le that needs it. If `fileA.o' and `fileB.o' both
ontain out of line bodies of a
parti
ular inlineable fun
tion, they will also both
ontain
overage
ounts for that fun
tion.
When `fileA.o' and `fileB.o' are linked together, the linker will, on many systems, sele
t
one of those out of line bodies for all
alls to that fun
tion, and remove or ignore the other.
Unfortunately, it will not remove the
overage
ounters for the unused fun
tion body. Hen
e
when instrumented, all but one use of that fun
tion will show zero
ounts.
If the fun
tion is inlined in several pla
es, the blo
k stru
ture in ea
h lo
ation might not
be the same. For instan
e, a
ondition might now be
al
ulable at
ompile time in some
instan
es. Be
ause the
overage of all the uses of the inline fun
tion will be shown for the
same sour
e lines, the line
ounts themselves might seem in
onsistent.
in the same dire
tory as the obje
t le, and
ontain data stored in a platform-independent
format.
The `.g
no' le is generated when the sour
e le is
ompiled with the GCC
`-ftest-
overage' option. It
ontains information to re
onstru
t the basi
blo
k graphs
and assign sour
e line numbers to blo
ks.
The `.g
da' le is generated when a program
ontaining obje
t les built with the GCC
`-fprofile-ar
s' option is exe
uted. A separate `.g
da' le is
reated for ea
h obje
t le
ompiled with this option. It
ontains ar
transition
ounts, and some summary information.
The full details of the le format is spe
ied in `g
ov-io.h', and fun
tions provided in
that header le should be used to a
ess the
overage les.
362
363
The fixin
ludes s
ript intera
ts badly with automounters; if the dire
tory of system
header les is automounted, it tends to be unmounted while fixin
ludes is running.
This would seem to be a bug in the automounter. We don't know any good way to
work around it.
The fixproto s
ript will sometimes add prototypes for the sigsetjmp and siglongjmp
fun
tions that referen
e the jmp_buf type before that type is dened. To work around
this, edit the oending le and pla
e the typedef in front of the prototypes.
10.3 Interoperation
This se
tion lists various di
ulties en
ountered in using GCC together with other
ompilers
or with the assemblers, linkers, libraries and debuggers on
ertain systems.
On many platforms, GCC supports a dierent ABI for C++ than do other
ompilers, so
the obje
t les
ompiled by GCC
annot be used with obje
t les generated by another
C++
ompiler.
An area where the dieren
e is most apparent is name mangling. The use of dierent
name mangling is intentional, to prote
t you from more subtle problems. Compilers
dier as to many internal details of C++ implementation, in
luding: how
lass instan
es
are laid out, how multiple inheritan
e is implemented, and how virtual fun
tion
alls
are handled. If the name en
oding were made the same, your programs would link
against libraries provided from other
ompilers|but the programs would then
rash
when run. In
ompatible libraries are then dete
ted at link time, rather than at run
time.
On some BSD systems, in
luding some versions of Ultrix, use of proling
auses stati
variable destru
tors (
urrently used only in C++) not to be run.
On some SGI systems, when you use `-lgl_s' as an option, it gets translated magi
ally
to `-lgl_s -lX11_s -l
_s'. Naturally, this does not happen when you use GCC. You
must spe
ify all three options expli
itly.
364
On a SPARC, GCC aligns all values of type double on an 8-byte boundary, and it
expe
ts every double to be so aligned. The Sun
ompiler usually gives double values
8-byte alignment, with one ex
eption: fun
tion arguments of type double may not be
aligned.
As a result, if a fun
tion
ompiled with Sun CC takes the address of an argument
of type double and passes this pointer of type double * to a fun
tion
ompiled with
GCC, dereferen
ing the pointer may
ause a fatal signal.
One way to solve this problem is to
ompile your entire program with GCC. Another
solution is to modify the fun
tion that is
ompiled with Sun CC to
opy the argument
into a lo
al variable; lo
al variables are always properly aligned. A third solution is to
modify the fun
tion that uses the pointer to dereferen
e it via the following fun
tion
a
ess_double instead of dire
tly with `*':
inline double
a
ess_double (double *unaligned_ptr)
{
union d2i { double d; int i[2; };
union d2i *p = (union d2i *) unaligned_ptr;
union d2i u;
u.i[0 = p->i[0;
u.i[1 = p->i[1;
}
return u.d;
Storing into the pointer
an be done likewise with the same union.
On Solaris, the mallo
fun
tion in the `libmallo
.a' library may allo
ate memory
that is only 4 byte aligned. Sin
e GCC on the SPARC assumes that doubles are 8 byte
aligned, this may result in a fatal signal if doubles are stored in memory allo
ated by
the `libmallo
.a' library.
The solution is to not use the `libmallo
.a' library. Use instead mallo
and related
fun
tions from `lib
.a'; they do not have this problem.
On the HP PA ma
hine, ADB sometimes fails to work on fun
tions
ompiled with
GCC. Spe
i
ally, it fails to work on fun
tions that use allo
a or variable-size arrays.
This is be
ause GCC doesn't generate HP-UX unwind des
riptors for su
h fun
tions.
It may even be impossible to generate them.
Debugging (`-g') is not supported on the HP PA ma
hine, unless you use the preliminary GNU tools.
Taking the address of a label may generate errors from the HP-UX PA assembler. GAS
for the PA does not have this problem.
Using
oating point parameters for indire
t
alls to stati
fun
tions will not work when
using the HP assembler. There simply is no way for GCC to spe
ify what registers hold
arguments for stati
fun
tions when using the HP assembler. GAS for the PA does not
have this problem.
In extremely rare
ases involving some very large fun
tions you may re
eive errors from
the HP linker
omplaining about an out of bounds un
onditional bran
h oset. This
365
used to o
ur more often in previous versions of GCC, but is now ex
eptionally rare.
If you should run into it, you
an work around by making your fun
tion smaller.
GCC
ompiled
ode sometimes emits warnings from the HP-UX assembler of the form:
(warning) Use of GR3 when
frame >= 8192 may
ause
onfli
t.
366
One
onsequen
e is that you
annot
all mktemp with a string
onstant argument. The
fun
tion mktemp always alters the string its argument points to.
Another
onsequen
e is that ss
anf does not work on some very old systems when
passed a string
onstant as its format
ontrol string or input. This is be
ause ss
anf
in
orre
tly tries to write into the string
onstant. Likewise fs
anf and s
anf.
The solution to these problems is to
hange the program to use
har-array variables
with initialization strings for these purposes instead of string
onstants.
-2147483648 is positive.
This is be
ause 2147483648
annot t in the type int, so (following the ISO C rules)
its data type is unsigned long int. Negating this value yields 2147483648 again.
GCC does not substitute ma
ro arguments when they appear inside of string
onstants.
For example, the following ma
ro in GCC
#define foo(a) "a"
a = fun2 ();
/* longjmp (j) may o
ur in fun3. */
return a + fun3 ();
Here a may or may not be restored to its rst value when the longjmp o
urs. If a is
allo
ated in a register, then its rst value is restored; otherwise, it keeps the last value
stored in it.
If you use the `-W' option with the `-O' option, you will get a warning when GCC thinks
su
h a problem might be possible.
Programs that use prepro
essing dire
tives in the middle of ma
ro arguments do not
work with GCC. For example, a program like this will not work:
foobar (
#define luser
ha
k)
367
In some other C
ompilers, a extern de
laration ae
ts all the rest of the le even if
it happens within a blo
k.
In traditional C, you
an
ombine long, et
., with a typedef name, as shown here:
typedef int foo;
typedef long foo bar;
In ISO C, this is not allowed: long and other type modiers require an expli
it int.
PCC allows typedef names to be used as fun
tion parameters.
Traditional C allows the following erroneous pair of de
larations to appear together in
a given s
ope:
typedef int foo;
typedef foo foo;
GCC treats all
hara
ters of identiers as signi
ant. A
ording to K&R-1 (2.2), \No
more than the rst eight
hara
ters are signi
ant, although more may be used.". Also
a
ording to K&R-1 (2.2), \An identier is a sequen
e of letters and digits; the rst
hara
ter must be a letter. The unders
ore
ounts as a letter.", but GCC also allows
dollar signs in identiers.
PCC allows whitespa
e in the middle of
ompound assignment operators su
h as `+='.
GCC, following the ISO standard, does not allow this.
GCC
omplains about unterminated
hara
ter
onstants inside of prepro
essing
onditionals that fail. Some programs have English
omments en
losed in
onditionals
that are guaranteed to fail; if these
omments
ontain apostrophes, GCC will probably
report an error. For example, this
ode would produ
e an error:
#if 0
You
an't expe
t this to work.
#endif
The best solution to su
h a problem is to put the text into an a
tual C
omment
delimited by `/*...*/'.
Many user programs
ontain the de
laration `long time ();'. In the past, the system
header les on many systems did not a
tually de
lare time, so it did not matter what
type your program de
lared it to return. But in systems with ISO C headers, time is
de
lared to return time_t, and if that is not the same as long, then `long time ();'
is erroneous.
The solution is to
hange your program to use appropriate system headers (<time.h>
on systems with ISO C headers) and not to de
lare time if the system header les
de
lare it, or failing that to use time_t as the return type of time.
When
ompiling fun
tions that return float, PCC
onverts it to a double. GCC
a
tually returns a float. If you are
on
erned with PCC
ompatibility, you should
de
lare your fun
tions to return double; you might as well say what you mean.
When
ompiling fun
tions that return stru
tures or unions, GCC output
ode normally
uses a method dierent from that used on most versions of Unix. As a result,
ode
ompiled with GCC
annot
all a stru
ture-returning fun
tion
ompiled with PCC,
and vi
e versa.
The method used by GCC is as follows: a stru
ture or union whi
h is 1, 2, 4 or 8
bytes long is returned like a s
alar. A stru
ture or union with any other size is stored
into an address supplied by the
aller (usually in a spe
ial, xed register, but on some
368
ma
hines it is passed on the sta
k). The target hook TARGET_STRUCT_VALUE_RTX tells
GCC where to pass this address.
By
ontrast, PCC on most target ma
hines returns stru
tures and unions of any size
by
opying the data into an area of stati
storage, and then returning the address of
that storage as if it were a pointer value. The
aller must
opy the data from that
memory area to the pla
e where the value is wanted. GCC does not use this method
be
ause it is slower and nonreentrant.
On some newer ma
hines, PCC uses a reentrant
onvention for all stru
ture and union
returning. GCC on most of these ma
hines uses a
ompatible
onvention when returning stru
tures and unions in memory, but still returns small stru
tures and unions in
registers.
You
an tell GCC to use a
ompatible
onvention for all stru
ture and union returning
with the option `-fp
-stru
t-return'.
GCC
omplains about program fragments su
h as `0x74ae-0x4000' whi
h appear to be
two hexade
imal
onstants separated by the minus operator. A
tually, this string is a
single prepro
essing token. Ea
h su
h token must
orrespond to one token in C. Sin
e
this does not, GCC prints an error message. Although it may appear obvious that
what is meant is an operator and two values, the ISO C standard spe
i
ally requires
that this be treated as erroneous.
A prepro
essing token is a prepro
essing number if it begins with a digit and is followed
by letters, unders
ores, digits, periods and `e+', `e-', `E+', `E-', `p+', `p-', `P+', or `P-'
hara
ter sequen
es. (In stri
t C89 mode, the sequen
es `p+', `p-', `P+' and `P-'
annot
appear in prepro
essing numbers.)
To make the above program fragment valid, pla
e whitespa
e in front of the minus
sign. This whitespa
e will end the prepro
essing number.
369
It is possible to make separate sets of xed header les for the dierent ma
hine models,
and arrange a stru
ture of symboli
links so as to use the proper set, but you'll have
to do this by hand.
This
ode really is erroneous, be
ause the s
ope of stru
t mumble in the prototype
is limited to the argument list
ontaining it. It does not refer to the stru
t mumble
dened with le s
ope immediately below|they are two unrelated types with similar
names in dierent s
opes.
But in the denition of foo, the le-s
ope type is used be
ause that is available to be
inherited. Thus, the denition and the prototype do not mat
h, and you get an error.
370
This behavior may seem silly, but it's what the ISO standard spe
ies. It is easy enough
for you to make your
ode work by moving the denition of stru
t mumble above the
prototype. It's not worth being in
ompatible with ISO C just to avoid an error for the
example shown above.
A
esses to bit-elds even in volatile obje
ts works by a
essing larger obje
ts, su
h as
a byte or a word. You
annot rely on what size of obje
t is a
essed in order to read or
write the bit-eld; it may even vary for a given bit-eld a
ording to the pre
ise usage.
If you
are about
ontrolling the amount of memory that is a
essed, use volatile but
do not use bit-elds.
GCC
omes with shell s
ripts to x
ertain known problems in system header les.
They install
orre
ted
opies of various header les in a spe
ial dire
tory where only
GCC will normally look for them. The s
ripts adapt to various systems by sear
hing
all the system header les for the problem
ases that we know about.
If new system header les are installed, nothing automati
ally arranges to update the
orre
ted header les. They
an be updated using the mkheaders s
ript installed in
`libexe
dir /g
/target /version /install-tools/'.
On 68000 and x86 systems, for instan
e, you
an get paradoxi
al results if you test
the pre
ise values of
oating point numbers. For example, you
an nd that a
oating
point value whi
h is not a NaN is not equal to itself. This results from the fa
t that
the
oating point registers hold a few more bits of pre
ision than t in a double in
memory. Compiled
ode moves values between memory and
oating point registers at
its
onvenien
e, and moving them into memory trun
ates them.
You
an partially avoid this problem by using the `-ffloat-store' option (see Se
tion 3.10 [Optimize Options, page 61).
On AIX and other platforms without weak symbol support, templates need to be instantiated expli
itly and symbols for stati
members of templates will not be generated.
On AIX, GCC s
ans obje
t les and library ar
hives for stati
onstru
tors and destru
tors when linking an appli
ation before the linker prunes unreferen
ed symbols.
This is ne
essary to prevent the AIX linker from mistakenly assuming that stati
onstru
tor or destru
tor are unused and removing them before the s
anning
an o
ur.
All stati
onstru
tors and destru
tors found will be referen
ed even though the modules in whi
h they o
ur may not be used by the program. This may lead to both
in
reased exe
utable size and unexpe
ted symbol referen
es.
When a
lass has stati
data members, it is not enough to de
lare the stati
member; you
must also dene it. For example:
lass Foo
{
371
...
void method();
stati
int bar;
};
This de
laration only establishes that the
lass Foo has an int named Foo::bar, and a
member fun
tion named Foo::method. But you still need to dene both method and bar
elsewhere. A
ording to the ISO standard, you must supply an initializer in one (and only
one) sour
e le, su
h as:
int Foo::bar = 0;
Other C++
ompilers may not
orre
tly implement the standard behavior. As a result,
when you swit
h to g++ from one of these
ompilers, you may dis
over that a program
that appeared to work
orre
tly in fa
t does not
onform to the standard: g++ reports as
undened symbols any stati
data members that la
k denitions.
The C++ standard pres
ribes that all names that are not dependent on template parameters
are bound to their present denitions when parsing a template fun
tion or
lass.1 Only
names that are dependent are looked up at the point of instantiation. For example,
onsider
void foo(double);
stru
t A {
template <typename T>
void f () {
foo (1);
// 1
int i = N;
// 2
T t;
t.bar();
// 3
foo (t);
// 4
}
};
Here, the names foo and N appear in a
ontext that does not depend on the type of T.
The
ompiler will thus require that they are dened in the
ontext of use in the template,
not only before the point of instantiation, and will here use ::foo(double) and A::N,
respe
tively. In parti
ular, it will
onvert the integer value to a double when passing it to
::foo(double).
Conversely, bar and the
all to foo in the fourth marked line are used in
ontexts that do
depend on the type of T, so they are only looked up at the point of instantiation, and you
an provide de
larations for them after de
laring the template, but before instantiating it.
In parti
ular, if you instantiate A::f<int>, the last line will
all an overloaded ::foo(int)
if one was provided, even if after the de
laration of stru
t A.
This distin
tion between lookup of dependent and non-dependent names is
alled twostage (or dependent) name lookup. G++ implements it sin
e version 3.4.
Two-stage name lookup sometimes leads to situations with behavior dierent from nontemplate
odes. The most
ommon is probably this:
1
The C++ standard just uses the term \dependent" for names that depend on the type or value of template
parameters. This shorter term will also be used in the rest of this se
tion.
372
In get_i(), i is not used in a dependent
ontext, so the
ompiler will look for a name
de
lared at the en
losing namespa
e s
ope (whi
h is the global s
ope here). It will not look
into the base
lass, sin
e that is dependent and you may de
lare spe
ializations of Base
even after de
laring Derived, so the
ompiler
an't really know what i would refer to. If
there is no global variable i, then you will get an error message.
In order to make it
lear that you want the member of the base
lass, you need to defer
lookup until instantiation time, at whi
h the base
lass is known. For this, you need to
a
ess i in a dependent
ontext, by either using this->i (remember that this is of type
Derived<T>*, so is obviously dependent), or using Base<T>::i. Alternatively, Base<T>::i
might be brought into s
ope by a using-de
laration.
Another, similar example involves
alling member fun
tions of a base
lass:
template <typename T> stru
t Base {
int f();
};
Again, the
all to f() is not dependent on template arguments (there are no arguments
that depend on the type T, and it is also not otherwise spe
ied that the
all should be
in a dependent
ontext). Thus a global de
laration of su
h a fun
tion must be available,
sin
e the one in the base
lass is not visible until instantiation time. The
ompiler will
onsequently produ
e the following error message:
x.
: In member fun
tion `int Derived<T>::g()':
x.
:6: error: there are no arguments to `f' that depend on a template
parameter, so a de
laration of `f' must be available
x.
:6: error: (if you use `-fpermissive', G++ will a
ept your
ode, but
allowing the use of an unde
lared name is depre
ated)
To make the
ode valid either use this->f(), or Base<T>::f(). Using the
`-fpermissive'
ag will also let the
ompiler a
ept the
ode, by marking all fun
tion
alls for whi
h no de
laration is visible at the time of denition of the template for later
lookup at instantiation time, as if it were a dependent
all. We do not re
ommend using
`-fpermissive' to work around invalid
ode, and it will also only
at
h
ases where
fun
tions in base
lasses are
alled, not where variables in base
lasses are used (as in the
example above).
Note that some
ompilers (in
luding G++ versions prior to 3.4) get these examples wrong
and a
ept above
ode without an error. Those
ompilers do not implement two-stage name
lookup
orre
tly.
373
most
ommon pla
e where this problem
rops up is in
lasses like string
lasses, espe
ially
ones that dene a
onversion fun
tion to type
har * or
onst
har *|whi
h is one reason
why the standard string
lass requires you to
all the
_str member fun
tion. However,
any
lass that returns a pointer to some internal stru
ture is potentially subje
t to this
problem.
For example, a program may use a fun
tion strfun
that returns string obje
ts, and
another fun
tion
harfun
that operates on pointers to
har:
string strfun
();
void
harfun
(
onst
har *);
void
f ()
{
onst
har *p = strfun
().
_str();
...
harfun
(p);
...
harfun
(p);
}
In this situation, it may seem reasonable to save a pointer to the C string returned by
the
_str member fun
tion and use that rather than
all
_str repeatedly. However, the
temporary string
reated by the
all to strfun
is destroyed after p is initialized, at whi
h
point p is left pointing to freed memory.
Code like this may run su
essfully under some other
ompilers, parti
ularly obsolete
front-based
ompilers that delete temporaries along with normal lo
al variables. However, the GNU C++ behavior is standard-
onforming, so if your program depends on late
destru
tion of temporaries it is not portable.
The safe way to write su
h
ode is to give the temporary a name, whi
h for
es it to
remain until the end of the s
ope of the name. For example:
onst string& tmp = strfun
();
harfun
(tmp.
_str ());
When a base
lass is virtual, only one subobje
t of the base
lass belongs to ea
h full
obje
t. Also, the
onstru
tors and destru
tors are invoked only on
e, and
alled from the
most-derived
lass. However, su
h obje
ts behave unspe
ied when being assigned. For
example:
stru
t Base{
har *name;
Base(
har *n) : name(strdup(n)){}
Base& operator= (
onst Base& other){
free (name);
name = strdup (other.name);
}
};
stru
t A:virtual Base{
int val;
A():Base("A"){}
};
374
The C++ standard spe
ies that `Base::Base' is only
alled on
e when
onstru
ting or
opy-
onstru
ting a Derived obje
t. It is unspe
ied whether `Base::operator=' is
alled
more than on
e when the impli
it
opy-assignment for Derived obje
ts is invoked (as it is
inside `fun
' in the example).
G++ implements the \intuitive" algorithm for
opy-assignment: assign all dire
t bases,
then assign all members. In that algorithm, the virtual base subobje
t
an be en
ountered
more than on
e. In the example,
opying pro
eeds in the following order: `val', `name' (via
strdup), `bval', and `name' again.
If appli
ation
ode relies on
opy-assignment, a user-dened
opy-assignment operator
removes any un
ertainties. With su
h an operator, the appli
ation
an dene whether and
how the virtual base subobje
t is assigned.
375
must not result from expanding a ma
ro. This problem is inherent in the design of C
and
annot be xed. If only a few fun
tions have
onfusing ma
ro
alls, you
an easily
onvert them manually.
protoize
annot get the argument types for a fun
tion whose denition was not a
tually
ompiled due to prepro
essing
onditionals. When this happens, protoize
hanges
nothing in regard to su
h a fun
tion. protoize tries to dete
t su
h instan
es and warn
about them.
You
an generally work around this problem by using protoize step by step, ea
h
time spe
ifying a dierent set of `-D' options for
ompilation, until all of the fun
tions
have been
onverted. There is no automati
way to verify that you have got them all,
however.
Confusion may result if there is an o
asion to
onvert a fun
tion de
laration or definition in a region of sour
e
ode where there is more than one formal parameter list
present. Thus, attempts to
onvert
ode
ontaining multiple (
onditionally
ompiled)
versions of a single fun
tion header (in the same vi
inity) may not produ
e the desired
(or expe
ted) results.
If you plan on
onverting sour
e les whi
h
ontain su
h
ode, it is re
ommended
that you rst make sure that ea
h
onditionally
ompiled region of sour
e
ode whi
h
ontains an alternative fun
tion header also
ontains at least one additional follower
token (past the nal right parenthesis of the fun
tion header). This should
ir
umvent
the problem.
unprotoize
an be
ome
onfused when trying to
onvert a fun
tion denition or de
laration whi
h
ontains a de
laration for a pointer-to-fun
tion formal argument whi
h
has the same name as the fun
tion being dened or de
lared. We re
ommend you avoid
su
h
hoi
es of formal parameter names.
You might also want to
orre
t some of the indentation by hand and break long lines.
(The
onversion programs don't write lines longer than eighty
hara
ters in any
ase.)
376
377
There are some arguments for making bit-elds unsigned by default on all ma
hines.
If, for example, this be
omes a universal de fa
to standard, it would make sense for
GCC to go along with it. This is something to be
onsidered in the future.
(Of
ourse, users strongly
on
erned about portability should indi
ate expli
itly in ea
h
bit-eld whether it is signed or not. In this way, they write programs whi
h have the
same meaning in both C diale
ts.)
Undening __STDC__ when `-ansi' is not used.
Currently, GCC denes __STDC__ un
onditionally. This provides good results in pra
ti
e.
Programmers normally use
onditionals on __STDC__ to ask whether it is safe to use
ertain features of ISO C, su
h as fun
tion prototypes or ISO token
on
atenation.
Sin
e plain g
supports all the features of ISO C, the
orre
t answer to these questions
is \yes".
Some users try to use __STDC__ to
he
k for the availability of
ertain library fa
ilities.
This is a
tually in
orre
t usage in an ISO C program, be
ause the ISO C standard says
that a
onforming freestanding implementation should dene __STDC__ even though it
does not have the library fa
ilities. `g
-ansi -pedanti
' is a
onforming freestanding
implementation, and it is therefore required to dene __STDC__, even though it does
not
ome with an ISO C library.
Sometimes people say that dening __STDC__ in a
ompiler that does not
ompletely
onform to the ISO C standard somehow violates the standard. This is illogi
al. The
standard is a standard for
ompilers that
laim to support ISO C, su
h as `g
-ansi'|
not for other
ompilers su
h as plain g
. Whatever the ISO C standard says is
relevant to the design of plain g
without `-ansi' only for pragmati
reasons, not as
a requirement.
GCC normally denes __STDC__ to be 1, and in addition denes __STRICT_ANSI__ if
you spe
ify the `-ansi' option, or a `-std' option for stri
t
onforman
e to some version
of ISO C. On some hosts, system in
lude les use a dierent
onvention, where __STDC_
_ is normally 0, but is 1 if the user spe
ies stri
t
onforman
e to the C Standard. GCC
follows the host
onvention when pro
essing system in
lude les, but when pro
essing
user les it follows the usual GNU C
onvention.
Undening __STDC__ in C++.
Programs written to
ompile with C++-to-C translators get the value of __STDC__ that
goes with the C
ompiler that is subsequently used. These programs must test __STDC_
_ to determine what kind of C prepro
essor that
ompiler uses: whether they should
on
atenate tokens in the ISO C fashion or in the traditional fashion.
These programs work properly with GNU C++ if __STDC__ is dened. They would not
work otherwise.
In addition, many header les are written to provide prototypes in ISO C but not in
traditional C. Many of these header les
an work without
hange in C++ provided
__STDC__ is dened. If __STDC__ is not dened, they will all fail, and will all need to
be
hanged to test expli
itly for C++ as well.
Deleting \empty" loops.
378
Histori
ally, GCC has not deleted \empty" loops under the assumption that the most
likely reason you would put one in a program is to have a delay, so deleting them will
not make real programs run any faster.
However, the rationale here is that optimization of a nonempty loop
annot produ
e
an empty one. This held for
arefully written C
ompiled with less powerful optimizers
but is not always the
ase for
arefully written C++ or with more powerful optimizers.
Thus GCC will remove operations from loops whenever it
an determine those operations are not externally visible (apart from the time taken to exe
ute them, of
ourse).
As GCC improves, it will remove the loop itself. Indeed, with `-funroll-loops' small
loops
an already be removed, so leaving an empty non-unrolled loop is both suboptimal and in
onsistent.
Be aware of this when performing timing tests, for instan
e the following loop
an be
ompletely removed, provided some_expression
an provably not
hange any global
state.
{
int sum = 0;
int ix;
for (ix = 0; ix != 10000; ix++)
sum += some_expression;
Even though sum is a
umulated in the loop, no use is made of that summation, so the
a
umulation
an be removed.
Making side ee
ts happen in the same order as in some other
ompiler.
It is never safe to depend on the order of evaluation of side ee
ts. For example, a
fun
tion
all like this may very well behave dierently from one
ompiler to another:
void fun
(int, int);
int i = 2;
fun
(i++, i++);
There is no guarantee (in either the C or the C++ standard language denitions) that the
in
rements will be evaluated in any parti
ular order. Either in
rement might happen
rst. fun
might get the arguments `2, 3', or it might get `3, 2', or even `2, 2'.
Making
ertain warnings into errors by default.
Some ISO C testsuites report failure when the
ompiler does not produ
e an error
message for a
ertain program.
ISO C requires a \diagnosti
" message for
ertain kinds of invalid programs, but a
warning is dened by GCC to
ount as a diagnosti
. If GCC produ
es a warning but
not an error, that is
orre
t ISO C support. If testsuites
all this \failure", they should
be run with the GCC option `-pedanti
-errors', whi
h will turn these warnings into
errors.
379
Errors report problems that make it impossible to
ompile your program. GCC reports
errors with the sour
e le name and line number where the problem is apparent.
Warnings report other unusual
onditions in your
ode that may indi
ate a problem,
although
ompilation
an (and does) pro
eed. Warning messages also report the sour
e
le name and line number, but in
lude the text `warning:' to distinguish them from
error messages.
Warnings may indi
ate danger points where you should
he
k to make sure that your
program really does what you intend; or the use of obsolete features; or the use of nonstandard features of GNU C or C++. Many warnings are issued only if you ask for them, with
one of the `-W' options (for instan
e, `-Wall' requests a variety of useful warnings).
GCC always tries to
ompile your program if possible; it never gratuitously reje
ts a
program whose meaning is
lear merely be
ause (for instan
e) it fails to
onform to a
standard. In some
ases, however, the C and C++ standards spe
ify that
ertain extensions
are forbidden, and a diagnosti
must be issued by a
onforming
ompiler. The `-pedanti
'
option tells GCC to issue warnings in su
h
ases; `-pedanti
-errors' says to make them
errors instead. This does not mean that all non-ISO
onstru
ts get warnings or errors.
See Se
tion 3.8 [Options to Request or Suppress Warnings, page 34, for more detail on
these and related
ommand-line options.
380
381
11 Reporting Bugs
Your bug reports play an essential role in making GCC reliable.
When you en
ounter a problem, the rst thing to do is to see if it is already known. See
Chapter 10 [Trouble, page 363. If it isn't known, then you should report the problem.
382
383
384
385
for information on how to make useful ontributions and avoid dupli ation of eort. Suggested proje ts are listed at http://g .gnu.org/proje ts/.
386
387
388
389
390
391
Preamble
The li
enses for most software are designed to take away your freedom to share and
hange
it. By
ontrast, the GNU General Publi
Li
ense is intended to guarantee your freedom
to share and
hange free software|to make sure the software is free for all its users. This
General Publi
Li
ense applies to most of the Free Software Foundation's software and to
any other program whose authors
ommit to using it. (Some other Free Software Foundation
software is
overed by the GNU Library General Publi
Li
ense instead.) You
an apply it
to your programs, too.
When we speak of free software, we are referring to freedom, not pri
e. Our General
Publi
Li
enses are designed to make sure that you have the freedom to distribute
opies
of free software (and
harge for this servi
e if you wish), that you re
eive sour
e
ode or
an get it if you want it, that you
an
hange the software or use pie
es of it in new free
programs; and that you know you
an do these things.
To prote
t your rights, we need to make restri
tions that forbid anyone to deny you
these rights or to ask you to surrender the rights. These restri
tions translate to
ertain
responsibilities for you if you distribute
opies of the software, or if you modify it.
For example, if you distribute
opies of su
h a program, whether gratis or for a fee, you
must give the re
ipients all the rights that you have. You must make sure that they, too,
re
eive or
an get the sour
e
ode. And you must show them these terms so they know
their rights.
We prote
t your rights with two steps: (1)
opyright the software, and (2) oer you this
li
ense whi
h gives you legal permission to
opy, distribute and/or modify the software.
Also, for ea
h author's prote
tion and ours, we want to make
ertain that everyone
understands that there is no warranty for this free software. If the software is modied by
someone else and passed on, we want its re
ipients to know that what they have is not the
original, so that any problems introdu
ed by others will not re
e
t on the original authors'
reputations.
Finally, any free program is threatened
onstantly by software patents. We wish to avoid
the danger that redistributors of a free program will individually obtain patent li
enses, in
ee
t making the program proprietary. To prevent this, we have made it
lear that any
patent must be li
ensed for everyone's free use or not li
ensed at all.
The pre
ise terms and
onditions for
opying, distribution and modi
ation follow.
392
393
Thus, it is not the intent of this se
tion to
laim rights or
ontest your rights to
work written entirely by you; rather, the intent is to exer
ise the right to
ontrol the
distribution of derivative or
olle
tive works based on the Program.
In addition, mere aggregation of another work not based on the Program with the
Program (or with a work based on the Program) on a volume of a storage or distribution
medium does not bring the other work under the s
ope of this Li
ense.
3. You may
opy and distribute the Program (or a work based on it, under Se
tion 2)
in obje
t
ode or exe
utable form under the terms of Se
tions 1 and 2 above provided
that you also do one of the following:
a. A
ompany it with the
omplete
orresponding ma
hine-readable sour
e
ode,
whi
h must be distributed under the terms of Se
tions 1 and 2 above on a medium
ustomarily used for software inter
hange; or,
b. A
ompany it with a written oer, valid for at least three years, to give any third
party, for a
harge no more than your
ost of physi
ally performing sour
e distribution, a
omplete ma
hine-readable
opy of the
orresponding sour
e
ode, to be
distributed under the terms of Se
tions 1 and 2 above on a medium
ustomarily
used for software inter
hange; or,
. A
ompany it with the information you re
eived as to the oer to distribute
orresponding sour
e
ode. (This alternative is allowed only for non
ommer
ial distribution and only if you re
eived the program in obje
t
ode or exe
utable form
with su
h an oer, in a
ord with Subse
tion b above.)
The sour
e
ode for a work means the preferred form of the work for making modi
ations to it. For an exe
utable work,
omplete sour
e
ode means all the sour
e
ode
for all modules it
ontains, plus any asso
iated interfa
e denition les, plus the s
ripts
used to
ontrol
ompilation and installation of the exe
utable. However, as a spe
ial ex
eption, the sour
e
ode distributed need not in
lude anything that is normally
distributed (in either sour
e or binary form) with the major
omponents (
ompiler,
kernel, and so on) of the operating system on whi
h the exe
utable runs, unless that
omponent itself a
ompanies the exe
utable.
If distribution of exe
utable or obje
t
ode is made by oering a
ess to
opy from
a designated pla
e, then oering equivalent a
ess to
opy the sour
e
ode from the
same pla
e
ounts as distribution of the sour
e
ode, even though third parties are not
ompelled to
opy the sour
e along with the obje
t
ode.
4. You may not
opy, modify, subli
ense, or distribute the Program ex
ept as expressly
provided under this Li
ense. Any attempt otherwise to
opy, modify, subli
ense or
distribute the Program is void, and will automati
ally terminate your rights under this
Li
ense. However, parties who have re
eived
opies, or rights, from you under this
Li
ense will not have their li
enses terminated so long as su
h parties remain in full
omplian
e.
5. You are not required to a
ept this Li
ense, sin
e you have not signed it. However,
nothing else grants you permission to modify or distribute the Program or its derivative
works. These a
tions are prohibited by law if you do not a
ept this Li
ense. Therefore,
by modifying or distributing the Program (or any work based on the Program), you
indi
ate your a
eptan
e of this Li
ense to do so, and all its terms and
onditions for
opying, distributing or modifying the Program or works based on it.
394
6. Ea
h time you redistribute the Program (or any work based on the Program), the
re
ipient automati
ally re
eives a li
ense from the original li
ensor to
opy, distribute
or modify the Program subje
t to these terms and
onditions. You may not impose
any further restri
tions on the re
ipients' exer
ise of the rights granted herein. You are
not responsible for enfor
ing
omplian
e by third parties to this Li
ense.
7. If, as a
onsequen
e of a
ourt judgment or allegation of patent infringement or for any
other reason (not limited to patent issues),
onditions are imposed on you (whether by
ourt order, agreement or otherwise) that
ontradi
t the
onditions of this Li
ense, they
do not ex
use you from the
onditions of this Li
ense. If you
annot distribute so as
to satisfy simultaneously your obligations under this Li
ense and any other pertinent
obligations, then as a
onsequen
e you may not distribute the Program at all. For
example, if a patent li
ense would not permit royalty-free redistribution of the Program
by all those who re
eive
opies dire
tly or indire
tly through you, then the only way
you
ould satisfy both it and this Li
ense would be to refrain entirely from distribution
of the Program.
If any portion of this se
tion is held invalid or unenfor
eable under any parti
ular
ir
umstan
e, the balan
e of the se
tion is intended to apply and the se
tion as a
whole is intended to apply in other
ir
umstan
es.
It is not the purpose of this se
tion to indu
e you to infringe any patents or other
property right
laims or to
ontest validity of any su
h
laims; this se
tion has the
sole purpose of prote
ting the integrity of the free software distribution system, whi
h
is implemented by publi
li
ense pra
ti
es. Many people have made generous
ontributions to the wide range of software distributed through that system in relian
e on
onsistent appli
ation of that system; it is up to the author/donor to de
ide if he or
she is willing to distribute software through any other system and a li
ensee
annot
impose that
hoi
e.
This se
tion is intended to make thoroughly
lear what is believed to be a
onsequen
e
of the rest of this Li
ense.
8. If the distribution and/or use of the Program is restri
ted in
ertain
ountries either
by patents or by
opyrighted interfa
es, the original
opyright holder who pla
es the
Program under this Li
ense may add an expli
it geographi
al distribution limitation
ex
luding those
ountries, so that distribution is permitted only in or among
ountries
not thus ex
luded. In su
h
ase, this Li
ense in
orporates the limitation as if written
in the body of this Li
ense.
9. The Free Software Foundation may publish revised and/or new versions of the General
Publi
Li
ense from time to time. Su
h new versions will be similar in spirit to the
present version, but may dier in detail to address new problems or
on
erns.
Ea
h version is given a distinguishing version number. If the Program spe
ies a
version number of this Li
ense whi
h applies to it and \any later version", you have
the option of following the terms and
onditions either of that version or of any later
version published by the Free Software Foundation. If the Program does not spe
ify a
version number of this Li
ense, you may
hoose any version ever published by the Free
Software Foundation.
10. If you wish to in
orporate parts of the Program into other free programs whose distribution
onditions are dierent, write to the author to ask for permission. For software
395
whi
h is
opyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make ex
eptions for this. Our de
ision will be guided by the two
goals of preserving the free status of all derivatives of our free software and of promoting
the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \AS
IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST
OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO
MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED
ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT
LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
396
Also add information on how to
onta
t you by ele
troni
and paper mail.
If the program is intera
tive, make it output a short noti
e like this when it starts in an
intera
tive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision
omes with ABSOLUTELY NO WARRANTY; for details
type `show w'.
This is free software, and you are wel
ome to redistribute it
under
ertain
onditions; type `show
' for details.
The hypotheti
al
ommands `show w' and `show
' should show the appropriate parts of
the General Publi
Li
ense. Of
ourse, the
ommands you use may be
alled something
other than `show w' and `show
'; they
ould even be mouse-
li
ks or menu items|whatever
suits your program.
You should also get your employer (if you work as a programmer) or your s
hool, if any,
to sign a \
opyright dis
laimer" for the program, if ne
essary. Here is a sample; alter the
names:
Yoyodyne, In
., hereby dis
laims all
opyright interest in the program
`Gnomovision' (whi
h makes passes at
ompilers) written by James Ha
ker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vi
e
This General Publi
Li
ense does not permit in
orporating your program into proprietary
programs. If your program is a subroutine library, you may
onsider it more useful to permit
linking proprietary appli
ations with the library. If this is what you want to do, use the
GNU Library General Publi
Li
ense instead of this Li
ense.
397
398
under this Li
ense. If a se
tion does not t the above denition of Se
ondary then it is
not allowed to be designated as Invariant. The Do
ument may
ontain zero Invariant
Se
tions. If the Do
ument does not identify any Invariant Se
tions then there are none.
The \Cover Texts" are
ertain short passages of text that are listed, as Front-Cover
Texts or Ba
k-Cover Texts, in the noti
e that says that the Do
ument is released under
this Li
ense. A Front-Cover Text may be at most 5 words, and a Ba
k-Cover Text may
be at most 25 words.
A \Transparent"
opy of the Do
ument means a ma
hine-readable
opy, represented
in a format whose spe
i
ation is available to the general publi
, that is suitable for
revising the do
ument straightforwardly with generi
text editors or (for images
omposed of pixels) generi
paint programs or (for drawings) some widely available drawing
editor, and that is suitable for input to text formatters or for automati
translation to
a variety of formats suitable for input to text formatters. A
opy made in an otherwise
Transparent le format whose markup, or absen
e of markup, has been arranged to
thwart or dis
ourage subsequent modi
ation by readers is not Transparent. An image
format is not Transparent if used for any substantial amount of text. A
opy that is
not \Transparent" is
alled \Opaque".
Examples of suitable formats for Transparent
opies in
lude plain as
ii without
markup, Texinfo input format, LaTEX input format, SGML or XML using a publi
ly
available DTD, and standard-
onforming simple HTML, PostS
ript or PDF designed
for human modi
ation. Examples of transparent image formats in
lude PNG, XCF
and JPG. Opaque formats in
lude proprietary formats that
an be read and edited
only by proprietary word pro
essors, SGML or XML for whi
h the DTD and/or
pro
essing tools are not generally available, and the ma
hine-generated HTML,
PostS
ript or PDF produ
ed by some word pro
essors for output purposes only.
The \Title Page" means, for a printed book, the title page itself, plus su
h following
pages as are needed to hold, legibly, the material this Li
ense requires to appear in the
title page. For works in formats whi
h do not have any title page as su
h, \Title Page"
means the text near the most prominent appearan
e of the work's title, pre
eding the
beginning of the body of the text.
A se
tion \Entitled XYZ" means a named subunit of the Do
ument whose title either
is pre
isely XYZ or
ontains XYZ in parentheses following text that translates XYZ in
another language. (Here XYZ stands for a spe
i
se
tion name mentioned below, su
h
as \A
knowledgements", \Dedi
ations", \Endorsements", or \History".) To \Preserve
the Title" of su
h a se
tion when you modify the Do
ument means that it remains a
se
tion \Entitled XYZ" a
ording to this denition.
The Do
ument may in
lude Warranty Dis
laimers next to the noti
e whi
h states that
this Li
ense applies to the Do
ument. These Warranty Dis
laimers are
onsidered to
be in
luded by referen
e in this Li
ense, but only as regards dis
laiming warranties:
any other impli
ation that these Warranty Dis
laimers may have is void and has no
ee
t on the meaning of this Li
ense.
2. VERBATIM COPYING
You may
opy and distribute the Do
ument in any medium, either
ommer
ially or
non
ommer
ially, provided that this Li
ense, the
opyright noti
es, and the li
ense
noti
e saying this Li
ense applies to the Do
ument are reprodu
ed in all
opies, and
399
that you add no other
onditions whatsoever to those of this Li
ense. You may not use
te
hni
al measures to obstru
t or
ontrol the reading or further
opying of the
opies
you make or distribute. However, you may a
ept
ompensation in ex
hange for
opies.
If you distribute a large enough number of
opies you must also follow the
onditions
in se
tion 3.
You may also lend
opies, under the same
onditions stated above, and you may publi
ly
display
opies.
3. COPYING IN QUANTITY
If you publish printed
opies (or
opies in media that
ommonly have printed
overs) of
the Do
ument, numbering more than 100, and the Do
ument's li
ense noti
e requires
Cover Texts, you must en
lose the
opies in
overs that
arry,
learly and legibly, all
these Cover Texts: Front-Cover Texts on the front
over, and Ba
k-Cover Texts on
the ba
k
over. Both
overs must also
learly and legibly identify you as the publisher
of these
opies. The front
over must present the full title with all words of the title
equally prominent and visible. You may add other material on the
overs in addition.
Copying with
hanges limited to the
overs, as long as they preserve the title of the
Do
ument and satisfy these
onditions,
an be treated as verbatim
opying in other
respe
ts.
If the required texts for either
over are too voluminous to t legibly, you should put
the rst ones listed (as many as t reasonably) on the a
tual
over, and
ontinue the
rest onto adja
ent pages.
If you publish or distribute Opaque
opies of the Do
ument numbering more than 100,
you must either in
lude a ma
hine-readable Transparent
opy along with ea
h Opaque
opy, or state in or with ea
h Opaque
opy a
omputer-network lo
ation from whi
h
the general network-using publi
has a
ess to download using publi
-standard network
proto
ols a
omplete Transparent
opy of the Do
ument, free of added material. If
you use the latter option, you must take reasonably prudent steps, when you begin
distribution of Opaque
opies in quantity, to ensure that this Transparent
opy will
remain thus a
essible at the stated lo
ation until at least one year after the last time
you distribute an Opaque
opy (dire
tly or through your agents or retailers) of that
edition to the publi
.
It is requested, but not required, that you
onta
t the authors of the Do
ument well
before redistributing any large number of
opies, to give them a
han
e to provide you
with an updated version of the Do
ument.
4. MODIFICATIONS
You may
opy and distribute a Modied Version of the Do
ument under the
onditions
of se
tions 2 and 3 above, provided that you release the Modied Version under pre
isely
this Li
ense, with the Modied Version lling the role of the Do
ument, thus li
ensing
distribution and modi
ation of the Modied Version to whoever possesses a
opy of
it. In addition, you must do these things in the Modied Version:
A. Use in the Title Page (and on the
overs, if any) a title distin
t from that of the
Do
ument, and from those of previous versions (whi
h should, if there were any,
be listed in the History se
tion of the Do
ument). You may use the same title as
a previous version if the original publisher of that version gives permission.
400
B. List on the Title Page, as authors, one or more persons or entities responsible for
authorship of the modi
ations in the Modied Version, together with at least ve
of the prin
ipal authors of the Do
ument (all of its prin
ipal authors, if it has fewer
than ve), unless they release you from this requirement.
C. State on the Title page the name of the publisher of the Modied Version, as the
publisher.
D. Preserve all the
opyright noti
es of the Do
ument.
E. Add an appropriate
opyright noti
e for your modi
ations adja
ent to the other
opyright noti
es.
F. In
lude, immediately after the
opyright noti
es, a li
ense noti
e giving the publi
permission to use the Modied Version under the terms of this Li
ense, in the form
shown in the Addendum below.
G. Preserve in that li
ense noti
e the full lists of Invariant Se
tions and required Cover
Texts given in the Do
ument's li
ense noti
e.
H. In
lude an unaltered
opy of this Li
ense.
I. Preserve the se
tion Entitled \History", Preserve its Title, and add to it an item
stating at least the title, year, new authors, and publisher of the Modied Version
as given on the Title Page. If there is no se
tion Entitled \History" in the Do
ument,
reate one stating the title, year, authors, and publisher of the Do
ument
as given on its Title Page, then add an item des
ribing the Modied Version as
stated in the previous senten
e.
J. Preserve the network lo
ation, if any, given in the Do
ument for publi
a
ess to
a Transparent
opy of the Do
ument, and likewise the network lo
ations given in
the Do
ument for previous versions it was based on. These may be pla
ed in the
\History" se
tion. You may omit a network lo
ation for a work that was published
at least four years before the Do
ument itself, or if the original publisher of the
version it refers to gives permission.
K. For any se
tion Entitled \A
knowledgements" or \Dedi
ations", Preserve the Title
of the se
tion, and preserve in the se
tion all the substan
e and tone of ea
h of the
ontributor a
knowledgements and/or dedi
ations given therein.
L. Preserve all the Invariant Se
tions of the Do
ument, unaltered in their text and
in their titles. Se
tion numbers or the equivalent are not
onsidered part of the
se
tion titles.
M. Delete any se
tion Entitled \Endorsements". Su
h a se
tion may not be in
luded
in the Modied Version.
N. Do not retitle any existing se
tion to be Entitled \Endorsements" or to
on
i
t in
title with any Invariant Se
tion.
O. Preserve any Warranty Dis
laimers.
If the Modied Version in
ludes new front-matter se
tions or appendi
es that qualify
as Se
ondary Se
tions and
ontain no material
opied from the Do
ument, you may at
your option designate some or all of these se
tions as invariant. To do this, add their
titles to the list of Invariant Se
tions in the Modied Version's li
ense noti
e. These
titles must be distin
t from any other se
tion titles.
401
You may add a se
tion Entitled \Endorsements", provided it
ontains nothing but
endorsements of your Modied Version by various parties|for example, statements of
peer review or that the text has been approved by an organization as the authoritative
denition of a standard.
You may add a passage of up to ve words as a Front-Cover Text, and a passage of up
to 25 words as a Ba
k-Cover Text, to the end of the list of Cover Texts in the Modied
Version. Only one passage of Front-Cover Text and one of Ba
k-Cover Text may be
added by (or through arrangements made by) any one entity. If the Do
ument already
in
ludes a
over text for the same
over, previously added by you or by arrangement
made by the same entity you are a
ting on behalf of, you may not add another; but
you may repla
e the old one, on expli
it permission from the previous publisher that
added the old one.
The author(s) and publisher(s) of the Do
ument do not by this Li
ense give permission
to use their names for publi
ity for or to assert or imply endorsement of any Modied
Version.
5. COMBINING DOCUMENTS
You may
ombine the Do
ument with other do
uments released under this Li
ense,
under the terms dened in se
tion 4 above for modied versions, provided that you
in
lude in the
ombination all of the Invariant Se
tions of all of the original do
uments,
unmodied, and list them all as Invariant Se
tions of your
ombined work in its li
ense
noti
e, and that you preserve all their Warranty Dis
laimers.
The
ombined work need only
ontain one
opy of this Li
ense, and multiple identi
al
Invariant Se
tions may be repla
ed with a single
opy. If there are multiple Invariant
Se
tions with the same name but dierent
ontents, make the title of ea
h su
h se
tion
unique by adding at the end of it, in parentheses, the name of the original author or
publisher of that se
tion if known, or else a unique number. Make the same adjustment
to the se
tion titles in the list of Invariant Se
tions in the li
ense noti
e of the
ombined
work.
In the
ombination, you must
ombine any se
tions Entitled \History" in the various original do
uments, forming one se
tion Entitled \History"; likewise
ombine any
se
tions Entitled \A
knowledgements", and any se
tions Entitled \Dedi
ations". You
must delete all se
tions Entitled \Endorsements."
6. COLLECTIONS OF DOCUMENTS
You may make a
olle
tion
onsisting of the Do
ument and other do
uments released
under this Li
ense, and repla
e the individual
opies of this Li
ense in the various
do
uments with a single
opy that is in
luded in the
olle
tion, provided that you
follow the rules of this Li
ense for verbatim
opying of ea
h of the do
uments in all
other respe
ts.
You may extra
t a single do
ument from su
h a
olle
tion, and distribute it individually under this Li
ense, provided you insert a
opy of this Li
ense into the extra
ted
do
ument, and follow this Li
ense in all other respe
ts regarding verbatim
opying of
that do
ument.
7. AGGREGATION WITH INDEPENDENT WORKS
A
ompilation of the Do
ument or its derivatives with other separate and independent
do
uments or works, in or on a volume of a storage or distribution medium, is
alled
402
an \aggregate" if the
opyright resulting from the
ompilation is not used to limit the
legal rights of the
ompilation's users beyond what the individual works permit. When
the Do
ument is in
luded an aggregate, this Li
ense does not apply to the other works
in the aggregate whi
h are not themselves derivative works of the Do
ument.
If the Cover Text requirement of se
tion 3 is appli
able to these
opies of the Do
ument,
then if the Do
ument is less than one half of the entire aggregate, the Do
ument's Cover
Texts may be pla
ed on
overs that bra
ket the Do
ument within the aggregate, or the
ele
troni
equivalent of
overs if the Do
ument is in ele
troni
form. Otherwise they
must appear on printed
overs that bra
ket the whole aggregate.
8. TRANSLATION
Translation is
onsidered a kind of modi
ation, so you may distribute translations
of the Do
ument under the terms of se
tion 4. Repla
ing Invariant Se
tions with
translations requires spe
ial permission from their
opyright holders, but you may
in
lude translations of some or all Invariant Se
tions in addition to the original versions
of these Invariant Se
tions. You may in
lude a translation of this Li
ense, and all the
li
ense noti
es in the Do
ument, and any Warrany Dis
laimers, provided that you
also in
lude the original English version of this Li
ense and the original versions of
those noti
es and dis
laimers. In
ase of a disagreement between the translation and
the original version of this Li
ense or a noti
e or dis
laimer, the original version will
prevail.
If a se
tion in the Do
ument is Entitled \A
knowledgements", \Dedi
ations", or \History", the requirement (se
tion 4) to Preserve its Title (se
tion 1) will typi
ally require
hanging the a
tual title.
9. TERMINATION
You may not
opy, modify, subli
ense, or distribute the Do
ument ex
ept as expressly
provided for under this Li
ense. Any other attempt to
opy, modify, subli
ense or
distribute the Do
ument is void, and will automati
ally terminate your rights under
this Li
ense. However, parties who have re
eived
opies, or rights, from you under this
Li
ense will not have their li
enses terminated so long as su
h parties remain in full
omplian
e.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of the GNU Free
Do
umentation Li
ense from time to time. Su
h new versions will be similar in spirit
to the present version, but may dier in detail to address new problems or
on
erns.
See http://www.gnu.org/
opyleft/.
Ea
h version of the Li
ense is given a distinguishing version number. If the Do
ument
spe
ies that a parti
ular numbered version of this Li
ense \or any later version"
applies to it, you have the option of following the terms and
onditions either of that
spe
ied version or of any later version that has been published (not as a draft) by
the Free Software Foundation. If the Do
ument does not spe
ify a version number of
this Li
ense, you may
hoose any version ever published (not as a draft) by the Free
Software Foundation.
403
If you have Invariant Se
tions, Front-Cover Texts and Ba
k-Cover Texts, repla
e the
\with...Texts." line with this:
with the Invariant Se
tions being list their titles, with
the Front-Cover Texts being list, and with the Ba
k-Cover Texts
being list.
If you have Invariant Se
tions without Cover Texts, or some other
ombination of the
three, merge those two alternatives to suit the situation.
If your do
ument
ontains nontrivial examples of program
ode, we re
ommend releasing
these examples in parallel under your
hoi
e of free software li
ense, su
h as the GNU
General Publi
Li
ense, to permit their use in free software.
404
405
Contributors to GCC
The GCC proje
t would like to thank its many
ontributors. Without them the proje
t
would not have been nearly as su
essful as it has been. Any omissions in this list are
a
idental. Feel free to
onta
t lawredhat.
om or geraldpfeifer.
om if you have been
left out or some of your
ontributions are not listed. Please keep this list in alphabeti
al
order.
Analog Devi
es helped implement the support for
omplex data types and iterators.
John David Anglin for threading-related xes and improvements to libstd
++-v3, and
the HP-UX port.
James van Artsdalen wrote the
ode that makes e
ient use of the Intel 80387 register
sta
k.
Abramo and Roberto Bagnara for the SysV68 Motorola 3300 Delta Series port.
Alasdair Baird for various bug xes.
Giovanni Bajo for analyzing lots of
ompli
ated C++ problem reports.
Peter Barada for his work to improve
ode generation for new ColdFire
ores.
Gerald Baumgartner added the signature extension to the C++ front end.
Godmar Ba
k for his Java improvements and en
ouragement.
S
ott Bambrough for help porting the Java
ompiler.
Wolfgang Bangerth for pro
essing tons of bug reports.
Jon Beniston for his Mi
rosoft Windows port of Java.
Daniel Berlin for better DWARF2 support, faster/better optimizations, improved alias
analysis, plus migrating GCC to Bugzilla.
Geo Berry for his Java obje
t serialization work and various pat
hes.
Eri
Blake for helping to make GCJ and libg
j
onform to the spe
i
ations.
Janne Blomqvist for
ontributions to gfortran.
Segher Boessenkool for various xes.
Hans-J. Boehm for his garbage
olle
tor, IA-64 lib port, and other Java work.
Neil Booth for work on
pplib, lang hooks, debug hooks and other mis
ellaneous
leanups.
Steven Boss
her for integrating the gfortran front end into GCC and for
ontributing
to the tree-ssa bran
h.
Eri
Bot
azou for xing middle- and ba
kend bugs left and right.
Per Bothner for his dire
tion via the steering
ommittee and various improvements
to the infrastru
ture for supporting new languages. Chill front end implementation.
Initial implementations of
pplib, x-header,
ong.guess, libio, and past C++ library
(libg++) maintainer. Dreaming up, designing and implementing mu
h of GCJ.
Devon Bowen helped port GCC to the Tahoe.
Don Bowman for mips-vxworks
ontributions.
Dave Brolley for work on
pplib and Chill.
Paul Brook for work on the ARM ar
hite
ture and maintaining gfortran.
406
407
Gabriel Dos Reis for
ontributions to G++,
ontributions and maintenan
e of GCC
diagnosti
s infrastru
ture, libstd
++-v3, in
luding valarray<>,
omplex<>, maintaining the numeri
s library (in
luding that pesky <limits> :-) and keeping up-to-date
anything to do with numbers.
Ulri
h Drepper for his work on glib
, testing of GCC using glib
, ISO C99 support,
CFG dumping support, et
., plus support of the C++ runtime libraries in
luding for all
kinds of C interfa
e issues,
ontributing and maintaining
omplex<>, sanity
he
king
and disbursement,
onguration ar
hite
ture, libio maintenan
e, and early math work.
Zdenek Dvorak for a new loop unroller and various xes.
Ri
hard Earnshaw for his ongoing work with the ARM.
David Edelsohn for his dire
tion via the steering
ommittee, ongoing work with the
RS6000/PowerPC port, help
leaning up Haifa loop
hanges, doing the entire AIX
port of libstd
++ with his bare hands, and for ensuring GCC properly keeps working
on AIX.
Kevin Ediger for the
oating point formatting of num put::do put in libstd
++.
Phil Edwards for libstd
++ work in
luding
onguration ha
kery, do
umentation maintainer,
hief breaker of the web pages, the o
asional iostream bug x, and work on
shared library symbol versioning.
Paul Eggert for random ha
king all over GCC.
Mark Elbre
ht for various DJGPP improvements, and for libstd
++
onguration support for lo
ales and fstream-related xes.
Vadim Egorov for libstd
++ xes in strings, streambufs, and iostreams.
Christian Ehrhardt for dealing with bug reports.
Ben Elliston for his work to move the Obje
tive-C runtime into its own subdire
tory
and for his work on auto
onf.
Mar
Espie for OpenBSD support.
Doug Evans for mu
h of the global optimization framework, ar
, m32r, and SPARC
work.
Christopher Faylor for his work on the Cygwin port and for
aring and feeding the
g
.gnu.org box and saving its users tons of spam.
Fred Fish for BeOS support and Ada xes.
Ivan Fontes Gar
ia for the Portuguese translation of the GCJ FAQ.
Peter Gerwinski for various bug xes and the Pas
al front end.
Kaveh Ghazi for his dire
tion via the steering
ommittee, amazing work to make `-W
-Wall' useful, and
ontinuously testing GCC on a plethora of platforms.
John Gilmore for a donation to the FSF earmarked improving GNU Java.
Judy Goldberg for
++
ontributions.
Torbjorn Granlund for various xes and the
-torture testsuite, multiply- and divideby-
onstant optimization, improved long long support, improved leaf fun
tion register
allo
ation, and his dire
tion via the steering
ommittee.
Anthony Green for his `-Os'
ontributions and Java front end work.
Stu Grossman for gdb ha
king, allowing GCJ developers to debug Java
ode.
408
409
410
Martin von Lowis for internal
onsisten
y
he
king infrastru
ture, various C++ improvements in
luding namespa
e support, and tons of assistan
e with libstd
++/
ompiler
merges.
H.J. Lu for his previous
ontributions to the steering
ommittee, many x86 bug reports,
prototype pat
hes, and keeping the GNU/Linux ports working.
Greg M
Gary for random xes and (someday) bounded pointers.
Andrew Ma
Leod for his ongoing work in building a real EH system, various
ode
generation improvements, work on the global optimizer, et
.
Vladimir Makarov for ha
king some ugly i960 problems, PowerPC ha
king improvements to
ompile-time performan
e, overall knowledge and dire
tion in the area of
instru
tion s
heduling, and design and implementation of the automaton based instru
tion s
heduler.
Bob Manson for his behind the s
enes work on dejagnu.
Philip Martin for lots of libstd
++ string and ve
tor iterator xes and improvements,
and string
lean up and testsuites.
All of the Mauve proje
t
ontributors, for Java test
ode.
Bry
e M
Kinlay for numerous GCJ and libg
j xes and improvements.
Adam Mega
z for his work on the Mi
rosoft Windows port of GCJ.
Mi
hael Meissner for LRS framework, ia32, m32r, v850, m88k, MIPS, powerp
, haifa,
ECOFF debug support, and other assorted ha
king.
Jason Merrill for his dire
tion via the steering
ommittee and leading the G++ eort.
David Miller for his dire
tion via the steering
ommittee, lots of SPARC work, improvements in jump.
and interfa
ing with the Linux kernel developers.
Gary Miller ported GCC to Charles River Data Systems ma
hines.
Alfred Minarik for libstd
++ string and ios bug xes, and turning the entire libstd
++
testsuite namespa
e-
ompatible.
Mark Mit
hell for his dire
tion via the steering
ommittee, mountains of C++ work,
load/store hoisting out of loops, alias analysis improvements, ISO C restri
t support,
and serving as release manager for GCC 3.x.
Alan Modra for various GNU/Linux bits and testing.
Toon Moene for his dire
tion via the steering
ommittee, Fortran maintenan
e, and his
ongoing work to make us make Fortran run fast.
Jason Molenda for major help in the
are and feeding of all the servi
es on the
g
.gnu.org (formerly eg
s.
ygnus.
om) ma
hine|mail, web servi
es, ftp servi
es, et
et
. Doing all this work on s
rap paper and the ba
ks of envelopes would have been. . .
di
ult.
Catherine Moore for xing various ugly problems we have sent her way, in
luding the
haifa bug whi
h was killing the Alpha & PowerPC Linux kernels.
Mike Moreton for his various Java pat
hes.
David Mosberger-Tang for various Alpha improvements, and for the initial IA-64 port.
Stephen Moshier
ontributed the
oating point emulator that assists in
ross
ompilation and permits support for
oating point numbers wider than 64 bits and
for ISO C99 support.
411
Bill Moyer for his behind the s
enes work on various issues.
Philippe De Muyter for his work on the m68k port.
Joseph S. Myers for his work on the PDP-11 port, format
he
king and ISO C99
support, and
ontinuous emphasis on (and
ontributions to) do
umentation.
Nathan Myers for his work on libstd
++-v3: ar
hite
ture and authorship through the
rst three snapshots, in
luding implementation of lo
ale infrastru
ture, string, shadow
C headers, and the initial proje
t do
umentation (DESIGN, CHECKLIST, and so
forth). Later, more work on MT-safe string and shadow headers.
Felix Natter for do
umentation on porting libstd
++.
Nathanael Nerode for
leaning up the
onguration/build pro
ess.
NeXT, In
. donated the front end that supports the Obje
tive-C language.
Hans-Peter Nilsson for the CRIS and MMIX ports, improvements to the sear
h engine
setup, various do
umentation xes and other small xes.
Geo Noer for his work on getting
ygwin native builds working.
Diego Novillo for his SPEC performan
e tra
king web pages and assorted xes in the
middle end and various ba
k ends.
David O'Brien for the FreeBSD/alpha, FreeBSD/AMD x86-64, FreeBSD/ARM,
FreeBSD/PowerPC, and FreeBSD/SPARC64 ports and related infrastru
ture
improvements.
Alexandre Oliva for various build infrastru
ture improvements, s
ripts and amazing
testing work, in
luding keeping libtool issues sane and happy.
Stefan Olsson for work on mt allo
.
Melissa O'Neill for various NeXT xes.
Rainer Orth for random MIPS work, in
luding improvements to GCC's o32 ABI support, improvements to dejagnu's MIPS support, Java
onguration
lean-ups and porting work, et
.
Hartmut Penner for work on the s390 port.
Paul Petersen wrote the ma
hine des
ription for the Alliant FX/8.
Alexandre Petit-Bian
o for implementing mu
h of the Java
ompiler and
ontinued
Java maintainership.
Matthias Pfaller for major improvements to the NS32k port.
Gerald Pfeifer for his dire
tion via the steering
ommittee, pointing out lots of problems
we need to solve, maintenan
e of the web pages, and taking
are of do
umentation
maintenan
e in general.
Andrew Pinski for pro
essing bug reports by the dozen.
Ovidiu Predes
u for his work on the Obje
tive-C front end and runtime libraries.
Jerry Quinn for major performan
e improvements in C++ formatted I/O.
Ken Raeburn for various improvements to
he
ker, MIPS ports and various
leanups
in the
ompiler.
Rolf W. Rasmussen for ha
king on AWT.
David Reese of Sun Mi
rosystems
ontributed to the Solaris on PowerPC port.
412
413
Franz Sirl for his ongoing work with making the PPC port stable for GNU/Linux.
Andrey Slepuhin for assorted AIX ha
king.
Christopher Smith did the port for Convex ma
hines.
Danny Smith for his major eorts on the Mingw (and Cygwin) ports.
Randy Smith nished the Sun FPA support.
S
ott Snyder for queue, iterator, istream, and string xes and libstd
++ testsuite entries. Also for providing the pat
h to G77 to add rudimentary support for INTEGER*1,
INTEGER*2, and LOGICAL*1.
Brad Spen
er for
ontributions to the GLIBCPP FORCE NEW te
hnique.
Ri
hard Stallman, for writing the original GCC and laun
hing the GNU proje
t.
Jan Stein of the Chalmers Computer So
iety provided support for Genix, as well as
part of the 32000 ma
hine des
ription.
Nigel Stephens for various mips16 related xes/improvements.
Jonathan Stone wrote the ma
hine des
ription for the Pyramid
omputer.
Graham Stott for various infrastru
ture improvements.
John Stra
ke for his Java HTTP proto
ol xes.
Mike Stump for his Elxsi port, G++
ontributions over the years and more re
ently his
vxworks
ontributions
Je Sturm for Java porting help, bug xes, and en
ouragement.
Shigeya Suzuki for this xes for the bsdi platforms.
Ian Lan
e Taylor for his mips16 work, general
ongury ha
king, xin
ludes, et
.
Holger Teuts
h provided the support for the Clipper CPU.
Gary Thomas for his ongoing work to make the PPC work for GNU/Linux.
Philipp Thomas for random bug xes throughout the
ompiler
Jason Thorpe for thread support in libstd
++ on NetBSD.
Kresten Krab Thorup wrote the run time support for the Obje
tive-C language and
the fantasti
Java byte
ode interpreter.
Mi
hael Tiemann for random bug xes, the rst instru
tion s
heduler, initial C++
support, fun
tion integration, NS32k, SPARC and M88k ma
hine des
ription work,
delay slot s
heduling.
Andreas Tobler for his work porting libg
j to Darwin.
Teemu Torma for thread safe ex
eption handling support.
Leonard Tower wrote parts of the parser, RTL generator, and RTL denitions, and of
the VAX ma
hine des
ription.
Tom Tromey for internationalization support and for his many Java
ontributions and
libg
j maintainership.
Lassi Tuura for improvements to
ong.guess to determine HP pro
essor types.
Petter Urkedal for libstd
++ CXXFLAGS, math, and algorithms xes.
Andy Vaught for the design and initial implementation of the gfortran front end.
Brent Verner for work with the libstd
++
shadow les and their asso
iated
ongure
steps.
414
Cyrille Comar
Cyrille Crozes
Robert Dewar
Gary Dismukes
Robert Du
Ed Falis
Ramon Fernandez
Sam Figueroa
Vasiliy Fofanov
Mi
hael Friess
Fran
o Gasperoni
Ted Giering
Matthew Gingell
Laurent Guerby
Jerome Guitton
Olivier Hainque
Jerome Hugues
Hristian Kirt
hev
Jerome Lambourg
Bruno Le
ler
Albert Lee
Sean M
Neil
Javier Miranda
Laurent Nana
Pas
al Obry
Dong-Ik Oh
Laurent Pautet
Brett Porter
Thomas Quinot
Ni
olas Ro
he
Pat Rogers
Jose Ruiz
Douglas Rupp
Sergey Rybin
Gail S
henker
Ed S
honberg
Ni
olas Setton
Samuel Tardieu
415
416
In addition to the above, all of whi
h also
ontributed time and energy in testing GCC,
we would like to thank the following for their
ontributions to testing:
Mi
hael Abd-El-Malek
Thomas Arend
Bonzo Armstrong
Steven Ashe
Chris Baldwin
David Billinghurst
Jim Blandy
Stephane Bortzmeyer
Horst von Brand
Frank Braun
Rodney Brown
Sidney Cadot
Bradford Castalia
Jonathan Corbet
Ralph Don
aster
Ri
hard Emberson
Levente Farkas
Graham Faw
ett
Mark Fernyhough
Robert A. Fren
h
Jorgen Freyh
Mark K. Gardner
Charles-Antoine Gauthier
Yung Shing Gene
David Gilbert
Simon Gornall
Fred Gray
John Grin
Patrik Hagglund
Phil Hargett
Aman
io Hasty
Takafumi Hayashi
Bryan W. Headley
Kevin B. Hendri
ks
Joep Jansen
Christian Joensson
Mi
hel Kern
David Kidd
Tobias Kuipers
Anand Krishnaswamy
A. O. V. Le Blan
llewelly
Damon Love
Brad Lu
ier
Matthias Klose
Martin Knoblau
h
Ri
k Lutowski
Jesse Ma
nish
Stefan Morrell
Anon A. Mous
Matthias Mueller
Pekka Nikander
Ri
k Niles
Jon Olson
Magnus Persson
Chris Pollard
Ri
hard Polton
Derk Reefman
David Rees
Paul Reilly
Tom Reilly
Torsten Rueger
Danny Sadino
Mar
S
hifer
Erik S
hnetter
Wayne K. S
hroll
David S
huler
Vin Shelton
Tim Souder
Adam Sulmi
ki
Bill Thorson
George Talbot
Pedro A. M. Vazquez
Gregory Warnes
Ian Watson
David E. Young
417
418
And nally we'd like to thank everyone who uses the
ompiler, submits bug reports and
generally reminds us why we're doing this work in the rst pla
e.
419
Option Index
GCC's
ommand line options are indexed here without any initial `-' or `--'. Where an
option has both positive and negative forms (su
h as `-foption ' and `-fno-option '), relevant entries in the manual are indexed under the most appropriate form; it may sometimes
be useful to look up both forms.
### . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
all_load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
allowable_
lient . . . . . . . . . . . . . . . . . . . . . . . . . . 118
ansi . . . . . . . . . . . . . . . . . . . . . . . . . 5, 20, 92, 272, 377
ar
h_errors_fatal . . . . . . . . . . . . . . . . . . . . . . . . . 117
aux-info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
b ..........................................
B ..........................................
b
opy-builtin . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
bind_at_load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
bundle_loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
108
100
154
117
117
117
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 97
C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
lient_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
ombine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
ompatibility_version . . . . . . . . . . . . . . . . . . . . 118
rossjumping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
urrent_version . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
d ...........................................
D ...........................................
da . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
dA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
db . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
88
56
53
53
dB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
d
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
dC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
dd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
dD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 95
dE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dead_strip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
dependen
y-file . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
df . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
di . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
dj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
dm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55, 56
dM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55, 95
dn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
dN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55, 95
do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
dp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
dP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
dr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
dR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
ds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
dS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
dt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
dT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
dumpma
hine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
dumpspe
s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
dumpversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
dv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
dV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
dw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
dx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
dy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
dylib_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
dylinker_install_name . . . . . . . . . . . . . . . . . . . . 118
dynami
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
dz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
dZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 97
420
EB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109, 145
EL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109, 145
exported_symbols_list . . . . . . . . . . . . . . . . . . . . 118
fdump-rtl-life . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-loop2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-lreg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-ma
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-peephole2 . . . . . . . . . . . . . . . . . . . . . . . . 56
fdump-rtl-postreload . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-regmove . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-rnreg . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-s
hed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-s
hed2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-sibling . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-sms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-sta
k . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-tra
er . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-vartra
k . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-vpt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
fdump-translation-unit . . . . . . . . . . . . . . . . . . . . 56
fdump-tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
fdump-tree-alias . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
fdump-tree-
p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-
fg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-
opyrename . . . . . . . . . . . . . . . . . . . . . 59
fdump-tree-d
e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-dom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-dse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-forwprop . . . . . . . . . . . . . . . . . . . . . . . . 59
fdump-tree-fre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-gimple . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-mudflap . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-nrv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
fdump-tree-phiopt . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-pre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-sra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-ssa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-v
g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
fdump-tree-ve
t . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
fdump-unnumbered . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
feliminate-dwarf2-dups . . . . . . . . . . . . . . . . . . . . 51
feliminate-unused-debug-symbols . . . . . . . . . . . 50
feliminate-unused-debug-types . . . . . . . . . . . . . 61
fex
eptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
fexe
-
harset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
fexpensive-optimizations . . . . . . . . . . . . . . . . . . 69
ffast-math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
ffinite-math-only . . . . . . . . . . . . . . . . . . . . . . . . . . 77
ffix-and-
ontinue . . . . . . . . . . . . . . . . . . . . . . . . . 117
ffixed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
ffloat-store . . . . . . . . . . . . . . . . . . . . . . . . . . . 76, 370
ffor-s
ope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
ffor
e-addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
ffor
e-mem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
ffreestanding . . . . . . . . . . . . . . . . . . . . 6, 23, 36, 221
ffun
tion-se
tions . . . . . . . . . . . . . . . . . . . . . . . . . 80
fg
se . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
F . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
fabi-version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
falign-fun
tions . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
falign-jumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
falign-labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
falign-loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
fargument-alias . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
fargument-noalias . . . . . . . . . . . . . . . . . . . . . . . . . 183
fargument-noalias-global . . . . . . . . . . . . . . . . . 183
fasyn
hronous-unwind-tables . . . . . . . . . . . . . . 179
fbounds-
he
k . . . . . . . . . . . . . . . . . . . . . . . . . . 66, 178
fbran
h-probabilities . . . . . . . . . . . . . . . . . . . . . 79
fbran
h-target-load-optimize . . . . . . . . . . . . . . 81
fbran
h-target-load-optimize2 . . . . . . . . . . . . . 81
fbtr-bb-ex
lusive . . . . . . . . . . . . . . . . . . . . . . . . . . 81
f
all-saved . . . . . . . . . . . . . . . . . . . . . . . . . . . 181, 365
f
all-used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
f
aller-saves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
f
he
k-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
f
ommon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
f
ond-mismat
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
f
onserve-spa
e . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
f
onstant-string-
lass . . . . . . . . . . . . . . . . . . . . 31
f
se-follow-jumps . . . . . . . . . . . . . . . . . . . . . . . . . . 67
f
se-skip-blo
ks . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
f
x-limited-range . . . . . . . . . . . . . . . . . . . . . . . . . . 78
fdata-se
tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
fdelayed-bran
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
fdelete-null-pointer-
he
ks . . . . . . . . . . . . . . . 68
fdiagnosti
s-show-lo
ation . . . . . . . . . . . . . . . . 34
fdollars-in-identifiers . . . . . . . . . . . . . . . 94, 365
fdump-
lass-hierar
hy . . . . . . . . . . . . . . . . . . . . . 56
fdump-ipa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
fdump-rtl-all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
fdump-rtl-bbro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
fdump-rtl-bp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
fdump-rtl-btl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
fdump-rtl-bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-
e1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
fdump-rtl-
e2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
fdump-rtl-
e3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-
fg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-
ombine . . . . . . . . . . . . . . . . . . . . . . . . . . 53
fdump-rtl-
se . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-
se2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-dbr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
fdump-rtl-eh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-expand . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
fdump-rtl-flow2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
fdump-rtl-g
se . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-greg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fdump-rtl-jump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
fg
se-after-reload . . . . . . . . . . . . . . . . . . . . . . . . . 68
fg
se-las . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
fg
se-lm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
fg
se-sm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
fgnu-runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
fhosted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
filelist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
findire
t-data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
finhibit-size-dire
tive . . . . . . . . . . . . . . . . . . 180
finline-fun
tions . . . . . . . . . . . . . . . . . . . . . . . . . . 64
finline-limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
finput-
harset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
finstrument-fun
tions . . . . . . . . . . . . . . . . 182, 224
fkeep-inline-fun
tions . . . . . . . . . . . . . . . . 65, 243
fkeep-stati
-
onsts . . . . . . . . . . . . . . . . . . . . . . . . 65
flat_namespa
e . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
fleading-unders
ore . . . . . . . . . . . . . . . . . . . . . . . 183
floop-optimize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
floop-optimize2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
fmem-report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
fmessage-length . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
fmodulo-s
hed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
fmove-loop-invariants . . . . . . . . . . . . . . . . . . . . . 80
fms-extensions . . . . . . . . . . . . . . . . . . . . . 23, 26, 330
fmudflap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
fmudflapir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
fmudflapth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
fnext-runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
fno-a
ess-
ontrol . . . . . . . . . . . . . . . . . . . . . . . . . 24
fno-asm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
fno-bran
h-
ount-reg . . . . . . . . . . . . . . . . . . . . . . . 65
fno-builtin . . . . . . . . . . . . . . . . . . . . 22, 36, 221, 272
fno-
ommon . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180, 234
fno-
onst-strings . . . . . . . . . . . . . . . . . . . . . . . . . . 25
fno-
prop-registers . . . . . . . . . . . . . . . . . . . . . . . . 76
fno-
x-limited-range . . . . . . . . . . . . . . . . . . . . . . . 78
fno-default-inline . . . . . . . . . . . . . . . . . 27, 63, 243
fno-defer-pop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
fno-elide-
onstru
tors . . . . . . . . . . . . . . . . . . . . 25
fno-enfor
e-eh-spe
s . . . . . . . . . . . . . . . . . . . . . . . 25
fno-for-s
ope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
fno-fun
tion-
se . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
fno-gnu-keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
fno-guess-bran
h-probability . . . . . . . . . . . . . . 73
fno-ident . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
fno-implement-inlines . . . . . . . . . . . . . . . . . 26, 339
fno-impli
it-inline-templates . . . . . . . . . . . . . 26
fno-impli
it-templates . . . . . . . . . . . . . . . . 26, 340
fno-inline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
fno-math-errno . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
fno-nil-re
eivers . . . . . . . . . . . . . . . . . . . . . . . . . . 31
fno-nonansi-builtins . . . . . . . . . . . . . . . . . . . . . . . 26
fno-operator-names . . . . . . . . . . . . . . . . . . . . . . . . . 26
fno-optional-diags . . . . . . . . . . . . . . . . . . . . . . . . . 26
fno-peephole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
fno-peephole2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
fno-rtti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
fno-s
hed-interblo
k . . . . . . . . . . . . . . . . . . . . . . . 69
421
fno-s
hed-spe
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
fno-show-
olumn . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
fno-signed-bitfields . . . . . . . . . . . . . . . . . . . . . . . 24
fno-sta
k-limit . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
fno-threadsafe-stati
s . . . . . . . . . . . . . . . . . . . . 27
fno-trapping-math . . . . . . . . . . . . . . . . . . . . . . . . . . 77
fno-unsigned-bitfields . . . . . . . . . . . . . . . . . . . . 24
fno-weak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
fno-working-dire
tory . . . . . . . . . . . . . . . . . . . . . 94
fno-zero-initialized-in-bss . . . . . . . . . . . . . . . 66
fnon-
all-ex
eptions . . . . . . . . . . . . . . . . . . . . . . 179
fobj
-ex
eptions . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
fomit-frame-pointer . . . . . . . . . . . . . . . . . . . . . . . . 64
foptimize-register-move . . . . . . . . . . . . . . . . . . . 69
foptimize-sibling-
alls . . . . . . . . . . . . . . . . . . . 64
for
e_flat_namespa
e . . . . . . . . . . . . . . . . . . . . . . 118
fpa
k-stru
t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
fp
-stru
t-return . . . . . . . . . . . . . . . . . . . 179, 368
fp
h-deps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
fp
h-prepro
ess . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
fpeel-loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
fpermissive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
fpi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
fPIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
fpie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
fPIE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
fprefet
h-loop-arrays . . . . . . . . . . . . . . . . . . 73, 80
fprepro
essed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
fprofile-ar
s . . . . . . . . . . . . . . . . . . . . . . . . . . 51, 275
fprofile-generate . . . . . . . . . . . . . . . . . . . . . . . . . . 76
fprofile-use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
fprofile-values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
frandom-string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
freg-stru
t-return . . . . . . . . . . . . . . . . . . . . . . . . 179
fregmove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
frename-registers . . . . . . . . . . . . . . . . . . . . . . . . . . 79
freorder-blo
ks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
freorder-blo
ks-and-partition . . . . . . . . . . . . . 73
freorder-fun
tions . . . . . . . . . . . . . . . . . . . . . . . . . 73
frepla
e-obj
-
lasses . . . . . . . . . . . . . . . . . . . . . 33
frepo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26, 340
frerun-
se-after-loop . . . . . . . . . . . . . . . . . . . . . 67
frerun-loop-opt . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
frounding-math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
fs
hed-spe
-load . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
fs
hed-spe
-load-dangerous . . . . . . . . . . . . . . . . 70
fs
hed-stalled-insns . . . . . . . . . . . . . . . . . . . . . . . 70
fs
hed-stalled-insns-dep . . . . . . . . . . . . . . . . . . 70
fs
hed-verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
fs
hed2-use-superblo
ks . . . . . . . . . . . . . . . . . . . 70
fs
hed2-use-tra
es . . . . . . . . . . . . . . . . . . . . . . . . . 70
fs
hedule-insns . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
fs
hedule-insns2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
fs
heduling-in-modulo-s
heduled-loops . . . . 70
fshared-data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
fshort-double . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
fshort-enums . . . . . . . . . . . . . . . . . 179, 197, 239, 376
fshort-w
har . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
422
fsignaling-nans . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
fsigned-bitfields . . . . . . . . . . . . . . . . . . . . . 24, 376
fsigned-
har . . . . . . . . . . . . . . . . . . . . . . . . . . . 24, 194
fsingle-pre
ision-
onstant . . . . . . . . . . . . . . . . 78
fspe
ulative-prefet
hing . . . . . . . . . . . . . . . . . . 79
fsta
k-
he
k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
fsta
k-limit-register . . . . . . . . . . . . . . . . . . . . 183
fsta
k-limit-symbol . . . . . . . . . . . . . . . . . . . . . . . 183
fstats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
fstrength-redu
e . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
fstri
t-aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
fsyntax-only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
ftabstop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
ftemplate-depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
ftest-
overage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
fthread-jumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
ftime-report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
ftra
er . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72, 80
ftrapv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
ftree-based-profiling . . . . . . . . . . . . . . . . . . . . . 52
ftree-ve
torizer-verbose . . . . . . . . . . . . . . . . . . 59
funit-at-a-time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
funroll-all-loops . . . . . . . . . . . . . . . . . . . . . . 72, 80
funroll-loops . . . . . . . . . . . . . . . . . . . . . . 72, 80, 378
funsafe-math-optimizations . . . . . . . . . . . . . . . . 77
funsigned-bitfields . . . . . . . . . . . . . . . 24, 197, 376
funsigned-
har . . . . . . . . . . . . . . . . . . . . . . . . . 23, 194
funswit
h-loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
funwind-tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
fuse-
xa-atexit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
fvar-tra
king . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
fverbose-asm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
fvisibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
fvisibility-inlines-hidden . . . . . . . . . . . . . . . . 27
fvpt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
fweb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
fwide-exe
-
harset . . . . . . . . . . . . . . . . . . . . . . . . . 94
fworking-dire
tory . . . . . . . . . . . . . . . . . . . . . . . . . 94
fwrapv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
fzero-link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140, 147, 164, 173
g
off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
gdwarf-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
gen-de
ls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
ggdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
gnu-ld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
gstabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
gstabs+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
gvms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
gx
off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
gx
off+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
headerpad_max_install_names . . . . . . . . . . . . . . 118
help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 96
hp-ld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88, 100
I- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93, 101
idirafter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
if-
onversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
if-
onversion2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
ima
ros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
image_base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
in
lude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
install_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
iprefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
iquote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94, 100
isystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
iwithprefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
iwithprefixbefore . . . . . . . . . . . . . . . . . . . . . . . . . . 93
keep_private_externs . . . . . . . . . . . . . . . . . . . . . . 118
l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
lobj
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
m1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
m10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
m128bit-long-double . . . . . . . . . . . . . . . . . . . . . . . 134
m16-bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
m2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
m210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
m3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
m31 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
m32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137, 158, 172
m32-bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
m32032 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
m32081 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
m32332 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
m32381 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
m32532 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
m32r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
m32r2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
m32rx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
m340 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
m386 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
m3dnow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m3e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4-nofpu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4-single . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4-single-only . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m45 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m486 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4a-nofpu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4a-single . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4a-single-only . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4al . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m4byte-fun
tions . . . . . . . . . . . . . . . . . . . . . . . . . .
m5200 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m64 . . . . . . . . . . . . . . . . . . . . . . . . . . 137, 158, 166,
m68000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68020 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68020-40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68020-60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68030 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68040 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68060 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m6811 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m6812 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68881 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68h
11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68h
12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68h
s12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m68S12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m8-bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m96bit-long-double . . . . . . . . . . . . . . . . . . . . . . . .
mabi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi-mmixware . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=altive
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=eabi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=gnu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=n32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=no-altive
. . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=no-spe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=o64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi=spe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabi
alls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mabort-on-noreturn . . . . . . . . . . . . . . . . . . . . . . . .
mabshi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ma
0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ma
-4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ma
-8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ma
umulate-outgoing-args . . . . . . . . . . . . . . . .
mads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
maix-stru
t-return . . . . . . . . . . . . . . . . . . . . . . . .
maix32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
maix64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
malign-300 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
malign-double . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
423
135
167
168
167
167
167
154
154
132
168
168
168
168
168
144
141
172
141
141
141
142
141
141
141
143
143
141
143
143
143
143
115
134
109
151
146
146
162
146
151
146
162
157
146
157
146
111
154
154
125
125
136
163
162
158
158
127
133
malign-int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
malign-labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
malign-loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
malign-natural . . . . . . . . . . . . . . . . . . . . . . . . . . . .
malign-power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mallo
-
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
malpha-as . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
maltive
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mam33 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
maout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
map
s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
map
s-frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mapp-regs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169,
mar
h . . . . . . . . . . . 111, 114, 127, 130, 132, 145,
masm=diale
t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mauto-in
de
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mauto-pi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mba
k
hain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mbase-addresses . . . . . . . . . . . . . . . . . . . . . . . . . . .
mb
opy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mbig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161,
mbig-endian . . . . . . . . . . . . . . . . . . 110, 137, 145,
mbig-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mbig-swit
h . . . . . . . . . . . . . . . . . . . . . . . . . . . 127,
mbigtable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mbit-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mbitfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142,
mbk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mbran
h-
heap . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mbran
h-
ost=number . . . . . . . . . . . . . . . . . . . . . .
mbran
h-expensive . . . . . . . . . . . . . . . . . . . . . . . . .
mbran
h-likely . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mbran
h-predi
t . . . . . . . . . . . . . . . . . . . . . . . . . . .
mbuild-
onstants . . . . . . . . . . . . . . . . . . . . . . . . . .
mbwx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
68000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
68020 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
all-gnu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
all-linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
all-netbsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
all-prologues . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
all-solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
all-sysv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
all-sysv-eabi . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
all-sysv-noeabi . . . . . . . . . . . . . . . . . . . . . . . . .
m
allee-super-interworking . . . . . . . . . . . . . . .
m
aller-super-interworking . . . . . . . . . . . . . . .
m
allgraph-data . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
-init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
he
k-zero-division . . . . . . . . . . . . . . . . . . . . . .
m
irrus-fix-invalid-insns . . . . . . . . . . . . . . . .
m
ix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
model=embmedany . . . . . . . . . . . . . . . . . . . . . . . . .
m
model=kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
model=large . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
model=medany . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
model=medium . . . . . . . . . . . . . . . . . . . . . . . . . . . .
142
125
140
159
159
124
121
157
152
115
109
109
176
166
133
144
138
168
165
151
154
173
161
173
176
168
160
153
173
155
140
155
150
151
121
121
141
141
162
162
162
114
162
161
162
162
113
113
144
115
148
112
121
172
137
137
172
137
424
m
model=medlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
m
model=medmid . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
m
model=small . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
m
ond-exe
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
m
ond-move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
m
onst-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
m
onst16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
m
onstant-gp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
m
pu . . . 109, 110, 114, 122, 127, 132, 156, 170, 173
m
pu32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
MD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
mdalign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
mdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
mdata-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
mdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
mdebug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140, 166
mde
-asm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
mdisable-
allt . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
mdisable-fpregs . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
mdisable-indexing . . . . . . . . . . . . . . . . . . . . . . . . . 128
mdiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
mdivide-breaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
mdivide-traps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
mdouble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
mdouble-float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
mdp-isr-reload . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
mdwarf2-asm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
mdword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
mdynami
-no-pi
. . . . . . . . . . . . . . . . . . . . . . . . . . . 161
meabi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
mearly-stop-bits . . . . . . . . . . . . . . . . . . . . . . . . . . 138
melf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115, 151
melinux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
melinux-sta
ksize . . . . . . . . . . . . . . . . . . . . . . . . . 114
memb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
membedded-data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
mep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
mepsilon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
mesa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
metrax100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
metrax4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
mexpli
it-relo
s . . . . . . . . . . . . . . . . . . . . . 121, 148
MF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
mfast-fix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
mfast-indire
t-
alls . . . . . . . . . . . . . . . . . . . . . . 128
mfaster-stru
ts . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
mfdpi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
mfix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
mfix-and-
ontinue . . . . . . . . . . . . . . . . . . . . . . . . . 117
mfix-r4000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
mfix-r4400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
mfix-sb1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
mfix-vr4120 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
mfix-vr4130 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
mfixed-
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
mfixed-range . . . . . . . . . . . . . . . . . . . . . . . . . . 128, 139
mfloat-abi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
mfloat-gprs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
mfloat-ieee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
mfloat-vax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
mfloat32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
mfloat64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
mflush-fun
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
mflush-fun
=name . . . . . . . . . . . . . . . . . . . . . . . . . . 140
mflush-trap=number . . . . . . . . . . . . . . . . . . . . . . . 140
mfmovd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
mfp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
mfp-ex
eptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
mfp-reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
mfp-rounding-mode . . . . . . . . . . . . . . . . . . . . . . . . . 120
mfp-trap-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
mfp32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
mfp64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
mfpe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
mfpr-32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
mfpr-64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
mfpu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111, 154, 169
mfull-to
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
mfused-madd . . . . . . . . . . . . . . . . . . 149, 160, 167, 177
mg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
MG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
mgas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121, 128
mgnu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
mgnu-as . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
mgnu-ld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
mgotplt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
mgp32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
mgp64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
mgpr-32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
mgpr-64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
mgprel-ro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
mh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
mhard-float . . . . . . . . . 110, 123, 147, 159, 165, 169
mhard-quad-float . . . . . . . . . . . . . . . . . . . . . . . . . . 169
mhardlit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
mhimem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
mhita
hi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
mieee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119, 168
mieee-
ompare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
mieee-
onformant . . . . . . . . . . . . . . . . . . . . . . . . . . 121
mieee-fp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
mieee-with-inexa
t . . . . . . . . . . . . . . . . . . . . . . . . 119
milp32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
mimpure-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
minit-sta
k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
minline-all-stringops . . . . . . . . . . . . . . . . . . . . 136
minline-float-divide-max-throughput . . . . . 138
minline-float-divide-min-laten
y . . . . . . . . . 138
minline-int-divide-max-throughput . . . . . . . 138
minline-int-divide-min-laten
y . . . . . . . . . . . 138
minline-plt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
minline-sqrt-max-throughput . . . . . . . . . . . . . . 138
minline-sqrt-min-laten
y . . . . . . . . . . . . . . . . . 138
minmax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
minsert-s
hed-nops . . . . . . . . . . . . . . . . . . . . . . . . 161
mint16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
425
mmv
le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mmvme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mnested-
ond-exe
. . . . . . . . . . . . . . . . . . . . . . . . .
mnew-mnemoni
s . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-3dnow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-4byte-fun
tions . . . . . . . . . . . . . . . . . . . . . . .
mno-abi
alls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-abshi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-a
0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-align-double . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-align-int . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-align-loops . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-align-stringops . . . . . . . . . . . . . . . . . . . . . . .
mno-altive
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-am33 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-app-regs . . . . . . . . . . . . . . . . . . . . . . . . . . 169,
mno-ba
k
hain . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-base-addresses . . . . . . . . . . . . . . . . . . . . . . . .
mno-bit-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-bk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-bran
h-likely . . . . . . . . . . . . . . . . . . . . . . . . .
mno-bran
h-predi
t . . . . . . . . . . . . . . . . . . . . . . . .
mno-bwx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-
allgraph-data . . . . . . . . . . . . . . . . . . . . . . . .
mno-
he
k-zero-division . . . . . . . . . . . . . . . . . .
mno-
irrus-fix-invalid-insns . . . . . . . . . . . . .
mno-
ix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-
ond-exe
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-
ond-move . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-
onst-align . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-
onst16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-
rt0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-data-align . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-db . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-div . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-double . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-dwarf2-asm . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-dword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-eabi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-early-stop-bits . . . . . . . . . . . . . . . . . . . . . . .
mno-eflags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-embedded-data . . . . . . . . . . . . . . . . . . . . . . . . .
mno-ep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-epsilon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-expli
it-relo
s . . . . . . . . . . . . . . . . . . 121,
mno-fan
y-math-387 . . . . . . . . . . . . . . . . . . . . . . . .
mno-fast-fix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-faster-stru
ts . . . . . . . . . . . . . . . . . . . . . . . .
mno-fix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-fix-r4000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-fix-r4400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-float32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-float64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-flush-fun
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-flush-trap . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-fp-in-to
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
166
162
127
126
156
135
144
146
154
154
133
142
140
136
157
152
176
165
151
160
173
150
151
121
144
148
112
121
126
125
115
177
152
115
173
166
144
124
138
124
163
138
125
148
175
151
148
133
174
170
121
149
149
154
154
140
140
158
426
mno-fp-regs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-fp-ret-in-387 . . . . . . . . . . . . . . . . . . . . . . . . .
mno-fpu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-fused-madd . . . . . . . . . . . . . . . 149, 160, 167,
mno-gnu-as . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-gnu-ld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-gotplt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-hardlit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-ieee-
ompare . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-ieee-fp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-int16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-int32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-knuthdiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-libfun
s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-long-
alls . . . . . . . . . . 111, 129, 144, 149,
mno-long
all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-long
alls . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-loop-unsigned . . . . . . . . . . . . . . . . . . . . . . . . .
mno-mad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-mem
py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-mips16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-mips3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-mmx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-mpyi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-mul-bug-workaround . . . . . . . . . . . . . . . . . . .
mno-muladd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-mult-bug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-multi-
ond-exe
. . . . . . . . . . . . . . . . . . . . . . .
mno-multiple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-mv
le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-nested-
ond-exe
. . . . . . . . . . . . . . . . . . . . . .
mno-pa
k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-pa
ked-sta
k . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-paired-single . . . . . . . . . . . . . . . . . . . . . . . . .
mno-parallel-insns . . . . . . . . . . . . . . . . . . . . . . . .
mno-parallel-mpy . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-pi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-power2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-powerp
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-powerp
-gfxopt . . . . . . . . . . . . . . . . . . . . . . . .
mno-powerp
-gpopt . . . . . . . . . . . . . . . . . . . . . . . . .
mno-powerp
64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-prolog-fun
tion . . . . . . . . . . . . . . . . . . . . . . .
mno-prologue-epilogue . . . . . . . . . . . . . . . . . . . .
mno-prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-push-args . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-register-names . . . . . . . . . . . . . . . . . . . . . . . .
mno-regnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-relax-immediate . . . . . . . . . . . . . . . . . . . . . . .
mno-relo
atable . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-relo
atable-lib . . . . . . . . . . . . . . . . . . . . . . .
mno-rptb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-rpts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mno-s
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119
133
169
177
137
137
115
144
153
133
154
154
114
151
151
175
164
177
174
149
121
124
148
146
147
135
174
114
124
152
126
159
166
126
125
165
147
175
175
137
155
155
155
155
155
155
175
115
162
136
138
164
144
160
160
174
174
126
mpe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
mpentium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
mpentiumpro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
mpi
-register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
mpoke-fun
tion-name . . . . . . . . . . . . . . . . . . . . . . . 112
mportable-runtime . . . . . . . . . . . . . . . . . . . . . . . . . 128
mpower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
mpower2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
mpowerp
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
mpowerp
-gfxopt . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
mpowerp
-gpopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
mpowerp
64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
mprefergot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
mpreferred-sta
k-boundary . . . . . . . . . . . . . . . . 135
mprioritize-restri
ted-insns . . . . . . . . . . . . . 161
mprolog-fun
tion . . . . . . . . . . . . . . . . . . . . . . . . . . 175
mprologue-epilogue . . . . . . . . . . . . . . . . . . . . . . . . 115
mprototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
mpush-args . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
MQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
mregister-names . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
mregnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
mregparam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
mregparm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135, 175
mrelax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127, 152, 168
mrelax-immediate . . . . . . . . . . . . . . . . . . . . . . . . . . 144
mrelo
atable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
mrelo
atable-lib . . . . . . . . . . . . . . . . . . . . . . . . . . 160
mrodata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
mrptb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
mrpts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
mrtd . . . . . . . . . . . . . . . . . . . . . . . . . 134, 142, 153, 218
ms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
ms2600 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
msb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
ms
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
ms
hed-
ostly-dep . . . . . . . . . . . . . . . . . . . . . . . . . 161
ms
hedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
msda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
msdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138, 163
msdata-data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
msdata=default . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
msdata=eabi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
msdata=none . . . . . . . . . . . . . . . . . . . . . . . . . . . 139, 164
msdata=sdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
msdata=sysv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
msdata=use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
mshort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142, 144
msim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162, 176
msingle-exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
msingle-float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
msingle-pi
-base . . . . . . . . . . . . . . . . . . . . . . . . . . 112
msio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
msize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
mslow-bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
msmall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
msmall-data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
msmall-exe
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
427
msmall-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
msmall-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
msoft-float . . . . 110, 119, 124, 128, 133, 142, 147,
msoft-quad-float . . . . . . . . . . . . . . . . . . . . . . . . . . 169
msoft-reg-
ount . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
mspa
e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168, 175
mspe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
msplit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
msplit-addresses . . . . . . . . . . . . . . . . . . . . . . . . . . 148
msse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
msta
k-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
msta
k-bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
msta
k-guard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
msta
k-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
mstri
t-align . . . . . . . . . . . . . . . . . . . . . . . . . 143, 160
mstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
mstru
ture-size-boundary . . . . . . . . . . . . . . . . . 111
msvr3-shlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
msvr4-stru
t-return . . . . . . . . . . . . . . . . . . . . . . . 162
msym32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
mt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
MT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
mtarget-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
mtda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
mtext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
mtext-se
tion-literals . . . . . . . . . . . . . . . . . . . 177
mthreads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
mthumb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
mthumb-interwork . . . . . . . . . . . . . . . . . . . . . . . . . . 109
mti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
mtiny-sta
k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
mtls-dire
t-seg-refs . . . . . . . . . . . . . . . . . . . . . . 136
mtls-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
mto
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
mtom
at-stats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
mtoplevel-symbols . . . . . . . . . . . . . . . . . . . . . . . . . 151
mtp
s-frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
mtp
s-leaf-frame . . . . . . . . . . . . . . . . . . . . . . . . . . 113
mtpf-tra
e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
mtrap-pre
ision . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
mtune . . . . . . 111, 114, 123, 130, 145, 157, 166, 171
mtune-ar
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
multi_module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
multilib-library-pi
. . . . . . . . . . . . . . . . . . . . . . 125
multiply_defined . . . . . . . . . . . . . . . . . . . . . . . . . . 118
multiply_defined_unused . . . . . . . . . . . . . . . . . . 118
munaligned-doubles . . . . . . . . . . . . . . . . . . . . . . . . 170
muninit-
onst-in-rodata . . . . . . . . . . . . . . . . . . 148
munix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
munix-asm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
mupdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
musermode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
mv850 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
mv850e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
mv850e1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
mv8plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
mvis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
428
mvliw-bran
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mvms-return-
odes . . . . . . . . . . . . . . . . . . . . . . . . .
mvolatile-asm-stop . . . . . . . . . . . . . . . . . . . . . . . .
mvr4130-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mvxworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mwarn-dynami
sta
k . . . . . . . . . . . . . . . . . . . . . . . .
mwarn-framesize . . . . . . . . . . . . . . . . . . . . . . . . . . .
mwide-bitfields . . . . . . . . . . . . . . . . . . . . . . . . . . .
mwindiss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mwords-little-endian . . . . . . . . . . . . . . . . . . . . . .
mxgot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mxl-
ompat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
myellowknife . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mzar
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mzda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
mzero-extend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
126
123
138
150
163
167
167
144
163
110
146
159
163
166
176
151
no-integrated-
pp . . . . . . . . . . . . . . . . . . . . . . . . . . 23
no-red-zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
no_dead_strip_inits_and_terms . . . . . . . . . . . . 118
noall_load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
no
pp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
nodefaultlibs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
nofixprebinding . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
nolibdld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
nomultidefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
noprebind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
noseglinkedit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
nostartfiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
nostdin
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
nostdin
++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27, 93
nostdlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19,
O ...........................................
O0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
O1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
O2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
O3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Os . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
88
62
63
62
62
63
63
p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
pagezero_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
param . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
pass-exit-
odes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
pedanti
. . . . . . . . . . . . . . . . 5, 35, 90, 201, 268, 379
pedanti
-errors . . . . . . . . . . . . . 5, 35, 90, 378, 379
pg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
pie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
pipe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
prebind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
prebind_all_twolevel_modules . . . . . . . . . . . . . 118
prepro
essor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
print-file-name . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
print-libg
-file-name . . . . . . . . . . . . . . . . . . . . 60
print-multi-dire
tory . . . . . . . . . . . . . . . . . . . . . 60
print-multi-lib . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
print-obj
-runtime-info . . . . . . . . . . . . . . . . . . . 34
print-prog-name . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
print-sear
h-dirs . . . . . . . . . . . . . . . . . . . . . . . . . . 60
private_bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
pthread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139, 164
pthreads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Qn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Qy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
read_only_relo
s . . . . . . . . . . . . . . . . . . . . . . . . . . 118
remap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 97
save-temps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
se
talign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
se
t
reate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
se
tobje
tsymbols . . . . . . . . . . . . . . . . . . . . . . . . . 118
se
torder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
seg_addr_table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
seg_addr_table_filename . . . . . . . . . . . . . . . . . . 118
seg1addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
segaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
seglinkedit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
segprot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
segs_read_only_addr . . . . . . . . . . . . . . . . . . . . . . . 118
segs_read_write_addr . . . . . . . . . . . . . . . . . . . . . . 118
shared . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
shared-libg
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
sim2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
single_module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
spe
s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
stati
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98, 118, 130
stati
-libg
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
std . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 21, 272, 377
std= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
sub_library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
sub_umbrella . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
symboli
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
target-help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 96
threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130, 172
time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
tls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
TLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
traditional . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23, 365
traditional-
pp . . . . . . . . . . . . . . . . . . . . . . . . . 23, 96
trigraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23, 96
twolevel_namespa
e . . . . . . . . . . . . . . . . . . . . . . . . 118
u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
U . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
umbrella . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
undef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
undefined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
unexported_symbols_list . . . . . . . . . . . . . . . . . . 118
v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 96
V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 96
w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35, 90
W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42, 47, 366
Wa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Wabi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Waggregate-return . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Wall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42, 88, 369
Wbad-fun
tion-
ast . . . . . . . . . . . . . . . . . . . . . . . . . 45
W
ast-align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
W
ast-qual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
W
har-subs
ripts . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
W
omment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 88
W
omments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
W
onversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46, 374
W
tor-dtor-priva
y . . . . . . . . . . . . . . . . . . . . . . . . . 29
Wde
laration-after-statement . . . . . . . . . . . . . . 45
Wdisabled-optimization . . . . . . . . . . . . . . . . . . . . 49
Wdiv-by-zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
weak_referen
e_mismat
hes . . . . . . . . . . . . . . . . 118
Weff
++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Wendif-labels . . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 89
Werror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49, 89
Werror-impli
it-fun
tion-de
laration . . . . . 38
Wextra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42, 47
Wfatal-errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Wfloat-equal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Wformat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36, 47, 220
Wformat-nonliteral . . . . . . . . . . . . . . . . . . . . 37, 221
Wformat-se
urity . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Wformat-y2k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
429
Wformat=2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
whatsloaded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
whyload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Wimpli
it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Wimpli
it-fun
tion-de
laration . . . . . . . . . . . . 38
Wimpli
it-int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Wimport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Winit-self . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Winline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 243
Winvalid-p
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Wl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Wlarger-than . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Wlong-long . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Wmain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Wmissing-bra
es . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Wmissing-de
larations . . . . . . . . . . . . . . . . . . . . . 47
Wmissing-field-initializers . . . . . . . . . . . . . . . 47
Wmissing-format-attribute . . . . . . . . . . . . . . . . . 47
Wmissing-in
lude-dirs . . . . . . . . . . . . . . . . . . . . . 38
Wmissing-noreturn . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Wmissing-prototypes . . . . . . . . . . . . . . . . . . . . . . . . 46
Wmulti
har . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Wnested-externs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Wno-depre
ated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Wno-depre
ated-de
larations . . . . . . . . . . . . . . . 47
Wno-div-by-zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Wno-endif-labels . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Wno-format-extra-args . . . . . . . . . . . . . . . . . . . . . 36
Wno-format-zero-length . . . . . . . . . . . . . . . . . . . . 37
Wno-import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Wno-invalid-offsetof . . . . . . . . . . . . . . . . . . . . . . . 48
Wno-long-long . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Wno-multi
har . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Wno-non-template-friend . . . . . . . . . . . . . . . . . . . 29
Wno-pmf-
onversions . . . . . . . . . . . . . . . . . . . 30, 341
Wno-pointer-sign . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Wno-proto
ol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Wno-variadi
-ma
ros . . . . . . . . . . . . . . . . . . . . . . . . 49
Wnon-virtual-dtor . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Wnonnull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Wold-style-
ast . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Wold-style-definition . . . . . . . . . . . . . . . . . . . . . 46
Woverloaded-virtual . . . . . . . . . . . . . . . . . . . . . . . . 30
Wp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Wpa
ked . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Wpadded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Wparentheses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Wpointer-arith . . . . . . . . . . . . . . . . . . . . . . . . . 45, 214
Wredundant-de
ls . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Wreorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Wreturn-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Wsele
tor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Wsequen
e-point . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Wshadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Wsign-
ompare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Wsign-promo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Wstri
t-aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Wstri
t-aliasing=2 . . . . . . . . . . . . . . . . . . . . . . . . . 42
430
Wstri
t-prototypes . . . . . . . . . . . . . . . . . . . . . . . . .
Wswit
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wswit
h-enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wswit
h-swit
h . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wsystem-headers . . . . . . . . . . . . . . . . . . . . . . . . . 43,
Wtraditional . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44,
Wtrigraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40,
Wunde
lared-sele
tor . . . . . . . . . . . . . . . . . . . . . . .
Wundef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45,
Wuninitialized . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wunknown-pragmas . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wunrea
hable-
ode . . . . . . . . . . . . . . . . . . . . . . . . . .
Wunused . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wunused-fun
tion . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wunused-label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wunused-ma
ros . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
46
40
40
40
89
89
89
33
89
41
42
48
41
40
40
89
Wunused-parameter . . . . . . . . . . . . . . . . . . . . . . . . . .
Wunused-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wunused-variable . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wvariadi
-ma
ros . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wwrite-strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
41
40
49
46
x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 92
Xassembler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Xlinker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Ym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
YP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
431
Keyword Index
!
<
$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
`%' in
onstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . .
%in
lude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
%in
lude noerr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
%rename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
253
102
102
102
&
'
' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
98
98
98
98
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
>
432
__builtin_parity . . . . . . . . . . . . . . . . . . . . . . . . . . 278
__builtin_parityl . . . . . . . . . . . . . . . . . . . . . . . . . 278
__builtin_parityll . . . . . . . . . . . . . . . . . . . . . . . . 278
__builtin_pop
ount . . . . . . . . . . . . . . . . . . . . . . . . 278
__builtin_pop
ountl . . . . . . . . . . . . . . . . . . . . . . . 278
__builtin_pop
ountll . . . . . . . . . . . . . . . . . . . . . . 278
__builtin_powi . . . . . . . . . . . . . . . . . . . . . . . . 272, 278
__builtin_powif . . . . . . . . . . . . . . . . . . . . . . 272, 278
__builtin_powil . . . . . . . . . . . . . . . . . . . . . . 272, 278
__builtin_prefet
h . . . . . . . . . . . . . . . . . . . . . . . . 276
__builtin_return . . . . . . . . . . . . . . . . . . . . . . . . . . 207
__builtin_return_address . . . . . . . . . . . . . . . . . 270
__builtin_types_
ompatible_p . . . . . . . . . . . . . 274
__
omplex__ keyword . . . . . . . . . . . . . . . . . . . . . . . 209
__de
lspe
(dllexport) . . . . . . . . . . . . . . . . . . . . 219
__de
lspe
(dllimport) . . . . . . . . . . . . . . . . . . . . 219
__extension__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
__fun
__ identier . . . . . . . . . . . . . . . . . . . . . . . . . . 269
__FUNCTION__ identier . . . . . . . . . . . . . . . . . . . . . 269
__imag__ keyword . . . . . . . . . . . . . . . . . . . . . . . . . . 209
__PRETTY_FUNCTION__ identier . . . . . . . . . . . . . . 269
__real__ keyword . . . . . . . . . . . . . . . . . . . . . . . . . . 209
__STDC_HOSTED__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ANSI C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ANSI C standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ANSI C89 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ANSI support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
ANSI X3.159-1989 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
apostrophes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
appli
ation binary interfa
e . . . . . . . . . . . . . . . . . . 351
ARC Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
ARM [Annotated C++ Referen
e Manual . . . . . 344
ARM options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
arrays of length zero . . . . . . . . . . . . . . . . . . . . . . . . 210
arrays of variable length . . . . . . . . . . . . . . . . . . . . . 211
arrays, non-lvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
asin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
asinf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
asinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
asinhf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
asinhl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
asinl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
asm
onstraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
asm expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
assembler instru
tions . . . . . . . . . . . . . . . . . . . . . . . 244
assembler names for identiers . . . . . . . . . . . . . . . 265
assembly
ode, invalid . . . . . . . . . . . . . . . . . . . . . . . 381
atan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
atan2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
atan2f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
atan2l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
atanf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
atanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
atanhf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
atanhl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
atanl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
attribute of types . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
attribute of variables . . . . . . . . . . . . . . . . . . . . . . . . 233
attribute syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
autoin
rement/de
rement addressing . . . . . . . . . 250
automati
inline for C++ member fns . . . . . . . . 243
AVR Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
ABI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
abs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
C ompilation options . . . . . . . . . . . . . . . . . . . . . . . . . 7
433
272
272
272
272
272
272
272
272
272
272
272
hara
ter set, exe
ution . . . . . . . . . . . . . . . . . . . . . . 94
hara
ter set, input . . . . . . . . . . . . . . . . . . . . . . . . . . 94
hara
ter set, wide exe
ution . . . . . . . . . . . . . . . . . 94
imag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
imagf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
imagl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
leanup attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
COBOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
ode generation
onventions . . . . . . . . . . . . . . . . . 178
ode, mixed with de
larations . . . . . . . . . . . . . . . . 217
ommand options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
omments, C++ style . . . . . . . . . . . . . . . . . . . . . . . . 232
ommon attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
omparison of signed and unsigned values, warning
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
ompiler bugs, reporting . . . . . . . . . . . . . . . . . . . . 381
ompiler
ompared to C++ prepro
essor . . . . . . . . . 3
ompiler options, C++ . . . . . . . . . . . . . . . . . . . . . . . . 24
ompiler options, Obje
tive-C and Obje
tive-C++
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
ompiler version, spe
ifying . . . . . . . . . . . . . . . . . . 108
COMPILER_PATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
omplex
onjugation . . . . . . . . . . . . . . . . . . . . . . . . 209
omplex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
ompound literals . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
omputed gotos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
onditional expressions, extensions . . . . . . . . . . . 208
on
i
ting types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
onj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
onjf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
onjl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
onst applied to fun
tion . . . . . . . . . . . . . . . . . . . 217
onst fun
tion attribute . . . . . . . . . . . . . . . . . . . . . 218
onstants in
onstraints . . . . . . . . . . . . . . . . . . . . . 251
onstraint modier
hara
ters . . . . . . . . . . . . . . . . 253
onstraint, mat
hing . . . . . . . . . . . . . . . . . . . . . . . . 252
onstraints, asm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
onstraints, ma
hine spe
i
. . . . . . . . . . . . . . . . . 254
onstru
ting
alls . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
onstru
tor expressions . . . . . . . . . . . . . . . . . . . . . . 214
onstru
tor fun
tion attribute . . . . . . . . . . . . . . 218
ontributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
opysign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
opysignf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
opysignl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
ore dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
os . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
osf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
osh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
oshf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
oshl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
osl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
eil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
eilf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
eill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
exp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
expf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
expl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
434
osf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
osh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
oshf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
oshl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
osl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CPATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CPLUS_INCLUDE_PATH . . . . . . . . . . . . . . . . . . . . . . . .
pow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
powf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
powl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
proj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
projf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
projl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
realf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
reall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CRIS Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ross
ompiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
sin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
sinf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
sinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
sinhf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
sinhl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
sinl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
sqrt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
sqrtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
sqrtl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanhf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanhl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
272
272
272
272
272
186
186
272
272
272
272
272
272
272
272
272
114
108
272
272
272
272
272
272
272
272
272
272
272
272
272
272
272
diale
t options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
digits in
onstraint . . . . . . . . . . . . . . . . . . . . . . . . . . 252
dire
tory options . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
dollar signs in identier names . . . . . . . . . . . . . . . 232
double-word arithmeti
. . . . . . . . . . . . . . . . . . . . . . 209
downward funargs . . . . . . . . . . . . . . . . . . . . . . . . . . 204
drem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
dremf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
dreml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
fdimf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
fdiml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
435
`i' in
onstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . .
`I' in
onstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . .
i386 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
IA-64 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
IBM RS/6000 and PowerPC Options . . . . . . . . .
identier names, dollar signs in . . . . . . . . . . . . . .
identiers, names in assembler
ode . . . . . . . . . .
251
251
130
137
155
232
265
436
ilogb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ilogbf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ilogbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
imaxabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
272
272
272
272
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
implied #pragma implementation . . . . . . . . . . . . 338
in
ompatibilities of GCC . . . . . . . . . . . . . . . . . . . . 365
in
rement operators . . . . . . . . . . . . . . . . . . . . . . . . . 381
index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
indire
t
alls on ARM . . . . . . . . . . . . . . . . . . . . . . . 222
init priority attribute . . . . . . . . . . . . . . . . . . . . . . . 341
initializations in expressions . . . . . . . . . . . . . . . . . 214
initializers with labeled elements . . . . . . . . . . . . . 215
initializers, non-
onstant . . . . . . . . . . . . . . . . . . . . 214
inline automati
for C++ member fns . . . . . . . . 243
inline fun
tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
inline fun
tions, omission of . . . . . . . . . . . . . . . . . 243
inlining and C++ pragmas . . . . . . . . . . . . . . . . . . . 339
installation trouble . . . . . . . . . . . . . . . . . . . . . . . . . 363
integrating fun
tion
ode . . . . . . . . . . . . . . . . . . . . 242
Intel 386 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
interfa
e and implementation headers, C++ . . . 337
intermediate C version, nonexistent . . . . . . . . . . . . 3
interrupt handler fun
tions . . . . . . . . . . . . . . . . . . 222
interrupt handler fun
tions on the m68k, H8/300
and SH pro
essors . . . . . . . . . . . . . . . . . . . . . . 222
introdu
tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
invalid assembly
ode . . . . . . . . . . . . . . . . . . . . . . . 381
invalid input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
invoking g++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
isalnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
isalpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
isas
ii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
isblank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
is
ntrl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
isdigit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
isgraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
islower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
ISO 9899 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ISO C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ISO C standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ISO C90 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ISO C94 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ISO C95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ISO C99 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ISO C9X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ISO support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
ISO/IEC 9899 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
isprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
ispun
t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
isspa
e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
isupper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
iswalnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
iswalpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
iswblank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
isw
ntrl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
iswdigit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
iswgraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iswlower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iswprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iswpun
t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iswspa
e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iswupper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iswxdigit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
isxdigit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
272
272
272
272
272
272
272
272
272
272
272
272
272
272
Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
java interfa
e attribute . . . . . . . . . . . . . . . . . . . . . . 342
jn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
jnf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
jnl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
j0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
j0f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
j0l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
j1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
j1f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
j1l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
lo
al variables in ma
ros . . . . . . . . . . . . . . . . . . . .
lo
al variables, spe
ifying registers . . . . . . . . . . .
lo
ale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
lo
ale denition . . . . . . . . . . . . . . . . . . . . . . . . . . . .
207
267
185
186
log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
log10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
log10f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
log10l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
log1p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
log1pf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
log1pl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
log2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
log2f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
log2l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
logb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
logbf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
logbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
logf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
logl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
long long data types . . . . . . . . . . . . . . . . . . . . . . . 209
longjmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
longjmp in
ompatibilities . . . . . . . . . . . . . . . . . . . . 366
longjmp warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
lrint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
lrintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
lrintl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
lround . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
lroundf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
lroundl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
437
messages, warning . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
messages, warning and error . . . . . . . . . . . . . . . . . 378
middle-operands, omitted . . . . . . . . . . . . . . . . . . . 208
MIPS options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
misunderstandings in C++ . . . . . . . . . . . . . . . . . . . 370
mixed de
larations and
ode . . . . . . . . . . . . . . . . . 217
mktemp, and
onstant strings . . . . . . . . . . . . . . . . . 365
MMIX Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
MN10300 options . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
mode attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
modf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
modff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
modfl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
modiers in
onstraints . . . . . . . . . . . . . . . . . . . . . 253
ms_stru
t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
ms_stru
t attribute . . . . . . . . . . . . . . . . . . . . . . . . 237
mud
ap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
multiple alternative
onstraints . . . . . . . . . . . . . . 252
multipre
ision arithmeti
. . . . . . . . . . . . . . . . . . . . 209
438
. . . . . . . . . . 267
question mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
`r' in
onstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ranges in
ase statements . . . . . . . . . . . . . . . . . . . .
read-only strings . . . . . . . . . . . . . . . . . . . . . . . . . . . .
register variable after longjmp . . . . . . . . . . . . . . .
registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
registers for lo
al variables . . . . . . . . . . . . . . . . . .
registers in
onstraints . . . . . . . . . . . . . . . . . . . . . .
registers, global allo
ation . . . . . . . . . . . . . . . . . . .
registers, global variables in . . . . . . . . . . . . . . . . .
regparm attribute . . . . . . . . . . . . . . . . . . . . . . . . . . .
relo
ation trun
ated to t (MIPS) . . . . . . . . . . .
251
216
365
267
244
267
251
266
266
225
146
remainder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
remainderf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
remainderl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
remquo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
remquof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
remquol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
reordering, warning . . . . . . . . . . . . . . . . . . . . . . . . . . 29
reporting bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
rest argument (in ma
ro) . . . . . . . . . . . . . . . . . . . . 212
restri
ted pointers . . . . . . . . . . . . . . . . . . . . . . . . . . 336
restri
ted referen
es . . . . . . . . . . . . . . . . . . . . . . . . . 336
restri
ted this pointer . . . . . . . . . . . . . . . . . . . . . . . 336
rindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
rint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
rintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
rintl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
round . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
roundf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
roundl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
RS/6000 and PowerPC Options . . . . . . . . . . . . . . 155
RTTI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
run-time options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
439
108
108
267
187
sprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
sqrt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
sqrtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
sqrtl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
ss
anf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
ss
anf, and
onstant strings . . . . . . . . . . . . . . . . . 366
statements inside expressions . . . . . . . . . . . . . . . . 201
stati
data in C++, de
laring and dening . . . . . 370
stp
py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
str
at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
str
hr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
str
mp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
str
py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
str
spn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strdup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strfmon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strftime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
string
onstants . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
strlen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strn
at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strn
mp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strn
py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strpbrk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strr
hr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strspn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
strstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
stru
t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
stru
tures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
stru
tures,
onstru
tor expression . . . . . . . . . . . . 214
submodel options . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
subs
ripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
subs
ripting and fun
tion values . . . . . . . . . . . . . 213
suxes for C++ sour
e . . . . . . . . . . . . . . . . . . . . . . . 20
SUNPRO_DEPENDENCIES . . . . . . . . . . . . . . . . . . . . . . . 187
suppressing warnings . . . . . . . . . . . . . . . . . . . . . . . . . 34
surprises in C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
syntax
he
king . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
system headers, warnings from . . . . . . . . . . . . . . . . 43
272
272
272
272
272
272
target ma
hine, spe
ifying . . . . . . . . . . . . . . . . . . . 108
target options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
TC1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
TC2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Te
hni
al Corrigenda . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Te
hni
al Corrigendum 1 . . . . . . . . . . . . . . . . . . . . . . 5
Te
hni
al Corrigendum 2 . . . . . . . . . . . . . . . . . . . . . . 5
tan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanhf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanhl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tanl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
440
`V' in
onstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V850 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vague linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
value after longjmp . . . . . . . . . . . . . . . . . . . . . . . . .
variable addressability on the IA-64 . . . . . . . . . .
variable addressability on the M32R/D . . . . . . .
variable alignment . . . . . . . . . . . . . . . . . . . . . . . . . .
variable attributes . . . . . . . . . . . . . . . . . . . . . . . . . .
variable number of arguments . . . . . . . . . . . . . . .
variable-length array s
ope . . . . . . . . . . . . . . . . . .
variable-length arrays . . . . . . . . . . . . . . . . . . . . . . .
variables in spe
ied registers . . . . . . . . . . . . . . . .
variables, lo
al, in ma
ros . . . . . . . . . . . . . . . . . . .
zSeries options . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
251
175
336
267
223
237
233
233
212
212
211
266
207
178
y0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
y0f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
y0l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
y1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
y1f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
y1l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
yn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ynf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ynl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
272
272
272
272
272
272
272
272
272