1 This is doc/gcc.info, produced by makeinfo version 4.8 from
2 ../../../toolchain/android-toolchain/gcc-4.2.1/gcc/doc/gcc.texi.
4 Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
5 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
7 Permission is granted to copy, distribute and/or modify this document
8 under the terms of the GNU Free Documentation License, Version 1.2 or
9 any later version published by the Free Software Foundation; with the
10 Invariant Sections being "GNU General Public License" and "Funding Free
11 Software", the Front-Cover texts being (a) (see below), and with the
12 Back-Cover Texts being (b) (see below). A copy of the license is
13 included in the section entitled "GNU Free Documentation License".
15 (a) The FSF's Front-Cover Text is:
19 (b) The FSF's Back-Cover Text is:
21 You have freedom to copy and modify this GNU Manual, like GNU
22 software. Copies published by the Free Software Foundation raise
23 funds for GNU development.
25 INFO-DIR-SECTION Software development
27 * gcc: (gcc). The GNU Compiler Collection.
29 This file documents the use of the GNU compilers.
31 Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
32 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
34 Permission is granted to copy, distribute and/or modify this document
35 under the terms of the GNU Free Documentation License, Version 1.2 or
36 any later version published by the Free Software Foundation; with the
37 Invariant Sections being "GNU General Public License" and "Funding Free
38 Software", the Front-Cover texts being (a) (see below), and with the
39 Back-Cover Texts being (b) (see below). A copy of the license is
40 included in the section entitled "GNU Free Documentation License".
42 (a) The FSF's Front-Cover Text is:
46 (b) The FSF's Back-Cover Text is:
48 You have freedom to copy and modify this GNU Manual, like GNU
49 software. Copies published by the Free Software Foundation raise
50 funds for GNU development.
54 File: gcc.info, Node: Top, Next: G++ and GCC, Up: (DIR)
59 This manual documents how to use the GNU compilers, as well as their
60 features and incompatibilities, and how to report bugs. It corresponds
61 to GCC version 4.2.1. The internals of the GNU compilers, including
62 how to port them to new targets and some information about how to write
63 front ends for new languages, are documented in a separate manual.
64 *Note Introduction: (gccint)Top.
68 * G++ and GCC:: You can compile C or C++ programs.
69 * Standards:: Language standards supported by GCC.
70 * Invoking GCC:: Command options supported by `gcc'.
71 * C Implementation:: How GCC implements the ISO C specification.
72 * C Extensions:: GNU extensions to the C language family.
73 * C++ Extensions:: GNU extensions to the C++ language.
74 * Objective-C:: GNU Objective-C runtime features.
75 * Compatibility:: Binary Compatibility
76 * Gcov:: `gcov'---a test coverage program.
77 * Trouble:: If you have trouble using GCC.
78 * Bugs:: How, why and where to report bugs.
79 * Service:: How to find suppliers of support for GCC.
80 * Contributing:: How to contribute to testing and developing GCC.
82 * Funding:: How to help assure funding for free software.
83 * GNU Project:: The GNU Project and GNU/Linux.
85 * Copying:: GNU General Public License says
86 how you can copy and share GCC.
87 * GNU Free Documentation License:: How you can copy and share this manual.
88 * Contributors:: People who have contributed to GCC.
90 * Option Index:: Index to command line options.
91 * Keyword Index:: Index of concepts and symbol names.
94 File: gcc.info, Node: G++ and GCC, Next: Standards, Prev: Top, Up: Top
96 1 Programming Languages Supported by GCC
97 ****************************************
99 GCC stands for "GNU Compiler Collection". GCC is an integrated
100 distribution of compilers for several major programming languages.
101 These languages currently include C, C++, Objective-C, Objective-C++,
102 Java, Fortran, and Ada.
104 The abbreviation "GCC" has multiple meanings in common use. The
105 current official meaning is "GNU Compiler Collection", which refers
106 generically to the complete suite of tools. The name historically stood
107 for "GNU C Compiler", and this usage is still common when the emphasis
108 is on compiling C programs. Finally, the name is also used when
109 speaking of the "language-independent" component of GCC: code shared
110 among the compilers for all supported languages.
112 The language-independent component of GCC includes the majority of the
113 optimizers, as well as the "back ends" that generate machine code for
116 The part of a compiler that is specific to a particular language is
117 called the "front end". In addition to the front ends that are
118 integrated components of GCC, there are several other front ends that
119 are maintained separately. These support languages such as Pascal,
120 Mercury, and COBOL. To use these, they must be built together with GCC
123 Most of the compilers for languages other than C have their own names.
124 The C++ compiler is G++, the Ada compiler is GNAT, and so on. When we
125 talk about compiling one of those languages, we might refer to that
126 compiler by its own name, or as GCC. Either is correct.
128 Historically, compilers for many languages, including C++ and Fortran,
129 have been implemented as "preprocessors" which emit another high level
130 language such as C. None of the compilers included in GCC are
131 implemented this way; they all generate machine code directly. This
132 sort of preprocessor should not be confused with the "C preprocessor",
133 which is an integral feature of the C, C++, Objective-C and
134 Objective-C++ languages.
137 File: gcc.info, Node: Standards, Next: Invoking GCC, Prev: G++ and GCC, Up: Top
139 2 Language Standards Supported by GCC
140 *************************************
142 For each language compiled by GCC for which there is a standard, GCC
143 attempts to follow one or more versions of that standard, possibly with
144 some exceptions, and possibly with some extensions.
146 GCC supports three versions of the C standard, although support for
147 the most recent version is not yet complete.
149 The original ANSI C standard (X3.159-1989) was ratified in 1989 and
150 published in 1990. This standard was ratified as an ISO standard
151 (ISO/IEC 9899:1990) later in 1990. There were no technical differences
152 between these publications, although the sections of the ANSI standard
153 were renumbered and became clauses in the ISO standard. This standard,
154 in both its forms, is commonly known as "C89", or occasionally as
155 "C90", from the dates of ratification. The ANSI standard, but not the
156 ISO standard, also came with a Rationale document. To select this
157 standard in GCC, use one of the options `-ansi', `-std=c89' or
158 `-std=iso9899:1990'; to obtain all the diagnostics required by the
159 standard, you should also specify `-pedantic' (or `-pedantic-errors' if
160 you want them to be errors rather than warnings). *Note Options
161 Controlling C Dialect: C Dialect Options.
163 Errors in the 1990 ISO C standard were corrected in two Technical
164 Corrigenda published in 1994 and 1996. GCC does not support the
167 An amendment to the 1990 standard was published in 1995. This
168 amendment added digraphs and `__STDC_VERSION__' to the language, but
169 otherwise concerned the library. This amendment is commonly known as
170 "AMD1"; the amended standard is sometimes known as "C94" or "C95". To
171 select this standard in GCC, use the option `-std=iso9899:199409'
172 (with, as for other standard versions, `-pedantic' to receive all
173 required diagnostics).
175 A new edition of the ISO C standard was published in 1999 as ISO/IEC
176 9899:1999, and is commonly known as "C99". GCC has incomplete support
177 for this standard version; see
178 `http://gcc.gnu.org/gcc-4.2/c99status.html' for details. To select this
179 standard, use `-std=c99' or `-std=iso9899:1999'. (While in
180 development, drafts of this standard version were referred to as "C9X".)
182 Errors in the 1999 ISO C standard were corrected in two Technical
183 Corrigenda published in 2001 and 2004. GCC does not support the
186 By default, GCC provides some extensions to the C language that on
187 rare occasions conflict with the C standard. *Note Extensions to the C
188 Language Family: C Extensions. Use of the `-std' options listed above
189 will disable these extensions where they conflict with the C standard
190 version selected. You may also select an extended version of the C
191 language explicitly with `-std=gnu89' (for C89 with GNU extensions) or
192 `-std=gnu99' (for C99 with GNU extensions). The default, if no C
193 language dialect options are given, is `-std=gnu89'; this will change to
194 `-std=gnu99' in some future release when the C99 support is complete.
195 Some features that are part of the C99 standard are accepted as
196 extensions in C89 mode.
198 The ISO C standard defines (in clause 4) two classes of conforming
199 implementation. A "conforming hosted implementation" supports the
200 whole standard including all the library facilities; a "conforming
201 freestanding implementation" is only required to provide certain
202 library facilities: those in `<float.h>', `<limits.h>', `<stdarg.h>',
203 and `<stddef.h>'; since AMD1, also those in `<iso646.h>'; and in C99,
204 also those in `<stdbool.h>' and `<stdint.h>'. In addition, complex
205 types, added in C99, are not required for freestanding implementations.
206 The standard also defines two environments for programs, a
207 "freestanding environment", required of all implementations and which
208 may not have library facilities beyond those required of freestanding
209 implementations, where the handling of program startup and termination
210 are implementation-defined, and a "hosted environment", which is not
211 required, in which all the library facilities are provided and startup
212 is through a function `int main (void)' or `int main (int, char *[])'.
213 An OS kernel would be a freestanding environment; a program using the
214 facilities of an operating system would normally be in a hosted
217 GCC aims towards being usable as a conforming freestanding
218 implementation, or as the compiler for a conforming hosted
219 implementation. By default, it will act as the compiler for a hosted
220 implementation, defining `__STDC_HOSTED__' as `1' and presuming that
221 when the names of ISO C functions are used, they have the semantics
222 defined in the standard. To make it act as a conforming freestanding
223 implementation for a freestanding environment, use the option
224 `-ffreestanding'; it will then define `__STDC_HOSTED__' to `0' and not
225 make assumptions about the meanings of function names from the standard
226 library, with exceptions noted below. To build an OS kernel, you may
227 well still need to make your own arrangements for linking and startup.
228 *Note Options Controlling C Dialect: C Dialect Options.
230 GCC does not provide the library facilities required only of hosted
231 implementations, nor yet all the facilities required by C99 of
232 freestanding implementations; to use the facilities of a hosted
233 environment, you will need to find them elsewhere (for example, in the
234 GNU C library). *Note Standard Libraries: Standard Libraries.
236 Most of the compiler support routines used by GCC are present in
237 `libgcc', but there are a few exceptions. GCC requires the
238 freestanding environment provide `memcpy', `memmove', `memset' and
239 `memcmp'. Finally, if `__builtin_trap' is used, and the target does
240 not implement the `trap' pattern, then GCC will emit a call to `abort'.
242 For references to Technical Corrigenda, Rationale documents and
243 information concerning the history of C that is available online, see
244 `http://gcc.gnu.org/readings.html'
246 There is no formal written standard for Objective-C or Objective-C++.
247 The most authoritative manual is "Object-Oriented Programming and the
248 Objective-C Language", available at a number of web sites:
251 `http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/'
252 is a recent (and periodically updated) version;
254 * `http://www.toodarkpark.org/computers/objc/' is an older example;
256 * `http://www.gnustep.org' and `http://gcc.gnu.org/readings.html'
257 have additional useful information.
259 There is no standard for treelang, which is a sample language front end
260 for GCC. Its only purpose is as a sample for people wishing to write a
261 new language for GCC. The language is documented in
262 `gcc/treelang/treelang.texi' which can be turned into info or HTML
265 *Note GNAT Reference Manual: (gnat_rm)Top, for information on standard
266 conformance and compatibility of the Ada compiler.
268 *Note Standards: (gfortran)Standards, for details of standards
269 supported by GNU Fortran.
271 *Note Compatibility with the Java Platform: (gcj)Compatibility, for
272 details of compatibility between `gcj' and the Java Platform.
275 File: gcc.info, Node: Invoking GCC, Next: C Implementation, Prev: Standards, Up: Top
277 3 GCC Command Options
278 *********************
280 When you invoke GCC, it normally does preprocessing, compilation,
281 assembly and linking. The "overall options" allow you to stop this
282 process at an intermediate stage. For example, the `-c' option says
283 not to run the linker. Then the output consists of object files output
286 Other options are passed on to one stage of processing. Some options
287 control the preprocessor and others the compiler itself. Yet other
288 options control the assembler and linker; most of these are not
289 documented here, since you rarely need to use any of them.
291 Most of the command line options that you can use with GCC are useful
292 for C programs; when an option is only useful with another language
293 (usually C++), the explanation says so explicitly. If the description
294 for a particular option does not mention a source language, you can use
295 that option with all supported languages.
297 *Note Compiling C++ Programs: Invoking G++, for a summary of special
298 options for compiling C++ programs.
300 The `gcc' program accepts options and file names as operands. Many
301 options have multi-letter names; therefore multiple single-letter
302 options may _not_ be grouped: `-dr' is very different from `-d -r'.
304 You can mix options and other arguments. For the most part, the order
305 you use doesn't matter. Order does matter when you use several options
306 of the same kind; for example, if you specify `-L' more than once, the
307 directories are searched in the order specified.
309 Many options have long names starting with `-f' or with `-W'--for
310 example, `-fmove-loop-invariants', `-Wformat' and so on. Most of these
311 have both positive and negative forms; the negative form of `-ffoo'
312 would be `-fno-foo'. This manual documents only one of these two
313 forms, whichever one is not the default.
315 *Note Option Index::, for an index to GCC's options.
319 * Option Summary:: Brief list of all options, without explanations.
320 * Overall Options:: Controlling the kind of output:
321 an executable, object files, assembler files,
322 or preprocessed source.
323 * Invoking G++:: Compiling C++ programs.
324 * C Dialect Options:: Controlling the variant of C language compiled.
325 * C++ Dialect Options:: Variations on C++.
326 * Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C
328 * Language Independent Options:: Controlling how diagnostics should be
330 * Warning Options:: How picky should the compiler be?
331 * Debugging Options:: Symbol tables, measurements, and debugging dumps.
332 * Optimize Options:: How much optimization?
333 * Preprocessor Options:: Controlling header files and macro definitions.
334 Also, getting dependency information for Make.
335 * Assembler Options:: Passing options to the assembler.
336 * Link Options:: Specifying libraries and so on.
337 * Directory Options:: Where to find header files and libraries.
338 Where to find the compiler executable files.
339 * Spec Files:: How to pass switches to sub-processes.
340 * Target Options:: Running a cross-compiler, or an old version of GCC.
341 * Submodel Options:: Specifying minor hardware or convention variations,
342 such as 68010 vs 68020.
343 * Code Gen Options:: Specifying conventions for function calls, data layout
345 * Environment Variables:: Env vars that affect GCC.
346 * Precompiled Headers:: Compiling a header once, and using it many times.
347 * Running Protoize:: Automatically adding or removing function prototypes.
350 File: gcc.info, Node: Option Summary, Next: Overall Options, Up: Invoking GCC
355 Here is a summary of all the options, grouped by type. Explanations are
356 in the following sections.
359 *Note Options Controlling the Kind of Output: Overall Options.
360 -c -S -E -o FILE -combine -pipe -pass-exit-codes
361 -x LANGUAGE -v -### --help --target-help --version @FILE
364 *Note Options Controlling C Dialect: C Dialect Options.
365 -ansi -std=STANDARD -fgnu89-inline
367 -fno-asm -fno-builtin -fno-builtin-FUNCTION
368 -fhosted -ffreestanding -fopenmp -fms-extensions
369 -trigraphs -no-integrated-cpp -traditional -traditional-cpp
370 -fallow-single-precision -fcond-mismatch
371 -fsigned-bitfields -fsigned-char
372 -funsigned-bitfields -funsigned-char
374 _C++ Language Options_
375 *Note Options Controlling C++ Dialect: C++ Dialect Options.
376 -fabi-version=N -fno-access-control -fcheck-new
377 -fconserve-space -ffriend-injection
378 -fno-elide-constructors
379 -fno-enforce-eh-specs
380 -ffor-scope -fno-for-scope -fno-gnu-keywords
381 -fno-implicit-templates
382 -fno-implicit-inline-templates
383 -fno-implement-inlines -fms-extensions
384 -fno-nonansi-builtins -fno-operator-names
385 -fno-optional-diags -fpermissive
386 -frepo -fno-rtti -fstats -ftemplate-depth-N
387 -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++
388 -fno-default-inline -fvisibility-inlines-hidden
389 -Wabi -Wctor-dtor-privacy
390 -Wnon-virtual-dtor -Wreorder
391 -Weffc++ -Wno-deprecated -Wstrict-null-sentinel
392 -Wno-non-template-friend -Wold-style-cast
393 -Woverloaded-virtual -Wno-pmf-conversions
396 _Objective-C and Objective-C++ Language Options_
397 *Note Options Controlling Objective-C and Objective-C++ Dialects:
398 Objective-C and Objective-C++ Dialect Options.
399 -fconstant-string-class=CLASS-NAME
400 -fgnu-runtime -fnext-runtime
402 -fobjc-call-cxx-cdtors
403 -fobjc-direct-dispatch
406 -freplace-objc-classes
410 -Wno-protocol -Wselector
411 -Wstrict-selector-match
412 -Wundeclared-selector
414 _Language Independent Options_
415 *Note Options to Control Diagnostic Messages Formatting: Language
418 -fdiagnostics-show-location=[once|every-line]
419 -fdiagnostics-show-option
422 *Note Options to Request or Suppress Warnings: Warning Options.
423 -fsyntax-only -pedantic -pedantic-errors
424 -w -Wextra -Wall -Waddress -Waggregate-return -Wno-attributes
425 -Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment
426 -Wconversion -Wno-deprecated-declarations
427 -Wdisabled-optimization -Wno-div-by-zero -Wno-endif-labels
428 -Werror -Werror=* -Werror-implicit-function-declaration
429 -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2
430 -Wno-format-extra-args -Wformat-nonliteral
431 -Wformat-security -Wformat-y2k
432 -Wimplicit -Wimplicit-function-declaration -Wimplicit-int
433 -Wimport -Wno-import -Winit-self -Winline
434 -Wno-int-to-pointer-cast
435 -Wno-invalid-offsetof -Winvalid-pch
436 -Wlarger-than-LEN -Wframe-larger-than-LEN
437 -Wunsafe-loop-optimizations -Wlong-long
438 -Wmain -Wmissing-braces -Wmissing-field-initializers
439 -Wmissing-format-attribute -Wmissing-include-dirs
441 -Wno-multichar -Wnonnull -Wno-overflow
442 -Woverlength-strings -Wpacked -Wpadded
443 -Wparentheses -Wpointer-arith -Wno-pointer-to-int-cast
445 -Wreturn-type -Wsequence-point -Wshadow
446 -Wsign-compare -Wstack-protector
447 -Wstrict-aliasing -Wstrict-aliasing=n
448 -Wstrict-overflow -Wstrict-overflow=N
449 -Wswitch -Wswitch-default -Wswitch-enum
450 -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized
451 -Wunknown-pragmas -Wno-pragmas -Wunreachable-code
452 -Wunused -Wunused-function -Wunused-label -Wunused-parameter
453 -Wunused-value -Wunused-variable
454 -Wvariadic-macros -Wvla
455 -Wvolatile-register-var -Wwrite-strings
457 _C-only Warning Options_
458 -Wbad-function-cast -Wmissing-declarations
459 -Wmissing-prototypes -Wnested-externs -Wold-style-definition
460 -Wstrict-prototypes -Wtraditional
461 -Wdeclaration-after-statement -Wpointer-sign
464 *Note Options for Debugging Your Program or GCC: Debugging Options.
465 -dLETTERS -dumpspecs -dumpmachine -dumpversion
466 -fdump-noaddr -fdump-unnumbered -fdump-translation-unit[-N]
467 -fdump-class-hierarchy[-N]
468 -fdump-ipa-all -fdump-ipa-cgraph
470 -fdump-tree-original[-N]
471 -fdump-tree-optimized[-N]
472 -fdump-tree-inlined[-N]
473 -fdump-tree-cfg -fdump-tree-vcg -fdump-tree-alias
475 -fdump-tree-ssa[-N] -fdump-tree-pre[-N]
476 -fdump-tree-ccp[-N] -fdump-tree-dce[-N]
477 -fdump-tree-gimple[-raw] -fdump-tree-mudflap[-N]
480 -fdump-tree-phiopt[-N]
481 -fdump-tree-forwprop[-N]
482 -fdump-tree-copyrename[-N]
483 -fdump-tree-nrv -fdump-tree-vect
489 -ftree-vectorizer-verbose=N
490 -fdump-tree-storeccp[-N]
491 -feliminate-dwarf2-dups -feliminate-unused-debug-types
492 -feliminate-unused-debug-symbols -femit-class-debug-always
493 -fmem-report -fprofile-arcs
494 -frandom-seed=STRING -fsched-verbose=N
495 -ftest-coverage -ftime-report -fvar-tracking
496 -g -gLEVEL -gcoff -gdwarf-2
497 -ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+
498 -femit-struct-debug-baseonly -femit-struct-debug-reduced
499 -femit-struct-debug-detailed[=SPEC-LIST]
500 -p -pg -print-file-name=LIBRARY -print-libgcc-file-name
501 -print-multi-directory -print-multi-lib
502 -print-prog-name=PROGRAM -print-search-dirs -Q
505 _Optimization Options_
506 *Note Options that Control Optimization: Optimize Options.
507 -falign-functions=N -falign-jumps=N
508 -falign-labels=N -falign-loops=N
509 -fbounds-check -fmudflap -fmudflapth -fmudflapir
510 -fbranch-probabilities -fprofile-values -fvpt -fbranch-target-load-optimize
511 -fbranch-target-load-optimize2 -fbtr-bb-exclusive
512 -fcaller-saves -fcprop-registers -fcse-follow-jumps
513 -fcse-skip-blocks -fcx-limited-range -fdata-sections
514 -fdelayed-branch -fdelete-null-pointer-checks -fearly-inlining
515 -fexpensive-optimizations -ffast-math -ffloat-store
516 -fforce-addr -ffunction-sections
517 -fgcse -fgcse-lm -fgcse-sm -fgcse-las -fgcse-after-reload
518 -fcrossjumping -fif-conversion -fif-conversion2
519 -finline-functions -finline-functions-called-once
520 -finline-limit=N -fkeep-inline-functions
521 -fkeep-static-consts -fmerge-constants -fmerge-all-constants
522 -fmodulo-sched -fno-branch-count-reg
523 -fno-default-inline -fno-defer-pop -fmove-loop-invariants
524 -fno-function-cse -fno-guess-branch-probability
525 -fno-inline -fno-math-errno -fno-peephole -fno-peephole2
526 -funsafe-math-optimizations -funsafe-loop-optimizations -ffinite-math-only
527 -fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss
528 -fomit-frame-pointer -foptimize-register-move
529 -foptimize-sibling-calls -fprefetch-loop-arrays
530 -fprofile-generate -fprofile-use
531 -fregmove -frename-registers
532 -freorder-blocks -freorder-blocks-and-partition -freorder-functions
533 -frerun-cse-after-loop
534 -frounding-math -frtl-abstract-sequences
535 -fschedule-insns -fschedule-insns2
536 -fno-sched-interblock -fno-sched-spec -fsched-spec-load
537 -fsched-spec-load-dangerous
538 -fsched-stalled-insns=N -fsched-stalled-insns-dep=N
539 -fsched2-use-superblocks
540 -fsched2-use-traces -fsee -freschedule-modulo-scheduled-loops
541 -fsection-anchors -fsignaling-nans -fsingle-precision-constant
542 -fstack-protector -fstack-protector-all
543 -fstrict-aliasing -fstrict-overflow -ftracer -fthread-jumps
544 -funroll-all-loops -funroll-loops -fpeel-loops
545 -fsplit-ivs-in-unroller -funswitch-loops
546 -fvariable-expansion-in-unroller
547 -ftree-pre -ftree-ccp -ftree-dce -ftree-loop-optimize
548 -ftree-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts
549 -ftree-dominator-opts -ftree-dse -ftree-copyrename -ftree-sink
550 -ftree-ch -ftree-sra -ftree-ter -ftree-lrs -ftree-fre -ftree-vectorize
551 -ftree-vect-loop-version -ftree-salias -fipa-pta -fweb
552 -ftree-copy-prop -ftree-store-ccp -ftree-store-copy-prop -fwhole-program
554 -O -O0 -O1 -O2 -O3 -Os
556 _Preprocessor Options_
557 *Note Options Controlling the Preprocessor: Preprocessor Options.
563 -include FILE -imacros FILE
564 -iprefix FILE -iwithprefix DIR
565 -iwithprefixbefore DIR -isystem DIR
566 -imultilib DIR -isysroot DIR
567 -M -MM -MF -MG -MP -MQ -MT -nostdinc
568 -P -fworking-directory -remap
569 -trigraphs -undef -UMACRO -Wp,OPTION
570 -Xpreprocessor OPTION
573 *Note Passing Options to the Assembler: Assembler Options.
574 -Wa,OPTION -Xassembler OPTION
577 *Note Options for Linking: Link Options.
578 OBJECT-FILE-NAME -lLIBRARY
579 -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic
580 -s -static -static-libgcc -shared -shared-libgcc -symbolic
581 -Wl,OPTION -Xlinker OPTION
585 *Note Options for Directory Search: Directory Options.
586 -BPREFIX -IDIR -iquoteDIR -LDIR
587 -specs=FILE -I- --sysroot=DIR
590 *Note Target Options::.
591 -V VERSION -b MACHINE
593 _Machine Dependent Options_
594 *Note Hardware Models and Configurations: Submodel Options.
598 -mmangle-cpu -mcpu=CPU -mtext=TEXT-SECTION
599 -mdata=DATA-SECTION -mrodata=READONLY-DATA-SECTION
602 -mapcs-frame -mno-apcs-frame
604 -mapcs-stack-check -mno-apcs-stack-check
605 -mapcs-float -mno-apcs-float
606 -mapcs-reentrant -mno-apcs-reentrant
607 -msched-prolog -mno-sched-prolog
608 -mlittle-endian -mbig-endian -mwords-little-endian
609 -mfloat-abi=NAME -msoft-float -mhard-float -mfpe
610 -mthumb-interwork -mno-thumb-interwork
611 -mcpu=NAME -march=NAME -mfpu=NAME
612 -mstructure-size-boundary=N
614 -mlong-calls -mno-long-calls
615 -msingle-pic-base -mno-single-pic-base
618 -mcirrus-fix-invalid-insns -mno-cirrus-fix-invalid-insns
621 -mtpcs-frame -mtpcs-leaf-frame
622 -mcaller-super-interworking -mcallee-super-interworking
626 -mmcu=MCU -msize -minit-stack=N -mno-interrupts
627 -mcall-prologues -mno-tablejump -mtiny-stack -mint8
630 -momit-leaf-frame-pointer -mno-omit-leaf-frame-pointer
631 -mspecld-anomaly -mno-specld-anomaly -mcsync-anomaly -mno-csync-anomaly
632 -mlow-64k -mno-low64k -mid-shared-library
633 -mno-id-shared-library -mshared-library-id=N
634 -mlong-calls -mno-long-calls
637 -mcpu=CPU -march=CPU -mtune=CPU
638 -mmax-stack-frame=N -melinux-stacksize=N
639 -metrax4 -metrax100 -mpdebug -mcc-init -mno-side-effects
640 -mstack-align -mdata-align -mconst-align
641 -m32-bit -m16-bit -m8-bit -mno-prologue-epilogue -mno-gotplt
642 -melf -maout -melinux -mlinux -sim -sim2
643 -mmul-bug-workaround -mno-mul-bug-workaround
649 -all_load -allowable_client -arch -arch_errors_fatal
650 -arch_only -bind_at_load -bundle -bundle_loader
651 -client_name -compatibility_version -current_version
653 -dependency-file -dylib_file -dylinker_install_name
654 -dynamic -dynamiclib -exported_symbols_list
655 -filelist -flat_namespace -force_cpusubtype_ALL
656 -force_flat_namespace -headerpad_max_install_names
657 -image_base -init -install_name -keep_private_externs
658 -multi_module -multiply_defined -multiply_defined_unused
659 -noall_load -no_dead_strip_inits_and_terms
660 -nofixprebinding -nomultidefs -noprebind -noseglinkedit
661 -pagezero_size -prebind -prebind_all_twolevel_modules
662 -private_bundle -read_only_relocs -sectalign
663 -sectobjectsymbols -whyload -seg1addr
664 -sectcreate -sectobjectsymbols -sectorder
665 -segaddr -segs_read_only_addr -segs_read_write_addr
666 -seg_addr_table -seg_addr_table_filename -seglinkedit
667 -segprot -segs_read_only_addr -segs_read_write_addr
668 -single_module -static -sub_library -sub_umbrella
669 -twolevel_namespace -umbrella -undefined
670 -unexported_symbols_list -weak_reference_mismatches
671 -whatsloaded -F -gused -gfull -mmacosx-version-min=VERSION
672 -mkernel -mone-byte-bool
675 -mno-fp-regs -msoft-float -malpha-as -mgas
676 -mieee -mieee-with-inexact -mieee-conformant
677 -mfp-trap-mode=MODE -mfp-rounding-mode=MODE
678 -mtrap-precision=MODE -mbuild-constants
679 -mcpu=CPU-TYPE -mtune=CPU-TYPE
680 -mbwx -mmax -mfix -mcix
681 -mfloat-vax -mfloat-ieee
682 -mexplicit-relocs -msmall-data -mlarge-data
683 -msmall-text -mlarge-text
684 -mmemory-latency=TIME
686 _DEC Alpha/VMS Options_
690 -mgpr-32 -mgpr-64 -mfpr-32 -mfpr-64
691 -mhard-float -msoft-float
692 -malloc-cc -mfixed-cc -mdword -mno-dword
694 -mmedia -mno-media -mmuladd -mno-muladd
695 -mfdpic -minline-plt -mgprel-ro -multilib-library-pic
696 -mlinked-fp -mlong-calls -malign-labels
697 -mlibrary-pic -macc-4 -macc-8
698 -mpack -mno-pack -mno-eflags -mcond-move -mno-cond-move
699 -moptimize-membar -mno-optimize-membar
700 -mscc -mno-scc -mcond-exec -mno-cond-exec
701 -mvliw-branch -mno-vliw-branch
702 -mmulti-cond-exec -mno-multi-cond-exec -mnested-cond-exec
703 -mno-nested-cond-exec -mtomcat-stats
711 -mrelax -mh -ms -mn -mint32 -malign-300
714 -march=ARCHITECTURE-TYPE
715 -mbig-switch -mdisable-fpregs -mdisable-indexing
716 -mfast-indirect-calls -mgas -mgnu-ld -mhp-ld
717 -mfixed-range=REGISTER-RANGE
718 -mjump-in-delay -mlinker-opt -mlong-calls
719 -mlong-load-store -mno-big-switch -mno-disable-fpregs
720 -mno-disable-indexing -mno-fast-indirect-calls -mno-gas
721 -mno-jump-in-delay -mno-long-load-store
722 -mno-portable-runtime -mno-soft-float
723 -mno-space-regs -msoft-float -mpa-risc-1-0
724 -mpa-risc-1-1 -mpa-risc-2-0 -mportable-runtime
725 -mschedule=CPU-TYPE -mspace-regs -msio -mwsio
726 -munix=UNIX-STD -nolibdld -static -threads
728 _i386 and x86-64 Options_
729 -mtune=CPU-TYPE -march=CPU-TYPE
731 -masm=DIALECT -mno-fancy-math-387
732 -mno-fp-ret-in-387 -msoft-float -msvr3-shlib
733 -mno-wide-multiply -mrtd -malign-double
734 -mpreferred-stack-boundary=NUM
735 -mmmx -msse -msse2 -msse3 -m3dnow
736 -mthreads -mno-align-stringops -minline-all-stringops
737 -mpush-args -maccumulate-outgoing-args -m128bit-long-double
738 -m96bit-long-double -mregparm=NUM -msseregparm
740 -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs
742 -m32 -m64 -mlarge-data-threshold=NUM
745 -mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic
746 -mvolatile-asm-stop -mregister-names -mno-sdata
747 -mconstant-gp -mauto-pic -minline-float-divide-min-latency
748 -minline-float-divide-max-throughput
749 -minline-int-divide-min-latency
750 -minline-int-divide-max-throughput
751 -minline-sqrt-min-latency -minline-sqrt-max-throughput
752 -mno-dwarf2-asm -mearly-stop-bits
753 -mfixed-range=REGISTER-RANGE -mtls-size=TLS-SIZE
754 -mtune=CPU-TYPE -mt -pthread -milp32 -mlp64
755 -mno-sched-br-data-spec -msched-ar-data-spec -mno-sched-control-spec
756 -msched-br-in-data-spec -msched-ar-in-data-spec -msched-in-control-spec
757 -msched-ldc -mno-sched-control-ldc -mno-sched-spec-verbose
758 -mno-sched-prefer-non-data-spec-insns
759 -mno-sched-prefer-non-control-spec-insns
760 -mno-sched-count-spec-in-critical-path
765 -malign-loops -mno-align-loops
768 -mmodel=CODE-SIZE-MODEL-TYPE
770 -mno-flush-func -mflush-func=NAME
771 -mno-flush-trap -mflush-trap=NUMBER
775 -mcpu=CPU -msim -memregs=NUMBER
778 -m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040
779 -m68060 -mcpu32 -m5200 -mcfv4e -m68881 -mbitfield
781 -mnobitfield -mrtd -mshort -msoft-float -mpcrel
782 -malign-int -mstrict-align -msep-data -mno-sep-data
783 -mshared-library-id=n -mid-shared-library -mno-id-shared-library
786 -m6811 -m6812 -m68hc11 -m68hc12 -m68hcs12
787 -mauto-incdec -minmax -mlong-calls -mshort
788 -msoft-reg-count=COUNT
791 -mhardlit -mno-hardlit -mdiv -mno-div -mrelax-immediates
792 -mno-relax-immediates -mwide-bitfields -mno-wide-bitfields
793 -m4byte-functions -mno-4byte-functions -mcallgraph-data
794 -mno-callgraph-data -mslow-bytes -mno-slow-bytes -mno-lsim
795 -mlittle-endian -mbig-endian -m210 -m340 -mstack-increment
798 -EL -EB -march=ARCH -mtune=ARCH
799 -mips1 -mips2 -mips3 -mips4 -mips32 -mips32r2 -mips64
800 -mips16 -mno-mips16 -mabi=ABI -mabicalls -mno-abicalls
801 -mshared -mno-shared -mxgot -mno-xgot -mgp32 -mgp64
802 -mfp32 -mfp64 -mhard-float -msoft-float
803 -msingle-float -mdouble-float -mdsp -mpaired-single -mips3d
804 -mlong64 -mlong32 -msym32 -mno-sym32
805 -GNUM -membedded-data -mno-embedded-data
806 -muninit-const-in-rodata -mno-uninit-const-in-rodata
807 -msplit-addresses -mno-split-addresses
808 -mexplicit-relocs -mno-explicit-relocs
809 -mcheck-zero-division -mno-check-zero-division
810 -mdivide-traps -mdivide-breaks
811 -mmemcpy -mno-memcpy -mlong-calls -mno-long-calls
812 -mmad -mno-mad -mfused-madd -mno-fused-madd -nocpp
813 -mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400
814 -mfix-vr4120 -mno-fix-vr4120 -mfix-vr4130
815 -mfix-sb1 -mno-fix-sb1
816 -mflush-func=FUNC -mno-flush-func
817 -mbranch-likely -mno-branch-likely
818 -mfp-exceptions -mno-fp-exceptions
819 -mvr4130-align -mno-vr4130-align
822 -mlibfuncs -mno-libfuncs -mepsilon -mno-epsilon -mabi=gnu
823 -mabi=mmixware -mzero-extend -mknuthdiv -mtoplevel-symbols
824 -melf -mbranch-predict -mno-branch-predict -mbase-addresses
825 -mno-base-addresses -msingle-exit -mno-single-exit
828 -mmult-bug -mno-mult-bug
831 -mreturn-pointer-on-d0
835 -mno-crt0 -mbacc -msim
839 -mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10
840 -mbcopy -mbcopy-builtin -mint32 -mno-int16
841 -mint16 -mno-int32 -mfloat32 -mno-float64
842 -mfloat64 -mno-float32 -mabshi -mno-abshi
843 -mbranch-expensive -mbranch-cheap
844 -msplit -mno-split -munix-asm -mdec-asm
846 _PowerPC Options_ See RS/6000 and PowerPC Options.
848 _RS/6000 and PowerPC Options_
851 -mpower -mno-power -mpower2 -mno-power2
852 -mpowerpc -mpowerpc64 -mno-powerpc
853 -maltivec -mno-altivec
854 -mpowerpc-gpopt -mno-powerpc-gpopt
855 -mpowerpc-gfxopt -mno-powerpc-gfxopt
856 -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mfprnd -mno-fprnd
857 -mnew-mnemonics -mold-mnemonics
858 -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc
859 -m64 -m32 -mxl-compat -mno-xl-compat -mpe
860 -malign-power -malign-natural
861 -msoft-float -mhard-float -mmultiple -mno-multiple
862 -mstring -mno-string -mupdate -mno-update
863 -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align
864 -mstrict-align -mno-strict-align -mrelocatable
865 -mno-relocatable -mrelocatable-lib -mno-relocatable-lib
866 -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian
867 -mdynamic-no-pic -maltivec -mswdiv
868 -mprioritize-restricted-insns=PRIORITY
869 -msched-costly-dep=DEPENDENCE_TYPE
870 -minsert-sched-nops=SCHEME
871 -mcall-sysv -mcall-netbsd
872 -maix-struct-return -msvr4-struct-return
873 -mabi=ABI-TYPE -msecure-plt -mbss-plt
881 -mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double
882 -mprototype -mno-prototype
883 -msim -mmvme -mads -myellowknife -memb -msdata
884 -msdata=OPT -mvxworks -mwindiss -G NUM -pthread
886 _S/390 and zSeries Options_
887 -mtune=CPU-TYPE -march=CPU-TYPE
888 -mhard-float -msoft-float -mlong-double-64 -mlong-double-128
889 -mbackchain -mno-backchain -mpacked-stack -mno-packed-stack
890 -msmall-exec -mno-small-exec -mmvcle -mno-mvcle
891 -m64 -m31 -mdebug -mno-debug -mesa -mzarch
892 -mtpf-trace -mno-tpf-trace -mfused-madd -mno-fused-madd
893 -mwarn-framesize -mwarn-dynamicstack -mstack-size -mstack-guard
900 -mscore5 -mscore5u -mscore7 -mscore7d
903 -m1 -m2 -m2e -m3 -m3e
904 -m4-nofpu -m4-single-only -m4-single -m4
905 -m4a-nofpu -m4a-single-only -m4a-single -m4a -m4al
906 -m5-64media -m5-64media-nofpu
907 -m5-32media -m5-32media-nofpu
908 -m5-compact -m5-compact-nofpu
909 -mb -ml -mdalign -mrelax
910 -mbigtable -mfmovd -mhitachi -mrenesas -mno-renesas -mnomacsave
911 -mieee -misize -mpadstruct -mspace
912 -mprefergot -musermode -multcost=NUMBER -mdiv=STRATEGY
913 -mdivsi3_libfunc=NAME
914 -madjust-unroll -mindexed-addressing -mgettrcost=NUMBER -mpt-fixed
921 -m32 -m64 -mapp-regs -mno-app-regs
922 -mfaster-structs -mno-faster-structs
923 -mfpu -mno-fpu -mhard-float -msoft-float
924 -mhard-quad-float -msoft-quad-float
925 -mimpure-text -mno-impure-text -mlittle-endian
926 -mstack-bias -mno-stack-bias
927 -munaligned-doubles -mno-unaligned-doubles
928 -mv8plus -mno-v8plus -mvis -mno-vis
929 -threads -pthreads -pthread
932 -Qy -Qn -YP,PATHS -Ym,DIR
934 _TMS320C3x/C4x Options_
935 -mcpu=CPU -mbig -msmall -mregparm -mmemparm
936 -mfast-fix -mmpyi -mbk -mti -mdp-isr-reload
937 -mrpts=COUNT -mrptb -mdb -mloop-unsigned
938 -mparallel-insns -mparallel-mpy -mpreserve-float
941 -mlong-calls -mno-long-calls -mep -mno-ep
942 -mprolog-function -mno-prolog-function -mspace
943 -mtda=N -msda=N -mzda=N
944 -mapp-regs -mno-app-regs
945 -mdisable-callt -mno-disable-callt
953 _x86-64 Options_ See i386 and x86-64 Options.
959 -mconst16 -mno-const16
960 -mfused-madd -mno-fused-madd
961 -mtext-section-literals -mno-text-section-literals
962 -mtarget-align -mno-target-align
963 -mlongcalls -mno-longcalls
965 _zSeries Options_ See S/390 and zSeries Options.
967 _Code Generation Options_
968 *Note Options for Code Generation Conventions: Code Gen Options.
969 -fcall-saved-REG -fcall-used-REG
970 -ffixed-REG -fexceptions
971 -fnon-call-exceptions -funwind-tables
972 -fasynchronous-unwind-tables
973 -finhibit-size-directive -finstrument-functions
974 -finstrument-functions-exclude-function-list=SYM,SYM,...
975 -finstrument-functions-exclude-file-list=FILE,FILE,...
976 -fno-common -fno-ident
977 -fpcc-struct-return -fpic -fPIC -fpie -fPIE
979 -freg-struct-return -fshort-enums
980 -fshort-double -fshort-wchar
981 -fverbose-asm -fpack-struct[=N] -fstack-check
982 -fstack-limit-register=REG -fstack-limit-symbol=SYM
983 -fargument-alias -fargument-noalias
984 -fargument-noalias-global -fargument-noalias-anything
985 -fleading-underscore -ftls-model=MODEL
986 -ftrapv -fwrapv -fbounds-check
992 * Overall Options:: Controlling the kind of output:
993 an executable, object files, assembler files,
994 or preprocessed source.
995 * C Dialect Options:: Controlling the variant of C language compiled.
996 * C++ Dialect Options:: Variations on C++.
997 * Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C
999 * Language Independent Options:: Controlling how diagnostics should be
1001 * Warning Options:: How picky should the compiler be?
1002 * Debugging Options:: Symbol tables, measurements, and debugging dumps.
1003 * Optimize Options:: How much optimization?
1004 * Preprocessor Options:: Controlling header files and macro definitions.
1005 Also, getting dependency information for Make.
1006 * Assembler Options:: Passing options to the assembler.
1007 * Link Options:: Specifying libraries and so on.
1008 * Directory Options:: Where to find header files and libraries.
1009 Where to find the compiler executable files.
1010 * Spec Files:: How to pass switches to sub-processes.
1011 * Target Options:: Running a cross-compiler, or an old version of GCC.
1014 File: gcc.info, Node: Overall Options, Next: Invoking G++, Prev: Option Summary, Up: Invoking GCC
1016 3.2 Options Controlling the Kind of Output
1017 ==========================================
1019 Compilation can involve up to four stages: preprocessing, compilation
1020 proper, assembly and linking, always in that order. GCC is capable of
1021 preprocessing and compiling several files either into several assembler
1022 input files, or into one assembler input file; then each assembler
1023 input file produces an object file, and linking combines all the object
1024 files (those newly compiled, and those specified as input) into an
1027 For any given input file, the file name suffix determines what kind of
1028 compilation is done:
1031 C source code which must be preprocessed.
1034 C source code which should not be preprocessed.
1037 C++ source code which should not be preprocessed.
1040 Objective-C source code. Note that you must link with the
1041 `libobjc' library to make an Objective-C program work.
1044 Objective-C source code which should not be preprocessed.
1048 Objective-C++ source code. Note that you must link with the
1049 `libobjc' library to make an Objective-C++ program work. Note
1050 that `.M' refers to a literal capital M.
1053 Objective-C++ source code which should not be preprocessed.
1056 C, C++, Objective-C or Objective-C++ header file to be turned into
1057 a precompiled header.
1066 C++ source code which must be preprocessed. Note that in `.cxx',
1067 the last two letters must both be literally `x'. Likewise, `.C'
1068 refers to a literal capital C.
1072 Objective-C++ source code which must be preprocessed.
1075 Objective-C++ source code which should not be preprocessed.
1079 C++ header file to be turned into a precompiled header.
1084 Fixed form Fortran source code which should not be preprocessed.
1089 Fixed form Fortran source code which must be preprocessed (with
1090 the traditional preprocessor).
1094 Free form Fortran source code which should not be preprocessed.
1098 Free form Fortran source code which must be preprocessed (with the
1099 traditional preprocessor).
1102 Ada source code file which contains a library unit declaration (a
1103 declaration of a package, subprogram, or generic, or a generic
1104 instantiation), or a library unit renaming declaration (a package,
1105 generic, or subprogram renaming declaration). Such files are also
1109 Ada source code file containing a library unit body (a subprogram
1110 or package body). Such files are also called "bodies".
1116 Assembler code which must be preprocessed.
1119 An object file to be fed straight into linking. Any file name
1120 with no recognized suffix is treated this way.
1122 You can specify the input language explicitly with the `-x' option:
1125 Specify explicitly the LANGUAGE for the following input files
1126 (rather than letting the compiler choose a default based on the
1127 file name suffix). This option applies to all following input
1128 files until the next `-x' option. Possible values for LANGUAGE
1130 c c-header c-cpp-output
1131 c++ c++-header c++-cpp-output
1132 objective-c objective-c-header objective-c-cpp-output
1133 objective-c++ objective-c++-header objective-c++-cpp-output
1134 assembler assembler-with-cpp
1141 Turn off any specification of a language, so that subsequent files
1142 are handled according to their file name suffixes (as they are if
1143 `-x' has not been used at all).
1146 Normally the `gcc' program will exit with the code of 1 if any
1147 phase of the compiler returns a non-success return code. If you
1148 specify `-pass-exit-codes', the `gcc' program will instead return
1149 with numerically highest error produced by any phase that returned
1150 an error indication. The C, C++, and Fortran frontends return 4,
1151 if an internal compiler error is encountered.
1153 If you only want some of the stages of compilation, you can use `-x'
1154 (or filename suffixes) to tell `gcc' where to start, and one of the
1155 options `-c', `-S', or `-E' to say where `gcc' is to stop. Note that
1156 some combinations (for example, `-x cpp-output -E') instruct `gcc' to
1160 Compile or assemble the source files, but do not link. The linking
1161 stage simply is not done. The ultimate output is in the form of an
1162 object file for each source file.
1164 By default, the object file name for a source file is made by
1165 replacing the suffix `.c', `.i', `.s', etc., with `.o'.
1167 Unrecognized input files, not requiring compilation or assembly,
1171 Stop after the stage of compilation proper; do not assemble. The
1172 output is in the form of an assembler code file for each
1173 non-assembler input file specified.
1175 By default, the assembler file name for a source file is made by
1176 replacing the suffix `.c', `.i', etc., with `.s'.
1178 Input files that don't require compilation are ignored.
1181 Stop after the preprocessing stage; do not run the compiler
1182 proper. The output is in the form of preprocessed source code,
1183 which is sent to the standard output.
1185 Input files which don't require preprocessing are ignored.
1188 Place output in file FILE. This applies regardless to whatever
1189 sort of output is being produced, whether it be an executable file,
1190 an object file, an assembler file or preprocessed C code.
1192 If `-o' is not specified, the default is to put an executable file
1193 in `a.out', the object file for `SOURCE.SUFFIX' in `SOURCE.o', its
1194 assembler file in `SOURCE.s', a precompiled header file in
1195 `SOURCE.SUFFIX.gch', and all preprocessed C source on standard
1199 Print (on standard error output) the commands executed to run the
1200 stages of compilation. Also print the version number of the
1201 compiler driver program and of the preprocessor and the compiler
1205 Like `-v' except the commands are not executed and all command
1206 arguments are quoted. This is useful for shell scripts to capture
1207 the driver-generated command lines.
1210 Use pipes rather than temporary files for communication between the
1211 various stages of compilation. This fails to work on some systems
1212 where the assembler is unable to read from a pipe; but the GNU
1213 assembler has no trouble.
1216 If you are compiling multiple source files, this option tells the
1217 driver to pass all the source files to the compiler at once (for
1218 those languages for which the compiler can handle this). This
1219 will allow intermodule analysis (IMA) to be performed by the
1220 compiler. Currently the only language for which this is supported
1221 is C. If you pass source files for multiple languages to the
1222 driver, using this option, the driver will invoke the compiler(s)
1223 that support IMA once each, passing each compiler all the source
1224 files appropriate for it. For those languages that do not support
1225 IMA this option will be ignored, and the compiler will be invoked
1226 once for each source file in that language. If you use this
1227 option in conjunction with `-save-temps', the compiler will
1228 generate multiple pre-processed files (one for each source file),
1229 but only one (combined) `.o' or `.s' file.
1232 Print (on the standard output) a description of the command line
1233 options understood by `gcc'. If the `-v' option is also specified
1234 then `--help' will also be passed on to the various processes
1235 invoked by `gcc', so that they can display the command line options
1236 they accept. If the `-Wextra' option is also specified then
1237 command line options which have no documentation associated with
1238 them will also be displayed.
1241 Print (on the standard output) a description of target specific
1242 command line options for each tool.
1245 Display the version number and copyrights of the invoked GCC.
1248 Read command-line options from FILE. The options read are
1249 inserted in place of the original @FILE option. If FILE does not
1250 exist, or cannot be read, then the option will be treated
1251 literally, and not removed.
1253 Options in FILE are separated by whitespace. A whitespace
1254 character may be included in an option by surrounding the entire
1255 option in either single or double quotes. Any character
1256 (including a backslash) may be included by prefixing the character
1257 to be included with a backslash. The FILE may itself contain
1258 additional @FILE options; any such options will be processed
1262 File: gcc.info, Node: Invoking G++, Next: C Dialect Options, Prev: Overall Options, Up: Invoking GCC
1264 3.3 Compiling C++ Programs
1265 ==========================
1267 C++ source files conventionally use one of the suffixes `.C', `.cc',
1268 `.cpp', `.CPP', `.c++', `.cp', or `.cxx'; C++ header files often use
1269 `.hh' or `.H'; and preprocessed C++ files use the suffix `.ii'. GCC
1270 recognizes files with these names and compiles them as C++ programs
1271 even if you call the compiler the same way as for compiling C programs
1272 (usually with the name `gcc').
1274 However, the use of `gcc' does not add the C++ library. `g++' is a
1275 program that calls GCC and treats `.c', `.h' and `.i' files as C++
1276 source files instead of C source files unless `-x' is used, and
1277 automatically specifies linking against the C++ library. This program
1278 is also useful when precompiling a C header file with a `.h' extension
1279 for use in C++ compilations. On many systems, `g++' is also installed
1280 with the name `c++'.
1282 When you compile C++ programs, you may specify many of the same
1283 command-line options that you use for compiling programs in any
1284 language; or command-line options meaningful for C and related
1285 languages; or options that are meaningful only for C++ programs. *Note
1286 Options Controlling C Dialect: C Dialect Options, for explanations of
1287 options for languages related to C. *Note Options Controlling C++
1288 Dialect: C++ Dialect Options, for explanations of options that are
1289 meaningful only for C++ programs.
1292 File: gcc.info, Node: C Dialect Options, Next: C++ Dialect Options, Prev: Invoking G++, Up: Invoking GCC
1294 3.4 Options Controlling C Dialect
1295 =================================
1297 The following options control the dialect of C (or languages derived
1298 from C, such as C++, Objective-C and Objective-C++) that the compiler
1302 In C mode, support all ISO C90 programs. In C++ mode, remove GNU
1303 extensions that conflict with ISO C++.
1305 This turns off certain features of GCC that are incompatible with
1306 ISO C90 (when compiling C code), or of standard C++ (when
1307 compiling C++ code), such as the `asm' and `typeof' keywords, and
1308 predefined macros such as `unix' and `vax' that identify the type
1309 of system you are using. It also enables the undesirable and
1310 rarely used ISO trigraph feature. For the C compiler, it disables
1311 recognition of C++ style `//' comments as well as the `inline'
1314 The alternate keywords `__asm__', `__extension__', `__inline__'
1315 and `__typeof__' continue to work despite `-ansi'. You would not
1316 want to use them in an ISO C program, of course, but it is useful
1317 to put them in header files that might be included in compilations
1318 done with `-ansi'. Alternate predefined macros such as `__unix__'
1319 and `__vax__' are also available, with or without `-ansi'.
1321 The `-ansi' option does not cause non-ISO programs to be rejected
1322 gratuitously. For that, `-pedantic' is required in addition to
1323 `-ansi'. *Note Warning Options::.
1325 The macro `__STRICT_ANSI__' is predefined when the `-ansi' option
1326 is used. Some header files may notice this macro and refrain from
1327 declaring certain functions or defining certain macros that the
1328 ISO standard doesn't call for; this is to avoid interfering with
1329 any programs that might use these names for other things.
1331 Functions which would normally be built in but do not have
1332 semantics defined by ISO C (such as `alloca' and `ffs') are not
1333 built-in functions with `-ansi' is used. *Note Other built-in
1334 functions provided by GCC: Other Builtins, for details of the
1338 Determine the language standard. This option is currently only
1339 supported when compiling C or C++. A value for this option must be
1340 provided; possible values are
1344 ISO C90 (same as `-ansi').
1347 ISO C90 as modified in amendment 1.
1353 ISO C99. Note that this standard is not yet fully supported;
1354 see `http://gcc.gnu.org/gcc-4.2/c99status.html' for more
1355 information. The names `c9x' and `iso9899:199x' are
1359 Default, ISO C90 plus GNU extensions (including some C99
1364 ISO C99 plus GNU extensions. When ISO C99 is fully
1365 implemented in GCC, this will become the default. The name
1366 `gnu9x' is deprecated.
1369 The 1998 ISO C++ standard plus amendments.
1372 The same as `-std=c++98' plus GNU extensions. This is the
1373 default for C++ code.
1375 Even when this option is not specified, you can still use some of
1376 the features of newer standards in so far as they do not conflict
1377 with previous C standards. For example, you may use
1378 `__restrict__' even when `-std=c99' is not specified.
1380 The `-std' options specifying some version of ISO C have the same
1381 effects as `-ansi', except that features that were not in ISO C90
1382 but are in the specified version (for example, `//' comments and
1383 the `inline' keyword in ISO C99) are not disabled.
1385 *Note Language Standards Supported by GCC: Standards, for details
1386 of these standard versions.
1389 The option `-fgnu89-inline' tells GCC to use the traditional GNU
1390 semantics for `inline' functions when in C99 mode. *Note An
1391 Inline Function is As Fast As a Macro: Inline. Using this option
1392 is roughly equivalent to adding the `gnu_inline' function
1393 attribute to all inline functions (*note Function Attributes::).
1395 This option is accepted by GCC versions 4.1.3 and up. In GCC
1396 versions prior to 4.3, C99 inline semantics are not supported, and
1397 thus this option is effectively assumed to be present regardless
1398 of whether or not it is specified; the only effect of specifying
1399 it explicitly is to disable warnings about using inline functions
1400 in C99 mode. Likewise, the option `-fno-gnu89-inline' is not
1401 supported in versions of GCC before 4.3. It will be supported
1402 only in C99 or gnu99 mode, not in C89 or gnu89 mode.
1404 The preprocesor macros `__GNUC_GNU_INLINE__' and
1405 `__GNUC_STDC_INLINE__' may be used to check which semantics are in
1406 effect for `inline' functions. *Note Common Predefined Macros:
1407 (cpp)Common Predefined Macros.
1409 `-aux-info FILENAME'
1410 Output to the given filename prototyped declarations for all
1411 functions declared and/or defined in a translation unit, including
1412 those in header files. This option is silently ignored in any
1413 language other than C.
1415 Besides declarations, the file indicates, in comments, the origin
1416 of each declaration (source file and line), whether the
1417 declaration was implicit, prototyped or unprototyped (`I', `N' for
1418 new or `O' for old, respectively, in the first character after the
1419 line number and the colon), and whether it came from a declaration
1420 or a definition (`C' or `F', respectively, in the following
1421 character). In the case of function definitions, a K&R-style list
1422 of arguments followed by their declarations is also provided,
1423 inside comments, after the declaration.
1426 Do not recognize `asm', `inline' or `typeof' as a keyword, so that
1427 code can use these words as identifiers. You can use the keywords
1428 `__asm__', `__inline__' and `__typeof__' instead. `-ansi' implies
1431 In C++, this switch only affects the `typeof' keyword, since `asm'
1432 and `inline' are standard keywords. You may want to use the
1433 `-fno-gnu-keywords' flag instead, which has the same effect. In
1434 C99 mode (`-std=c99' or `-std=gnu99'), this switch only affects
1435 the `asm' and `typeof' keywords, since `inline' is a standard
1439 `-fno-builtin-FUNCTION'
1440 Don't recognize built-in functions that do not begin with
1441 `__builtin_' as prefix. *Note Other built-in functions provided
1442 by GCC: Other Builtins, for details of the functions affected,
1443 including those which are not built-in functions when `-ansi' or
1444 `-std' options for strict ISO C conformance are used because they
1445 do not have an ISO standard meaning.
1447 GCC normally generates special code to handle certain built-in
1448 functions more efficiently; for instance, calls to `alloca' may
1449 become single instructions that adjust the stack directly, and
1450 calls to `memcpy' may become inline copy loops. The resulting
1451 code is often both smaller and faster, but since the function
1452 calls no longer appear as such, you cannot set a breakpoint on
1453 those calls, nor can you change the behavior of the functions by
1454 linking with a different library. In addition, when a function is
1455 recognized as a built-in function, GCC may use information about
1456 that function to warn about problems with calls to that function,
1457 or to generate more efficient code, even if the resulting code
1458 still contains calls to that function. For example, warnings are
1459 given with `-Wformat' for bad calls to `printf', when `printf' is
1460 built in, and `strlen' is known not to modify global memory.
1462 With the `-fno-builtin-FUNCTION' option only the built-in function
1463 FUNCTION is disabled. FUNCTION must not begin with `__builtin_'.
1464 If a function is named this is not built-in in this version of
1465 GCC, this option is ignored. There is no corresponding
1466 `-fbuiltin-FUNCTION' option; if you wish to enable built-in
1467 functions selectively when using `-fno-builtin' or
1468 `-ffreestanding', you may define macros such as:
1470 #define abs(n) __builtin_abs ((n))
1471 #define strcpy(d, s) __builtin_strcpy ((d), (s))
1474 Assert that compilation takes place in a hosted environment. This
1475 implies `-fbuiltin'. A hosted environment is one in which the
1476 entire standard library is available, and in which `main' has a
1477 return type of `int'. Examples are nearly everything except a
1478 kernel. This is equivalent to `-fno-freestanding'.
1481 Assert that compilation takes place in a freestanding environment.
1482 This implies `-fno-builtin'. A freestanding environment is one
1483 in which the standard library may not exist, and program startup
1484 may not necessarily be at `main'. The most obvious example is an
1485 OS kernel. This is equivalent to `-fno-hosted'.
1487 *Note Language Standards Supported by GCC: Standards, for details
1488 of freestanding and hosted environments.
1491 Enable handling of OpenMP directives `#pragma omp' in C/C++ and
1492 `!$omp' in Fortran. When `-fopenmp' is specified, the compiler
1493 generates parallel code according to the OpenMP Application
1494 Program Interface v2.5 `http://www.openmp.org/'.
1497 Accept some non-standard constructs used in Microsoft header files.
1499 Some cases of unnamed fields in structures and unions are only
1500 accepted with this option. *Note Unnamed struct/union fields
1501 within structs/unions: Unnamed Fields, for details.
1504 Support ISO C trigraphs. The `-ansi' option (and `-std' options
1505 for strict ISO C conformance) implies `-trigraphs'.
1507 `-no-integrated-cpp'
1508 Performs a compilation in two passes: preprocessing and compiling.
1509 This option allows a user supplied "cc1", "cc1plus", or "cc1obj"
1510 via the `-B' option. The user supplied compilation step can then
1511 add in an additional preprocessing step after normal preprocessing
1512 but before compiling. The default is to use the integrated cpp
1515 The semantics of this option will change if "cc1", "cc1plus", and
1516 "cc1obj" are merged.
1520 Formerly, these options caused GCC to attempt to emulate a
1521 pre-standard C compiler. They are now only supported with the
1522 `-E' switch. The preprocessor continues to support a pre-standard
1523 mode. See the GNU CPP manual for details.
1526 Allow conditional expressions with mismatched types in the second
1527 and third arguments. The value of such an expression is void.
1528 This option is not supported for C++.
1531 Let the type `char' be unsigned, like `unsigned char'.
1533 Each kind of machine has a default for what `char' should be. It
1534 is either like `unsigned char' by default or like `signed char' by
1537 Ideally, a portable program should always use `signed char' or
1538 `unsigned char' when it depends on the signedness of an object.
1539 But many programs have been written to use plain `char' and expect
1540 it to be signed, or expect it to be unsigned, depending on the
1541 machines they were written for. This option, and its inverse, let
1542 you make such a program work with the opposite default.
1544 The type `char' is always a distinct type from each of `signed
1545 char' or `unsigned char', even though its behavior is always just
1546 like one of those two.
1549 Let the type `char' be signed, like `signed char'.
1551 Note that this is equivalent to `-fno-unsigned-char', which is the
1552 negative form of `-funsigned-char'. Likewise, the option
1553 `-fno-signed-char' is equivalent to `-funsigned-char'.
1555 `-fsigned-bitfields'
1556 `-funsigned-bitfields'
1557 `-fno-signed-bitfields'
1558 `-fno-unsigned-bitfields'
1559 These options control whether a bit-field is signed or unsigned,
1560 when the declaration does not use either `signed' or `unsigned'.
1561 By default, such a bit-field is signed, because this is
1562 consistent: the basic integer types such as `int' are signed types.
1565 File: gcc.info, Node: C++ Dialect Options, Next: Objective-C and Objective-C++ Dialect Options, Prev: C Dialect Options, Up: Invoking GCC
1567 3.5 Options Controlling C++ Dialect
1568 ===================================
1570 This section describes the command-line options that are only meaningful
1571 for C++ programs; but you can also use most of the GNU compiler options
1572 regardless of what language your program is in. For example, you might
1573 compile a file `firstClass.C' like this:
1575 g++ -g -frepo -O -c firstClass.C
1577 In this example, only `-frepo' is an option meant only for C++
1578 programs; you can use the other options with any language supported by
1581 Here is a list of options that are _only_ for compiling C++ programs:
1584 Use version N of the C++ ABI. Version 2 is the version of the C++
1585 ABI that first appeared in G++ 3.4. Version 1 is the version of
1586 the C++ ABI that first appeared in G++ 3.2. Version 0 will always
1587 be the version that conforms most closely to the C++ ABI
1588 specification. Therefore, the ABI obtained using version 0 will
1589 change as ABI bugs are fixed.
1591 The default is version 2.
1593 `-fno-access-control'
1594 Turn off all access checking. This switch is mainly useful for
1595 working around bugs in the access control code.
1598 Check that the pointer returned by `operator new' is non-null
1599 before attempting to modify the storage allocated. This check is
1600 normally unnecessary because the C++ standard specifies that
1601 `operator new' will only return `0' if it is declared `throw()',
1602 in which case the compiler will always check the return value even
1603 without this option. In all other cases, when `operator new' has
1604 a non-empty exception specification, memory exhaustion is
1605 signalled by throwing `std::bad_alloc'. See also `new (nothrow)'.
1608 Put uninitialized or runtime-initialized global variables into the
1609 common segment, as C does. This saves space in the executable at
1610 the cost of not diagnosing duplicate definitions. If you compile
1611 with this flag and your program mysteriously crashes after
1612 `main()' has completed, you may have an object that is being
1613 destroyed twice because two definitions were merged.
1615 This option is no longer useful on most targets, now that support
1616 has been added for putting variables into BSS without making them
1619 `-ffriend-injection'
1620 Inject friend functions into the enclosing namespace, so that they
1621 are visible outside the scope of the class in which they are
1622 declared. Friend functions were documented to work this way in
1623 the old Annotated C++ Reference Manual, and versions of G++ before
1624 4.1 always worked that way. However, in ISO C++ a friend function
1625 which is not declared in an enclosing scope can only be found
1626 using argument dependent lookup. This option causes friends to be
1627 injected as they were in earlier releases.
1629 This option is for compatibility, and may be removed in a future
1632 `-fno-elide-constructors'
1633 The C++ standard allows an implementation to omit creating a
1634 temporary which is only used to initialize another object of the
1635 same type. Specifying this option disables that optimization, and
1636 forces G++ to call the copy constructor in all cases.
1638 `-fno-enforce-eh-specs'
1639 Don't generate code to check for violation of exception
1640 specifications at runtime. This option violates the C++ standard,
1641 but may be useful for reducing code size in production builds,
1642 much like defining `NDEBUG'. This does not give user code
1643 permission to throw exceptions in violation of the exception
1644 specifications; the compiler will still optimize based on the
1645 specifications, so throwing an unexpected exception will result in
1650 If `-ffor-scope' is specified, the scope of variables declared in
1651 a for-init-statement is limited to the `for' loop itself, as
1652 specified by the C++ standard. If `-fno-for-scope' is specified,
1653 the scope of variables declared in a for-init-statement extends to
1654 the end of the enclosing scope, as was the case in old versions of
1655 G++, and other (traditional) implementations of C++.
1657 The default if neither flag is given to follow the standard, but
1658 to allow and give a warning for old-style code that would
1659 otherwise be invalid, or have different behavior.
1662 Do not recognize `typeof' as a keyword, so that code can use this
1663 word as an identifier. You can use the keyword `__typeof__'
1664 instead. `-ansi' implies `-fno-gnu-keywords'.
1666 `-fno-implicit-templates'
1667 Never emit code for non-inline templates which are instantiated
1668 implicitly (i.e. by use); only emit code for explicit
1669 instantiations. *Note Template Instantiation::, for more
1672 `-fno-implicit-inline-templates'
1673 Don't emit code for implicit instantiations of inline templates,
1674 either. The default is to handle inlines differently so that
1675 compiles with and without optimization will need the same set of
1676 explicit instantiations.
1678 `-fno-implement-inlines'
1679 To save space, do not emit out-of-line copies of inline functions
1680 controlled by `#pragma implementation'. This will cause linker
1681 errors if these functions are not inlined everywhere they are
1685 Disable pedantic warnings about constructs used in MFC, such as
1686 implicit int and getting a pointer to member function via
1687 non-standard syntax.
1689 `-fno-nonansi-builtins'
1690 Disable built-in declarations of functions that are not mandated by
1691 ANSI/ISO C. These include `ffs', `alloca', `_exit', `index',
1692 `bzero', `conjf', and other related functions.
1694 `-fno-operator-names'
1695 Do not treat the operator name keywords `and', `bitand', `bitor',
1696 `compl', `not', `or' and `xor' as synonyms as keywords.
1698 `-fno-optional-diags'
1699 Disable diagnostics that the standard says a compiler does not
1700 need to issue. Currently, the only such diagnostic issued by G++
1701 is the one for a name having multiple meanings within a class.
1704 Downgrade some diagnostics about nonconformant code from errors to
1705 warnings. Thus, using `-fpermissive' will allow some
1706 nonconforming code to compile.
1709 Enable automatic template instantiation at link time. This option
1710 also implies `-fno-implicit-templates'. *Note Template
1711 Instantiation::, for more information.
1714 Disable generation of information about every class with virtual
1715 functions for use by the C++ runtime type identification features
1716 (`dynamic_cast' and `typeid'). If you don't use those parts of
1717 the language, you can save some space by using this flag. Note
1718 that exception handling uses the same information, but it will
1719 generate it as needed. The `dynamic_cast' operator can still be
1720 used for casts that do not require runtime type information, i.e.
1721 casts to `void *' or to unambiguous base classes.
1724 Emit statistics about front-end processing at the end of the
1725 compilation. This information is generally only useful to the G++
1728 `-ftemplate-depth-N'
1729 Set the maximum instantiation depth for template classes to N. A
1730 limit on the template instantiation depth is needed to detect
1731 endless recursions during template class instantiation. ANSI/ISO
1732 C++ conforming programs must not rely on a maximum depth greater
1735 `-fno-threadsafe-statics'
1736 Do not emit the extra code to use the routines specified in the C++
1737 ABI for thread-safe initialization of local statics. You can use
1738 this option to reduce code size slightly in code that doesn't need
1742 Register destructors for objects with static storage duration with
1743 the `__cxa_atexit' function rather than the `atexit' function.
1744 This option is required for fully standards-compliant handling of
1745 static destructors, but will only work if your C library supports
1748 `-fno-use-cxa-get-exception-ptr'
1749 Don't use the `__cxa_get_exception_ptr' runtime routine. This
1750 will cause `std::uncaught_exception' to be incorrect, but is
1751 necessary if the runtime routine is not available.
1753 `-fvisibility-inlines-hidden'
1754 This switch declares that the user does not attempt to compare
1755 pointers to inline methods where the addresses of the two functions
1756 were taken in different shared objects.
1758 The effect of this is that GCC may, effectively, mark inline
1759 methods with `__attribute__ ((visibility ("hidden")))' so that
1760 they do not appear in the export table of a DSO and do not require
1761 a PLT indirection when used within the DSO. Enabling this option
1762 can have a dramatic effect on load and link times of a DSO as it
1763 massively reduces the size of the dynamic export table when the
1764 library makes heavy use of templates.
1766 The behaviour of this switch is not quite the same as marking the
1767 methods as hidden directly, because it does not affect static
1768 variables local to the function or cause the compiler to deduce
1769 that the function is defined in only one shared object.
1771 You may mark a method as having a visibility explicitly to negate
1772 the effect of the switch for that method. For example, if you do
1773 want to compare pointers to a particular inline method, you might
1774 mark it as having default visibility. Marking the enclosing class
1775 with explicit visibility will have no effect.
1777 Explicitly instantiated inline methods are unaffected by this
1778 option as their linkage might otherwise cross a shared library
1779 boundary. *Note Template Instantiation::.
1782 Do not use weak symbol support, even if it is provided by the
1783 linker. By default, G++ will use weak symbols if they are
1784 available. This option exists only for testing, and should not be
1785 used by end-users; it will result in inferior code and has no
1786 benefits. This option may be removed in a future release of G++.
1789 Do not search for header files in the standard directories
1790 specific to C++, but do still search the other standard
1791 directories. (This option is used when building the C++ library.)
1793 In addition, these optimization, warning, and code generation options
1794 have meanings only for C++ programs:
1796 `-fno-default-inline'
1797 Do not assume `inline' for functions defined inside a class scope.
1798 *Note Options That Control Optimization: Optimize Options. Note
1799 that these functions will have linkage like inline functions; they
1800 just won't be inlined by default.
1803 Warn when G++ generates code that is probably not compatible with
1804 the vendor-neutral C++ ABI. Although an effort has been made to
1805 warn about all such cases, there are probably some cases that are
1806 not warned about, even though G++ is generating incompatible code.
1807 There may also be cases where warnings are emitted even though
1808 the code that is generated will be compatible.
1810 You should rewrite your code to avoid these warnings if you are
1811 concerned about the fact that code generated by G++ may not be
1812 binary compatible with code generated by other compilers.
1814 The known incompatibilities at this point include:
1816 * Incorrect handling of tail-padding for bit-fields. G++ may
1817 attempt to pack data into the same byte as a base class. For
1820 struct A { virtual void f(); int f1 : 1; };
1821 struct B : public A { int f2 : 1; };
1823 In this case, G++ will place `B::f2' into the same byte
1824 as`A::f1'; other compilers will not. You can avoid this
1825 problem by explicitly padding `A' so that its size is a
1826 multiple of the byte size on your platform; that will cause
1827 G++ and other compilers to layout `B' identically.
1829 * Incorrect handling of tail-padding for virtual bases. G++
1830 does not use tail padding when laying out virtual bases. For
1833 struct A { virtual void f(); char c1; };
1834 struct B { B(); char c2; };
1835 struct C : public A, public virtual B {};
1837 In this case, G++ will not place `B' into the tail-padding for
1838 `A'; other compilers will. You can avoid this problem by
1839 explicitly padding `A' so that its size is a multiple of its
1840 alignment (ignoring virtual base classes); that will cause
1841 G++ and other compilers to layout `C' identically.
1843 * Incorrect handling of bit-fields with declared widths greater
1844 than that of their underlying types, when the bit-fields
1845 appear in a union. For example:
1847 union U { int i : 4096; };
1849 Assuming that an `int' does not have 4096 bits, G++ will make
1850 the union too small by the number of bits in an `int'.
1852 * Empty classes can be placed at incorrect offsets. For
1862 struct C : public B, public A {};
1864 G++ will place the `A' base class of `C' at a nonzero offset;
1865 it should be placed at offset zero. G++ mistakenly believes
1866 that the `A' data member of `B' is already at offset zero.
1868 * Names of template functions whose types involve `typename' or
1869 template template parameters can be mangled incorrectly.
1871 template <typename Q>
1872 void f(typename Q::X) {}
1874 template <template <typename> class Q>
1875 void f(typename Q<int>::X) {}
1877 Instantiations of these templates may be mangled incorrectly.
1880 `-Wctor-dtor-privacy (C++ only)'
1881 Warn when a class seems unusable because all the constructors or
1882 destructors in that class are private, and it has neither friends
1883 nor public static member functions.
1885 `-Wnon-virtual-dtor (C++ only)'
1886 Warn when a class appears to be polymorphic, thereby requiring a
1887 virtual destructor, yet it declares a non-virtual one. This
1888 warning is also enabled if -Weffc++ is specified.
1890 `-Wreorder (C++ only)'
1891 Warn when the order of member initializers given in the code does
1892 not match the order in which they must be executed. For instance:
1897 A(): j (0), i (1) { }
1900 The compiler will rearrange the member initializers for `i' and
1901 `j' to match the declaration order of the members, emitting a
1902 warning to that effect. This warning is enabled by `-Wall'.
1904 The following `-W...' options are not affected by `-Wall'.
1906 `-Weffc++ (C++ only)'
1907 Warn about violations of the following style guidelines from Scott
1908 Meyers' `Effective C++' book:
1910 * Item 11: Define a copy constructor and an assignment
1911 operator for classes with dynamically allocated memory.
1913 * Item 12: Prefer initialization to assignment in constructors.
1915 * Item 14: Make destructors virtual in base classes.
1917 * Item 15: Have `operator=' return a reference to `*this'.
1919 * Item 23: Don't try to return a reference when you must
1923 Also warn about violations of the following style guidelines from
1924 Scott Meyers' `More Effective C++' book:
1926 * Item 6: Distinguish between prefix and postfix forms of
1927 increment and decrement operators.
1929 * Item 7: Never overload `&&', `||', or `,'.
1932 When selecting this option, be aware that the standard library
1933 headers do not obey all of these guidelines; use `grep -v' to
1934 filter out those warnings.
1936 `-Wno-deprecated (C++ only)'
1937 Do not warn about usage of deprecated features. *Note Deprecated
1940 `-Wstrict-null-sentinel (C++ only)'
1941 Warn also about the use of an uncasted `NULL' as sentinel. When
1942 compiling only with GCC this is a valid sentinel, as `NULL' is
1943 defined to `__null'. Although it is a null pointer constant not a
1944 null pointer, it is guaranteed to of the same size as a pointer.
1945 But this use is not portable across different compilers.
1947 `-Wno-non-template-friend (C++ only)'
1948 Disable warnings when non-templatized friend functions are declared
1949 within a template. Since the advent of explicit template
1950 specification support in G++, if the name of the friend is an
1951 unqualified-id (i.e., `friend foo(int)'), the C++ language
1952 specification demands that the friend declare or define an
1953 ordinary, nontemplate function. (Section 14.5.3). Before G++
1954 implemented explicit specification, unqualified-ids could be
1955 interpreted as a particular specialization of a templatized
1956 function. Because this non-conforming behavior is no longer the
1957 default behavior for G++, `-Wnon-template-friend' allows the
1958 compiler to check existing code for potential trouble spots and is
1959 on by default. This new compiler behavior can be turned off with
1960 `-Wno-non-template-friend' which keeps the conformant compiler code
1961 but disables the helpful warning.
1963 `-Wold-style-cast (C++ only)'
1964 Warn if an old-style (C-style) cast to a non-void type is used
1965 within a C++ program. The new-style casts (`dynamic_cast',
1966 `static_cast', `reinterpret_cast', and `const_cast') are less
1967 vulnerable to unintended effects and much easier to search for.
1969 `-Woverloaded-virtual (C++ only)'
1970 Warn when a function declaration hides virtual functions from a
1971 base class. For example, in:
1977 struct B: public A {
1981 the `A' class version of `f' is hidden in `B', and code like:
1986 will fail to compile.
1988 `-Wno-pmf-conversions (C++ only)'
1989 Disable the diagnostic for converting a bound pointer to member
1990 function to a plain pointer.
1992 `-Wsign-promo (C++ only)'
1993 Warn when overload resolution chooses a promotion from unsigned or
1994 enumerated type to a signed type, over a conversion to an unsigned
1995 type of the same size. Previous versions of G++ would try to
1996 preserve unsignedness, but the standard mandates the current
2001 A& operator = (int);
2010 In this example, G++ will synthesize a default `A& operator =
2011 (const A&);', while cfront will use the user-defined `operator ='.
2014 File: gcc.info, Node: Objective-C and Objective-C++ Dialect Options, Next: Language Independent Options, Prev: C++ Dialect Options, Up: Invoking GCC
2016 3.6 Options Controlling Objective-C and Objective-C++ Dialects
2017 ==============================================================
2019 (NOTE: This manual does not describe the Objective-C and Objective-C++
2020 languages themselves. See *Note Language Standards Supported by GCC:
2021 Standards, for references.)
2023 This section describes the command-line options that are only
2024 meaningful for Objective-C and Objective-C++ programs, but you can also
2025 use most of the language-independent GNU compiler options. For
2026 example, you might compile a file `some_class.m' like this:
2028 gcc -g -fgnu-runtime -O -c some_class.m
2030 In this example, `-fgnu-runtime' is an option meant only for
2031 Objective-C and Objective-C++ programs; you can use the other options
2032 with any language supported by GCC.
2034 Note that since Objective-C is an extension of the C language,
2035 Objective-C compilations may also use options specific to the C
2036 front-end (e.g., `-Wtraditional'). Similarly, Objective-C++
2037 compilations may use C++-specific options (e.g., `-Wabi').
2039 Here is a list of options that are _only_ for compiling Objective-C
2040 and Objective-C++ programs:
2042 `-fconstant-string-class=CLASS-NAME'
2043 Use CLASS-NAME as the name of the class to instantiate for each
2044 literal string specified with the syntax `@"..."'. The default
2045 class name is `NXConstantString' if the GNU runtime is being used,
2046 and `NSConstantString' if the NeXT runtime is being used (see
2047 below). The `-fconstant-cfstrings' option, if also present, will
2048 override the `-fconstant-string-class' setting and cause `@"..."'
2049 literals to be laid out as constant CoreFoundation strings.
2052 Generate object code compatible with the standard GNU Objective-C
2053 runtime. This is the default for most types of systems.
2056 Generate output compatible with the NeXT runtime. This is the
2057 default for NeXT-based systems, including Darwin and Mac OS X.
2058 The macro `__NEXT_RUNTIME__' is predefined if (and only if) this
2061 `-fno-nil-receivers'
2062 Assume that all Objective-C message dispatches (e.g., `[receiver
2063 message:arg]') in this translation unit ensure that the receiver
2064 is not `nil'. This allows for more efficient entry points in the
2065 runtime to be used. Currently, this option is only available in
2066 conjunction with the NeXT runtime on Mac OS X 10.3 and later.
2068 `-fobjc-call-cxx-cdtors'
2069 For each Objective-C class, check if any of its instance variables
2070 is a C++ object with a non-trivial default constructor. If so,
2071 synthesize a special `- (id) .cxx_construct' instance method that
2072 will run non-trivial default constructors on any such instance
2073 variables, in order, and then return `self'. Similarly, check if
2074 any instance variable is a C++ object with a non-trivial
2075 destructor, and if so, synthesize a special `- (void)
2076 .cxx_destruct' method that will run all such default destructors,
2079 The `- (id) .cxx_construct' and/or `- (void) .cxx_destruct' methods
2080 thusly generated will only operate on instance variables declared
2081 in the current Objective-C class, and not those inherited from
2082 superclasses. It is the responsibility of the Objective-C runtime
2083 to invoke all such methods in an object's inheritance hierarchy.
2084 The `- (id) .cxx_construct' methods will be invoked by the runtime
2085 immediately after a new object instance is allocated; the `-
2086 (void) .cxx_destruct' methods will be invoked immediately before
2087 the runtime deallocates an object instance.
2089 As of this writing, only the NeXT runtime on Mac OS X 10.4 and
2090 later has support for invoking the `- (id) .cxx_construct' and `-
2091 (void) .cxx_destruct' methods.
2093 `-fobjc-direct-dispatch'
2094 Allow fast jumps to the message dispatcher. On Darwin this is
2095 accomplished via the comm page.
2098 Enable syntactic support for structured exception handling in
2099 Objective-C, similar to what is offered by C++ and Java. This
2100 option is unavailable in conjunction with the NeXT runtime on Mac
2101 OS X 10.2 and earlier.
2108 @catch (AnObjCClass *exc) {
2115 @catch (AnotherClass *exc) {
2118 @catch (id allOthers) {
2127 The `@throw' statement may appear anywhere in an Objective-C or
2128 Objective-C++ program; when used inside of a `@catch' block, the
2129 `@throw' may appear without an argument (as shown above), in which
2130 case the object caught by the `@catch' will be rethrown.
2132 Note that only (pointers to) Objective-C objects may be thrown and
2133 caught using this scheme. When an object is thrown, it will be
2134 caught by the nearest `@catch' clause capable of handling objects
2135 of that type, analogously to how `catch' blocks work in C++ and
2136 Java. A `@catch(id ...)' clause (as shown above) may also be
2137 provided to catch any and all Objective-C exceptions not caught by
2138 previous `@catch' clauses (if any).
2140 The `@finally' clause, if present, will be executed upon exit from
2141 the immediately preceding `@try ... @catch' section. This will
2142 happen regardless of whether any exceptions are thrown, caught or
2143 rethrown inside the `@try ... @catch' section, analogously to the
2144 behavior of the `finally' clause in Java.
2146 There are several caveats to using the new exception mechanism:
2148 * Although currently designed to be binary compatible with
2149 `NS_HANDLER'-style idioms provided by the `NSException'
2150 class, the new exceptions can only be used on Mac OS X 10.3
2151 (Panther) and later systems, due to additional functionality
2152 needed in the (NeXT) Objective-C runtime.
2154 * As mentioned above, the new exceptions do not support handling
2155 types other than Objective-C objects. Furthermore, when
2156 used from Objective-C++, the Objective-C exception model does
2157 not interoperate with C++ exceptions at this time. This
2158 means you cannot `@throw' an exception from Objective-C and
2159 `catch' it in C++, or vice versa (i.e., `throw ... @catch').
2161 The `-fobjc-exceptions' switch also enables the use of
2162 synchronization blocks for thread-safe execution:
2164 @synchronized (ObjCClass *guard) {
2168 Upon entering the `@synchronized' block, a thread of execution
2169 shall first check whether a lock has been placed on the
2170 corresponding `guard' object by another thread. If it has, the
2171 current thread shall wait until the other thread relinquishes its
2172 lock. Once `guard' becomes available, the current thread will
2173 place its own lock on it, execute the code contained in the
2174 `@synchronized' block, and finally relinquish the lock (thereby
2175 making `guard' available to other threads).
2177 Unlike Java, Objective-C does not allow for entire methods to be
2178 marked `@synchronized'. Note that throwing exceptions out of
2179 `@synchronized' blocks is allowed, and will cause the guarding
2180 object to be unlocked properly.
2183 Enable garbage collection (GC) in Objective-C and Objective-C++
2186 `-freplace-objc-classes'
2187 Emit a special marker instructing `ld(1)' not to statically link in
2188 the resulting object file, and allow `dyld(1)' to load it in at
2189 run time instead. This is used in conjunction with the
2190 Fix-and-Continue debugging mode, where the object file in question
2191 may be recompiled and dynamically reloaded in the course of
2192 program execution, without the need to restart the program itself.
2193 Currently, Fix-and-Continue functionality is only available in
2194 conjunction with the NeXT runtime on Mac OS X 10.3 and later.
2197 When compiling for the NeXT runtime, the compiler ordinarily
2198 replaces calls to `objc_getClass("...")' (when the name of the
2199 class is known at compile time) with static class references that
2200 get initialized at load time, which improves run-time performance.
2201 Specifying the `-fzero-link' flag suppresses this behavior and
2202 causes calls to `objc_getClass("...")' to be retained. This is
2203 useful in Zero-Link debugging mode, since it allows for individual
2204 class implementations to be modified during program execution.
2207 Dump interface declarations for all classes seen in the source
2208 file to a file named `SOURCENAME.decl'.
2210 `-Wassign-intercept'
2211 Warn whenever an Objective-C assignment is being intercepted by the
2215 If a class is declared to implement a protocol, a warning is
2216 issued for every method in the protocol that is not implemented by
2217 the class. The default behavior is to issue a warning for every
2218 method not explicitly implemented in the class, even if a method
2219 implementation is inherited from the superclass. If you use the
2220 `-Wno-protocol' option, then methods inherited from the superclass
2221 are considered to be implemented, and no warning is issued for
2225 Warn if multiple methods of different types for the same selector
2226 are found during compilation. The check is performed on the list
2227 of methods in the final stage of compilation. Additionally, a
2228 check is performed for each selector appearing in a
2229 `@selector(...)' expression, and a corresponding method for that
2230 selector has been found during compilation. Because these checks
2231 scan the method table only at the end of compilation, these
2232 warnings are not produced if the final stage of compilation is not
2233 reached, for example because an error is found during compilation,
2234 or because the `-fsyntax-only' option is being used.
2236 `-Wstrict-selector-match'
2237 Warn if multiple methods with differing argument and/or return
2238 types are found for a given selector when attempting to send a
2239 message using this selector to a receiver of type `id' or `Class'.
2240 When this flag is off (which is the default behavior), the
2241 compiler will omit such warnings if any differences found are
2242 confined to types which share the same size and alignment.
2244 `-Wundeclared-selector'
2245 Warn if a `@selector(...)' expression referring to an undeclared
2246 selector is found. A selector is considered undeclared if no
2247 method with that name has been declared before the
2248 `@selector(...)' expression, either explicitly in an `@interface'
2249 or `@protocol' declaration, or implicitly in an `@implementation'
2250 section. This option always performs its checks as soon as a
2251 `@selector(...)' expression is found, while `-Wselector' only
2252 performs its checks in the final stage of compilation. This also
2253 enforces the coding style convention that methods and selectors
2254 must be declared before being used.
2256 `-print-objc-runtime-info'
2257 Generate C header describing the largest structure that is passed
2262 File: gcc.info, Node: Language Independent Options, Next: Warning Options, Prev: Objective-C and Objective-C++ Dialect Options, Up: Invoking GCC
2264 3.7 Options to Control Diagnostic Messages Formatting
2265 =====================================================
2267 Traditionally, diagnostic messages have been formatted irrespective of
2268 the output device's aspect (e.g. its width, ...). The options described
2269 below can be used to control the diagnostic messages formatting
2270 algorithm, e.g. how many characters per line, how often source location
2271 information should be reported. Right now, only the C++ front end can
2272 honor these options. However it is expected, in the near future, that
2273 the remaining front ends would be able to digest them correctly.
2275 `-fmessage-length=N'
2276 Try to format error messages so that they fit on lines of about N
2277 characters. The default is 72 characters for `g++' and 0 for the
2278 rest of the front ends supported by GCC. If N is zero, then no
2279 line-wrapping will be done; each error message will appear on a
2282 `-fdiagnostics-show-location=once'
2283 Only meaningful in line-wrapping mode. Instructs the diagnostic
2284 messages reporter to emit _once_ source location information; that
2285 is, in case the message is too long to fit on a single physical
2286 line and has to be wrapped, the source location won't be emitted
2287 (as prefix) again, over and over, in subsequent continuation
2288 lines. This is the default behavior.
2290 `-fdiagnostics-show-location=every-line'
2291 Only meaningful in line-wrapping mode. Instructs the diagnostic
2292 messages reporter to emit the same source location information (as
2293 prefix) for physical lines that result from the process of breaking
2294 a message which is too long to fit on a single line.
2296 `-fdiagnostics-show-option'
2297 This option instructs the diagnostic machinery to add text to each
2298 diagnostic emitted, which indicates which command line option
2299 directly controls that diagnostic, when such an option is known to
2300 the diagnostic machinery.
2304 File: gcc.info, Node: Warning Options, Next: Debugging Options, Prev: Language Independent Options, Up: Invoking GCC
2306 3.8 Options to Request or Suppress Warnings
2307 ===========================================
2309 Warnings are diagnostic messages that report constructions which are
2310 not inherently erroneous but which are risky or suggest there may have
2313 You can request many specific warnings with options beginning `-W',
2314 for example `-Wimplicit' to request warnings on implicit declarations.
2315 Each of these specific warning options also has a negative form
2316 beginning `-Wno-' to turn off warnings; for example, `-Wno-implicit'.
2317 This manual lists only one of the two forms, whichever is not the
2320 The following options control the amount and kinds of warnings produced
2321 by GCC; for further, language-specific options also refer to *Note C++
2322 Dialect Options:: and *Note Objective-C and Objective-C++ Dialect
2326 Check the code for syntax errors, but don't do anything beyond
2330 Issue all the warnings demanded by strict ISO C and ISO C++;
2331 reject all programs that use forbidden extensions, and some other
2332 programs that do not follow ISO C and ISO C++. For ISO C, follows
2333 the version of the ISO C standard specified by any `-std' option
2336 Valid ISO C and ISO C++ programs should compile properly with or
2337 without this option (though a rare few will require `-ansi' or a
2338 `-std' option specifying the required version of ISO C). However,
2339 without this option, certain GNU extensions and traditional C and
2340 C++ features are supported as well. With this option, they are
2343 `-pedantic' does not cause warning messages for use of the
2344 alternate keywords whose names begin and end with `__'. Pedantic
2345 warnings are also disabled in the expression that follows
2346 `__extension__'. However, only system header files should use
2347 these escape routes; application programs should avoid them.
2348 *Note Alternate Keywords::.
2350 Some users try to use `-pedantic' to check programs for strict ISO
2351 C conformance. They soon find that it does not do quite what they
2352 want: it finds some non-ISO practices, but not all--only those for
2353 which ISO C _requires_ a diagnostic, and some others for which
2354 diagnostics have been added.
2356 A feature to report any failure to conform to ISO C might be
2357 useful in some instances, but would require considerable
2358 additional work and would be quite different from `-pedantic'. We
2359 don't have plans to support such a feature in the near future.
2361 Where the standard specified with `-std' represents a GNU extended
2362 dialect of C, such as `gnu89' or `gnu99', there is a corresponding
2363 "base standard", the version of ISO C on which the GNU extended
2364 dialect is based. Warnings from `-pedantic' are given where they
2365 are required by the base standard. (It would not make sense for
2366 such warnings to be given only for features not in the specified
2367 GNU C dialect, since by definition the GNU dialects of C include
2368 all features the compiler supports with the given option, and
2369 there would be nothing to warn about.)
2372 Like `-pedantic', except that errors are produced rather than
2376 Inhibit all warning messages.
2379 Inhibit warning messages about the use of `#import'.
2382 Warn if an array subscript has type `char'. This is a common cause
2383 of error, as programmers often forget that this type is signed on
2384 some machines. This warning is enabled by `-Wall'.
2387 Warn whenever a comment-start sequence `/*' appears in a `/*'
2388 comment, or whenever a Backslash-Newline appears in a `//' comment.
2389 This warning is enabled by `-Wall'.
2392 This option causes the compiler to abort compilation on the first
2393 error occurred rather than trying to keep going and printing
2394 further error messages.
2397 Check calls to `printf' and `scanf', etc., to make sure that the
2398 arguments supplied have types appropriate to the format string
2399 specified, and that the conversions specified in the format string
2400 make sense. This includes standard functions, and others
2401 specified by format attributes (*note Function Attributes::), in
2402 the `printf', `scanf', `strftime' and `strfmon' (an X/Open
2403 extension, not in the C standard) families (or other
2404 target-specific families). Which functions are checked without
2405 format attributes having been specified depends on the standard
2406 version selected, and such checks of functions without the
2407 attribute specified are disabled by `-ffreestanding' or
2410 The formats are checked against the format features supported by
2411 GNU libc version 2.2. These include all ISO C90 and C99 features,
2412 as well as features from the Single Unix Specification and some
2413 BSD and GNU extensions. Other library implementations may not
2414 support all these features; GCC does not support warning about
2415 features that go beyond a particular library's limitations.
2416 However, if `-pedantic' is used with `-Wformat', warnings will be
2417 given about format features not in the selected standard version
2418 (but not for `strfmon' formats, since those are not in any version
2419 of the C standard). *Note Options Controlling C Dialect: C
2422 Since `-Wformat' also checks for null format arguments for several
2423 functions, `-Wformat' also implies `-Wnonnull'.
2425 `-Wformat' is included in `-Wall'. For more control over some
2426 aspects of format checking, the options `-Wformat-y2k',
2427 `-Wno-format-extra-args', `-Wno-format-zero-length',
2428 `-Wformat-nonliteral', `-Wformat-security', and `-Wformat=2' are
2429 available, but are not included in `-Wall'.
2432 If `-Wformat' is specified, also warn about `strftime' formats
2433 which may yield only a two-digit year.
2435 `-Wno-format-extra-args'
2436 If `-Wformat' is specified, do not warn about excess arguments to a
2437 `printf' or `scanf' format function. The C standard specifies
2438 that such arguments are ignored.
2440 Where the unused arguments lie between used arguments that are
2441 specified with `$' operand number specifications, normally
2442 warnings are still given, since the implementation could not know
2443 what type to pass to `va_arg' to skip the unused arguments.
2444 However, in the case of `scanf' formats, this option will suppress
2445 the warning if the unused arguments are all pointers, since the
2446 Single Unix Specification says that such unused arguments are
2449 `-Wno-format-zero-length'
2450 If `-Wformat' is specified, do not warn about zero-length formats.
2451 The C standard specifies that zero-length formats are allowed.
2453 `-Wformat-nonliteral'
2454 If `-Wformat' is specified, also warn if the format string is not a
2455 string literal and so cannot be checked, unless the format function
2456 takes its format arguments as a `va_list'.
2459 If `-Wformat' is specified, also warn about uses of format
2460 functions that represent possible security problems. At present,
2461 this warns about calls to `printf' and `scanf' functions where the
2462 format string is not a string literal and there are no format
2463 arguments, as in `printf (foo);'. This may be a security hole if
2464 the format string came from untrusted input and contains `%n'.
2465 (This is currently a subset of what `-Wformat-nonliteral' warns
2466 about, but in future warnings may be added to `-Wformat-security'
2467 that are not included in `-Wformat-nonliteral'.)
2470 Enable `-Wformat' plus format checks not included in `-Wformat'.
2471 Currently equivalent to `-Wformat -Wformat-nonliteral
2472 -Wformat-security -Wformat-y2k'.
2475 Warn about passing a null pointer for arguments marked as
2476 requiring a non-null value by the `nonnull' function attribute.
2478 `-Wnonnull' is included in `-Wall' and `-Wformat'. It can be
2479 disabled with the `-Wno-nonnull' option.
2481 `-Winit-self (C, C++, Objective-C and Objective-C++ only)'
2482 Warn about uninitialized variables which are initialized with
2483 themselves. Note this option can only be used with the
2484 `-Wuninitialized' option, which in turn only works with `-O1' and
2487 For example, GCC will warn about `i' being uninitialized in the
2488 following snippet only when `-Winit-self' has been specified:
2496 Warn when a declaration does not specify a type. This warning is
2499 `-Wimplicit-function-declaration'
2500 `-Werror-implicit-function-declaration'
2501 Give a warning (or error) whenever a function is used before being
2502 declared. The form `-Wno-error-implicit-function-declaration' is
2503 not supported. This warning is enabled by `-Wall' (as a warning,
2507 Same as `-Wimplicit-int' and `-Wimplicit-function-declaration'.
2508 This warning is enabled by `-Wall'.
2511 Warn if the type of `main' is suspicious. `main' should be a
2512 function with external linkage, returning int, taking either zero
2513 arguments, two, or three arguments of appropriate types. This
2514 warning is enabled by `-Wall'.
2517 Warn if an aggregate or union initializer is not fully bracketed.
2518 In the following example, the initializer for `a' is not fully
2519 bracketed, but that for `b' is fully bracketed.
2521 int a[2][2] = { 0, 1, 2, 3 };
2522 int b[2][2] = { { 0, 1 }, { 2, 3 } };
2524 This warning is enabled by `-Wall'.
2526 `-Wmissing-include-dirs (C, C++, Objective-C and Objective-C++ only)'
2527 Warn if a user-supplied include directory does not exist.
2530 Warn if parentheses are omitted in certain contexts, such as when
2531 there is an assignment in a context where a truth value is
2532 expected, or when operators are nested whose precedence people
2533 often get confused about.
2535 Also warn if a comparison like `x<=y<=z' appears; this is
2536 equivalent to `(x<=y ? 1 : 0) <= z', which is a different
2537 interpretation from that of ordinary mathematical notation.
2539 Also warn about constructions where there may be confusion to which
2540 `if' statement an `else' branch belongs. Here is an example of
2551 In C/C++, every `else' branch belongs to the innermost possible
2552 `if' statement, which in this example is `if (b)'. This is often
2553 not what the programmer expected, as illustrated in the above
2554 example by indentation the programmer chose. When there is the
2555 potential for this confusion, GCC will issue a warning when this
2556 flag is specified. To eliminate the warning, add explicit braces
2557 around the innermost `if' statement so there is no way the `else'
2558 could belong to the enclosing `if'. The resulting code would look
2571 This warning is enabled by `-Wall'.
2574 Warn about code that may have undefined semantics because of
2575 violations of sequence point rules in the C and C++ standards.
2577 The C and C++ standards defines the order in which expressions in
2578 a C/C++ program are evaluated in terms of "sequence points", which
2579 represent a partial ordering between the execution of parts of the
2580 program: those executed before the sequence point, and those
2581 executed after it. These occur after the evaluation of a full
2582 expression (one which is not part of a larger expression), after
2583 the evaluation of the first operand of a `&&', `||', `? :' or `,'
2584 (comma) operator, before a function is called (but after the
2585 evaluation of its arguments and the expression denoting the called
2586 function), and in certain other places. Other than as expressed
2587 by the sequence point rules, the order of evaluation of
2588 subexpressions of an expression is not specified. All these rules
2589 describe only a partial order rather than a total order, since,
2590 for example, if two functions are called within one expression
2591 with no sequence point between them, the order in which the
2592 functions are called is not specified. However, the standards
2593 committee have ruled that function calls do not overlap.
2595 It is not specified when between sequence points modifications to
2596 the values of objects take effect. Programs whose behavior
2597 depends on this have undefined behavior; the C and C++ standards
2598 specify that "Between the previous and next sequence point an
2599 object shall have its stored value modified at most once by the
2600 evaluation of an expression. Furthermore, the prior value shall
2601 be read only to determine the value to be stored.". If a program
2602 breaks these rules, the results on any particular implementation
2603 are entirely unpredictable.
2605 Examples of code with undefined behavior are `a = a++;', `a[n] =
2606 b[n++]' and `a[i++] = i;'. Some more complicated cases are not
2607 diagnosed by this option, and it may give an occasional false
2608 positive result, but in general it has been found fairly effective
2609 at detecting this sort of problem in programs.
2611 The standard is worded confusingly, therefore there is some debate
2612 over the precise meaning of the sequence point rules in subtle
2613 cases. Links to discussions of the problem, including proposed
2614 formal definitions, may be found on the GCC readings page, at
2615 `http://gcc.gnu.org/readings.html'.
2617 This warning is enabled by `-Wall' for C and C++.
2620 Warn whenever a function is defined with a return-type that
2621 defaults to `int'. Also warn about any `return' statement with no
2622 return-value in a function whose return-type is not `void'.
2624 For C, also warn if the return type of a function has a type
2625 qualifier such as `const'. Such a type qualifier has no effect,
2626 since the value returned by a function is not an lvalue. ISO C
2627 prohibits qualified `void' return types on function definitions,
2628 so such return types always receive a warning even without this
2631 For C++, a function without return type always produces a
2632 diagnostic message, even when `-Wno-return-type' is specified.
2633 The only exceptions are `main' and functions defined in system
2636 This warning is enabled by `-Wall'.
2639 Warn whenever a `switch' statement has an index of enumerated type
2640 and lacks a `case' for one or more of the named codes of that
2641 enumeration. (The presence of a `default' label prevents this
2642 warning.) `case' labels outside the enumeration range also
2643 provoke warnings when this option is used. This warning is
2647 Warn whenever a `switch' statement does not have a `default' case.
2650 Warn whenever a `switch' statement has an index of enumerated type
2651 and lacks a `case' for one or more of the named codes of that
2652 enumeration. `case' labels outside the enumeration range also
2653 provoke warnings when this option is used.
2656 Warn if any trigraphs are encountered that might change the
2657 meaning of the program (trigraphs within comments are not warned
2658 about). This warning is enabled by `-Wall'.
2661 Warn whenever a static function is declared but not defined or a
2662 non-inline static function is unused. This warning is enabled by
2666 Warn whenever a label is declared but not used. This warning is
2669 To suppress this warning use the `unused' attribute (*note
2670 Variable Attributes::).
2672 `-Wunused-parameter'
2673 Warn whenever a function parameter is unused aside from its
2676 To suppress this warning use the `unused' attribute (*note
2677 Variable Attributes::).
2680 Warn whenever a local variable or non-constant static variable is
2681 unused aside from its declaration. This warning is enabled by
2684 To suppress this warning use the `unused' attribute (*note
2685 Variable Attributes::).
2688 Warn whenever a statement computes a result that is explicitly not
2689 used. This warning is enabled by `-Wall'.
2691 To suppress this warning cast the expression to `void'.
2694 All the above `-Wunused' options combined.
2696 In order to get a warning about an unused function parameter, you
2697 must either specify `-Wextra -Wunused' (note that `-Wall' implies
2698 `-Wunused'), or separately specify `-Wunused-parameter'.
2701 Warn if an automatic variable is used without first being
2702 initialized or if a variable may be clobbered by a `setjmp' call.
2704 These warnings are possible only in optimizing compilation,
2705 because they require data flow information that is computed only
2706 when optimizing. If you do not specify `-O', you will not get
2707 these warnings. Instead, GCC will issue a warning about
2708 `-Wuninitialized' requiring `-O'.
2710 If you want to warn about code which uses the uninitialized value
2711 of the variable in its own initializer, use the `-Winit-self'
2714 These warnings occur for individual uninitialized or clobbered
2715 elements of structure, union or array variables as well as for
2716 variables which are uninitialized or clobbered as a whole. They do
2717 not occur for variables or elements declared `volatile'. Because
2718 these warnings depend on optimization, the exact variables or
2719 elements for which there are warnings will depend on the precise
2720 optimization options and version of GCC used.
2722 Note that there may be no warning about a variable that is used
2723 only to compute a value that itself is never used, because such
2724 computations may be deleted by data flow analysis before the
2725 warnings are printed.
2727 These warnings are made optional because GCC is not smart enough
2728 to see all the reasons why the code might be correct despite
2729 appearing to have an error. Here is one example of how this can
2745 If the value of `y' is always 1, 2 or 3, then `x' is always
2746 initialized, but GCC doesn't know this. Here is another common
2751 if (change_y) save_y = y, y = new_y;
2753 if (change_y) y = save_y;
2756 This has no bug because `save_y' is used only if it is set.
2758 This option also warns when a non-volatile automatic variable
2759 might be changed by a call to `longjmp'. These warnings as well
2760 are possible only in optimizing compilation.
2762 The compiler sees only the calls to `setjmp'. It cannot know
2763 where `longjmp' will be called; in fact, a signal handler could
2764 call it at any point in the code. As a result, you may get a
2765 warning even when there is in fact no problem because `longjmp'
2766 cannot in fact be called at the place which would cause a problem.
2768 Some spurious warnings can be avoided if you declare all the
2769 functions you use that never return as `noreturn'. *Note Function
2772 This warning is enabled by `-Wall'.
2775 Warn when a #pragma directive is encountered which is not
2776 understood by GCC. If this command line option is used, warnings
2777 will even be issued for unknown pragmas in system header files.
2778 This is not the case if the warnings were only enabled by the
2779 `-Wall' command line option.
2782 Do not warn about misuses of pragmas, such as incorrect parameters,
2783 invalid syntax, or conflicts between pragmas. See also
2784 `-Wunknown-pragmas'.
2787 This option is only active when `-fstrict-aliasing' is active. It
2788 warns about code which might break the strict aliasing rules that
2789 the compiler is using for optimization. The warning does not
2790 catch all cases, but does attempt to catch the more common
2791 pitfalls. It is included in `-Wall'. It is equivalent to
2794 `-Wstrict-aliasing=n'
2795 This option is only active when `-fstrict-aliasing' is active. It
2796 warns about code which might break the strict aliasing rules that
2797 the compiler is using for optimization. Higher levels correspond
2798 to higher accuracy (fewer false positives). Higher levels also
2799 correspond to more effort, similar to the way -O works.
2800 `-Wstrict-aliasing' is equivalent to `-Wstrict-aliasing=n', with
2803 Level 1: Most aggressive, quick, least accurate. Possibly useful
2804 when higher levels do not warn but -fstrict-aliasing still breaks
2805 the code, as it has very few false negatives. However, it has
2806 many false positives. Warns for all pointer conversions between
2807 possibly incompatible types, even if never dereferenced. Runs in
2810 Level 2: Aggressive, quick, not too precise. May still have many
2811 false positives (not as many as level 1 though), and few false
2812 negatives (but possibly more than level 1). Unlike level 1, it
2813 only warns when an address is taken. Warns about incomplete
2814 types. Runs in the frontend only.
2816 Level 3 (default for `-Wstrict-aliasing'): Should have very few
2817 false positives and few false negatives. Slightly slower than
2818 levels 1 or 2 when optimization is enabled. Takes care of the
2819 common punn+dereference pattern in the frontend:
2820 `*(int*)&some_float'. If optimization is enabled, it also runs in
2821 the backend, where it deals with multiple statement cases using
2822 flow-sensitive points-to information. Only warns when the
2823 converted pointer is dereferenced. Does not warn about incomplete
2828 `-Wstrict-overflow=N'
2829 This option is only active when `-fstrict-overflow' is active. It
2830 warns about cases where the compiler optimizes based on the
2831 assumption that signed overflow does not occur. Note that it does
2832 not warn about all cases where the code might overflow: it only
2833 warns about cases where the compiler implements some optimization.
2834 Thus this warning depends on the optimization level.
2836 An optimization which assumes that signed overflow does not occur
2837 is perfectly safe if the values of the variables involved are such
2838 that overflow never does, in fact, occur. Therefore this warning
2839 can easily give a false positive: a warning about code which is not
2840 actually a problem. To help focus on important issues, several
2841 warning levels are defined. No warnings are issued for the use of
2842 undefined signed overflow when estimating how many iterations a
2843 loop will require, in particular when determining whether a loop
2844 will be executed at all.
2846 `-Wstrict-overflow=1'
2847 Warn about cases which are both questionable and easy to
2848 avoid. For example: `x + 1 > x'; with `-fstrict-overflow',
2849 the compiler will simplify this to `1'. This level of
2850 `-Wstrict-overflow' is enabled by `-Wall'; higher levels are
2851 not, and must be explicitly requested.
2853 `-Wstrict-overflow=2'
2854 Also warn about other cases where a comparison is simplified
2855 to a constant. For example: `abs (x) >= 0'. This can only be
2856 simplified when `-fstrict-overflow' is in effect, because
2857 `abs (INT_MIN)' overflows to `INT_MIN', which is less than
2858 zero. `-Wstrict-overflow' (with no level) is the same as
2859 `-Wstrict-overflow=2'.
2861 `-Wstrict-overflow=3'
2862 Also warn about other cases where a comparison is simplified.
2863 For example: `x + 1 > 1' will be simplified to `x > 0'.
2865 `-Wstrict-overflow=4'
2866 Also warn about other simplifications not covered by the
2867 above cases. For example: `(x * 10) / 5' will be simplified
2870 `-Wstrict-overflow=5'
2871 Also warn about cases where the compiler reduces the
2872 magnitude of a constant involved in a comparison. For
2873 example: `x + 2 > y' will be simplified to `x + 1 >= y'.
2874 This is reported only at the highest warning level because
2875 this simplification applies to many comparisons, so this
2876 warning level will give a very large number of false
2880 All of the above `-W' options combined. This enables all the
2881 warnings about constructions that some users consider
2882 questionable, and that are easy to avoid (or modify to prevent the
2883 warning), even in conjunction with macros. This also enables some
2884 language-specific warnings described in *Note C++ Dialect
2885 Options:: and *Note Objective-C and Objective-C++ Dialect
2888 The following `-W...' options are not implied by `-Wall'. Some of
2889 them warn about constructions that users generally do not consider
2890 questionable, but which occasionally you might wish to check for;
2891 others warn about constructions that are necessary or hard to avoid in
2892 some cases, and there is no simple way to modify the code to suppress
2896 (This option used to be called `-W'. The older name is still
2897 supported, but the newer name is more descriptive.) Print extra
2898 warning messages for these events:
2900 * A function can return either with or without a value.
2901 (Falling off the end of the function body is considered
2902 returning without a value.) For example, this function would
2903 evoke such a warning:
2911 * An expression-statement or the left-hand side of a comma
2912 expression contains no side effects. To suppress the
2913 warning, cast the unused expression to void. For example, an
2914 expression such as `x[i,j]' will cause a warning, but
2915 `x[(void)i,j]' will not.
2917 * An unsigned value is compared against zero with `<' or `>='.
2919 * Storage-class specifiers like `static' are not the first
2920 things in a declaration. According to the C Standard, this
2921 usage is obsolescent.
2923 * If `-Wall' or `-Wunused' is also specified, warn about unused
2926 * A comparison between signed and unsigned values could produce
2927 an incorrect result when the signed value is converted to
2928 unsigned. (But don't warn if `-Wno-sign-compare' is also
2931 * An aggregate has an initializer which does not initialize all
2932 members. This warning can be independently controlled by
2933 `-Wmissing-field-initializers'.
2935 * An initialized field without side effects is overridden when
2936 using designated initializers (*note Designated Initializers:
2937 Designated Inits.). This warning can be independently
2938 controlled by `-Woverride-init'.
2940 * A function parameter is declared without a type specifier in
2941 K&R-style functions:
2945 * An empty body occurs in an `if' or `else' statement.
2947 * A pointer is compared against integer zero with `<', `<=',
2950 * A variable might be changed by `longjmp' or `vfork'.
2952 * (C++ only) An enumerator and a non-enumerator both appear in
2953 a conditional expression.
2955 * (C++ only) A non-static reference or non-static `const'
2956 member appears in a class without constructors.
2958 * (C++ only) Ambiguous virtual bases.
2960 * (C++ only) Subscripting an array which has been declared
2963 * (C++ only) Taking the address of a variable which has been
2964 declared `register'.
2966 * (C++ only) A base class is not initialized in a derived
2967 class' copy constructor.
2970 Do not warn about compile-time integer division by zero. Floating
2971 point division by zero is not warned about, as it can be a
2972 legitimate way of obtaining infinities and NaNs.
2975 Print warning messages for constructs found in system header files.
2976 Warnings from system headers are normally suppressed, on the
2977 assumption that they usually do not indicate real problems and
2978 would only make the compiler output harder to read. Using this
2979 command line option tells GCC to emit warnings from system headers
2980 as if they occurred in user code. However, note that using
2981 `-Wall' in conjunction with this option will _not_ warn about
2982 unknown pragmas in system headers--for that, `-Wunknown-pragmas'
2986 Warn if floating point values are used in equality comparisons.
2988 The idea behind this is that sometimes it is convenient (for the
2989 programmer) to consider floating-point values as approximations to
2990 infinitely precise real numbers. If you are doing this, then you
2991 need to compute (by analyzing the code, or in some other way) the
2992 maximum or likely maximum error that the computation introduces,
2993 and allow for it when performing comparisons (and when producing
2994 output, but that's a different problem). In particular, instead
2995 of testing for equality, you would check to see whether the two
2996 values have ranges that overlap; and this is done with the
2997 relational operators, so equality comparisons are probably
3000 `-Wtraditional (C only)'
3001 Warn about certain constructs that behave differently in
3002 traditional and ISO C. Also warn about ISO C constructs that have
3003 no traditional C equivalent, and/or problematic constructs which
3006 * Macro parameters that appear within string literals in the
3007 macro body. In traditional C macro replacement takes place
3008 within string literals, but does not in ISO C.
3010 * In traditional C, some preprocessor directives did not exist.
3011 Traditional preprocessors would only consider a line to be a
3012 directive if the `#' appeared in column 1 on the line.
3013 Therefore `-Wtraditional' warns about directives that
3014 traditional C understands but would ignore because the `#'
3015 does not appear as the first character on the line. It also
3016 suggests you hide directives like `#pragma' not understood by
3017 traditional C by indenting them. Some traditional
3018 implementations would not recognize `#elif', so it suggests
3019 avoiding it altogether.
3021 * A function-like macro that appears without arguments.
3023 * The unary plus operator.
3025 * The `U' integer constant suffix, or the `F' or `L' floating
3026 point constant suffixes. (Traditional C does support the `L'
3027 suffix on integer constants.) Note, these suffixes appear in
3028 macros defined in the system headers of most modern systems,
3029 e.g. the `_MIN'/`_MAX' macros in `<limits.h>'. Use of these
3030 macros in user code might normally lead to spurious warnings,
3031 however GCC's integrated preprocessor has enough context to
3032 avoid warning in these cases.
3034 * A function declared external in one block and then used after
3035 the end of the block.
3037 * A `switch' statement has an operand of type `long'.
3039 * A non-`static' function declaration follows a `static' one.
3040 This construct is not accepted by some traditional C
3043 * The ISO type of an integer constant has a different width or
3044 signedness from its traditional type. This warning is only
3045 issued if the base of the constant is ten. I.e. hexadecimal
3046 or octal values, which typically represent bit patterns, are
3049 * Usage of ISO string concatenation is detected.
3051 * Initialization of automatic aggregates.
3053 * Identifier conflicts with labels. Traditional C lacks a
3054 separate namespace for labels.
3056 * Initialization of unions. If the initializer is zero, the
3057 warning is omitted. This is done under the assumption that
3058 the zero initializer in user code appears conditioned on e.g.
3059 `__STDC__' to avoid missing initializer warnings and relies
3060 on default initialization to zero in the traditional C case.
3062 * Conversions by prototypes between fixed/floating point values
3063 and vice versa. The absence of these prototypes when
3064 compiling with traditional C would cause serious problems.
3065 This is a subset of the possible conversion warnings, for the
3066 full set use `-Wconversion'.
3068 * Use of ISO C style function definitions. This warning
3069 intentionally is _not_ issued for prototype declarations or
3070 variadic functions because these ISO C features will appear
3071 in your code when using libiberty's traditional C
3072 compatibility macros, `PARAMS' and `VPARAMS'. This warning
3073 is also bypassed for nested functions because that feature is
3074 already a GCC extension and thus not relevant to traditional
3077 `-Wdeclaration-after-statement (C only)'
3078 Warn when a declaration is found after a statement in a block.
3079 This construct, known from C++, was introduced with ISO C99 and is
3080 by default allowed in GCC. It is not supported by ISO C90 and was
3081 not supported by GCC versions before GCC 3.0. *Note Mixed
3085 Warn if an undefined identifier is evaluated in an `#if' directive.
3088 Do not warn whenever an `#else' or an `#endif' are followed by
3092 Warn whenever a local variable shadows another local variable,
3093 parameter or global variable or whenever a built-in function is
3097 Warn whenever an object of larger than LEN bytes is defined.
3099 `-Wframe-larger-than-LEN'
3100 Warn whenever the frame size of a function is larger than LEN
3103 `-Wunsafe-loop-optimizations'
3104 Warn if the loop cannot be optimized because the compiler could not
3105 assume anything on the bounds of the loop indices. With
3106 `-funsafe-loop-optimizations' warn if the compiler made such
3110 Warn about anything that depends on the "size of" a function type
3111 or of `void'. GNU C assigns these types a size of 1, for
3112 convenience in calculations with `void *' pointers and pointers to
3115 `-Wbad-function-cast (C only)'
3116 Warn whenever a function call is cast to a non-matching type. For
3117 example, warn if `int malloc()' is cast to `anything *'.
3120 Warn about ISO C constructs that are outside of the common subset
3121 of ISO C and ISO C++, e.g. request for implicit conversion from
3122 `void *' to a pointer to non-`void' type.
3125 Warn whenever a pointer is cast so as to remove a type qualifier
3126 from the target type. For example, warn if a `const char *' is
3127 cast to an ordinary `char *'.
3130 Warn whenever a pointer is cast such that the required alignment
3131 of the target is increased. For example, warn if a `char *' is
3132 cast to an `int *' on machines where integers can only be accessed
3133 at two- or four-byte boundaries.
3136 When compiling C, give string constants the type `const
3137 char[LENGTH]' so that copying the address of one into a
3138 non-`const' `char *' pointer will get a warning; when compiling
3139 C++, warn about the deprecated conversion from string literals to
3140 `char *'. This warning, by default, is enabled for C++ programs.
3141 These warnings will help you find at compile time code that can
3142 try to write into a string constant, but only if you have been
3143 very careful about using `const' in declarations and prototypes.
3144 Otherwise, it will just be a nuisance; this is why we did not make
3145 `-Wall' request these warnings.
3148 Warn if a prototype causes a type conversion that is different
3149 from what would happen to the same argument in the absence of a
3150 prototype. This includes conversions of fixed point to floating
3151 and vice versa, and conversions changing the width or signedness
3152 of a fixed point argument except when the same as the default
3155 Also, warn if a negative integer constant expression is implicitly
3156 converted to an unsigned type. For example, warn about the
3157 assignment `x = -1' if `x' is unsigned. But do not warn about
3158 explicit casts like `(unsigned) -1'.
3161 Warn when a comparison between signed and unsigned values could
3162 produce an incorrect result when the signed value is converted to
3163 unsigned. This warning is also enabled by `-Wextra'; to get the
3164 other warnings of `-Wextra' without this warning, use `-Wextra
3168 Warn about suspicious uses of memory addresses. These include using
3169 the address of a function in a conditional expression, such as
3170 `void func(void); if (func)', and comparisons against the memory
3171 address of a string literal, such as `if (x == "abc")'. Such uses
3172 typically indicate a programmer error: the address of a function
3173 always evaluates to true, so their use in a conditional usually
3174 indicate that the programmer forgot the parentheses in a function
3175 call; and comparisons against string literals result in unspecified
3176 behavior and are not portable in C, so they usually indicate that
3177 the programmer intended to use `strcmp'. This warning is enabled
3180 `-Waggregate-return'
3181 Warn if any functions that return structures or unions are defined
3182 or called. (In languages where you can return an array, this also
3186 Do not warn if an unexpected `__attribute__' is used, such as
3187 unrecognized attributes, function attributes applied to variables,
3188 etc. This will not stop errors for incorrect use of supported
3191 `-Wstrict-prototypes (C only)'
3192 Warn if a function is declared or defined without specifying the
3193 argument types. (An old-style function definition is permitted
3194 without a warning if preceded by a declaration which specifies the
3197 `-Wold-style-definition (C only)'
3198 Warn if an old-style function definition is used. A warning is
3199 given even if there is a previous prototype.
3201 `-Wmissing-prototypes (C only)'
3202 Warn if a global function is defined without a previous prototype
3203 declaration. This warning is issued even if the definition itself
3204 provides a prototype. The aim is to detect global functions that
3205 fail to be declared in header files.
3207 `-Wmissing-declarations (C only)'
3208 Warn if a global function is defined without a previous
3209 declaration. Do so even if the definition itself provides a
3210 prototype. Use this option to detect global functions that are
3211 not declared in header files.
3213 `-Wmissing-field-initializers'
3214 Warn if a structure's initializer has some fields missing. For
3215 example, the following code would cause such a warning, because
3216 `x.h' is implicitly zero:
3218 struct s { int f, g, h; };
3219 struct s x = { 3, 4 };
3221 This option does not warn about designated initializers, so the
3222 following modification would not trigger a warning:
3224 struct s { int f, g, h; };
3225 struct s x = { .f = 3, .g = 4 };
3227 This warning is included in `-Wextra'. To get other `-Wextra'
3228 warnings without this one, use `-Wextra
3229 -Wno-missing-field-initializers'.
3231 `-Wmissing-noreturn'
3232 Warn about functions which might be candidates for attribute
3233 `noreturn'. Note these are only possible candidates, not absolute
3234 ones. Care should be taken to manually verify functions actually
3235 do not ever return before adding the `noreturn' attribute,
3236 otherwise subtle code generation bugs could be introduced. You
3237 will not get a warning for `main' in hosted C environments.
3239 `-Wmissing-format-attribute'
3240 Warn about function pointers which might be candidates for `format'
3241 attributes. Note these are only possible candidates, not absolute
3242 ones. GCC will guess that function pointers with `format'
3243 attributes that are used in assignment, initialization, parameter
3244 passing or return statements should have a corresponding `format'
3245 attribute in the resulting type. I.e. the left-hand side of the
3246 assignment or initialization, the type of the parameter variable,
3247 or the return type of the containing function respectively should
3248 also have a `format' attribute to avoid the warning.
3250 GCC will also warn about function definitions which might be
3251 candidates for `format' attributes. Again, these are only
3252 possible candidates. GCC will guess that `format' attributes
3253 might be appropriate for any function that calls a function like
3254 `vprintf' or `vscanf', but this might not always be the case, and
3255 some functions for which `format' attributes are appropriate may
3259 Do not warn if a multicharacter constant (`'FOOF'') is used.
3260 Usually they indicate a typo in the user's code, as they have
3261 implementation-defined values, and should not be used in portable
3264 `-Wnormalized=<none|id|nfc|nfkc>'
3265 In ISO C and ISO C++, two identifiers are different if they are
3266 different sequences of characters. However, sometimes when
3267 characters outside the basic ASCII character set are used, you can
3268 have two different character sequences that look the same. To
3269 avoid confusion, the ISO 10646 standard sets out some
3270 "normalization rules" which when applied ensure that two sequences
3271 that look the same are turned into the same sequence. GCC can
3272 warn you if you are using identifiers which have not been
3273 normalized; this option controls that warning.
3275 There are four levels of warning that GCC supports. The default is
3276 `-Wnormalized=nfc', which warns about any identifier which is not
3277 in the ISO 10646 "C" normalized form, "NFC". NFC is the
3278 recommended form for most uses.
3280 Unfortunately, there are some characters which ISO C and ISO C++
3281 allow in identifiers that when turned into NFC aren't allowable as
3282 identifiers. That is, there's no way to use these symbols in
3283 portable ISO C or C++ and have all your identifiers in NFC.
3284 `-Wnormalized=id' suppresses the warning for these characters. It
3285 is hoped that future versions of the standards involved will
3286 correct this, which is why this option is not the default.
3288 You can switch the warning off for all characters by writing
3289 `-Wnormalized=none'. You would only want to do this if you were
3290 using some other normalization scheme (like "D"), because
3291 otherwise you can easily create bugs that are literally impossible
3294 Some characters in ISO 10646 have distinct meanings but look
3295 identical in some fonts or display methodologies, especially once
3296 formatting has been applied. For instance `\u207F', "SUPERSCRIPT
3297 LATIN SMALL LETTER N", will display just like a regular `n' which
3298 has been placed in a superscript. ISO 10646 defines the "NFKC"
3299 normalization scheme to convert all these into a standard form as
3300 well, and GCC will warn if your code is not in NFKC if you use
3301 `-Wnormalized=nfkc'. This warning is comparable to warning about
3302 every identifier that contains the letter O because it might be
3303 confused with the digit 0, and so is not the default, but may be
3304 useful as a local coding convention if the programming environment
3305 is unable to be fixed to display these characters distinctly.
3307 `-Wno-deprecated-declarations'
3308 Do not warn about uses of functions (*note Function Attributes::),
3309 variables (*note Variable Attributes::), and types (*note Type
3310 Attributes::) marked as deprecated by using the `deprecated'
3314 Do not warn about compile-time overflow in constant expressions.
3317 Warn if an initialized field without side effects is overridden
3318 when using designated initializers (*note Designated Initializers:
3321 This warning is included in `-Wextra'. To get other `-Wextra'
3322 warnings without this one, use `-Wextra -Wno-override-init'.
3325 Warn if a structure is given the packed attribute, but the packed
3326 attribute has no effect on the layout or size of the structure.
3327 Such structures may be mis-aligned for little benefit. For
3328 instance, in this code, the variable `f.x' in `struct bar' will be
3329 misaligned even though `struct bar' does not itself have the
3335 } __attribute__((packed));
3342 Warn if padding is included in a structure, either to align an
3343 element of the structure or to align the whole structure.
3344 Sometimes when this happens it is possible to rearrange the fields
3345 of the structure to reduce the padding and so make the structure
3349 Warn if anything is declared more than once in the same scope,
3350 even in cases where multiple declaration is valid and changes
3353 `-Wnested-externs (C only)'
3354 Warn if an `extern' declaration is encountered within a function.
3356 `-Wunreachable-code'
3357 Warn if the compiler detects that code will never be executed.
3359 This option is intended to warn when the compiler detects that at
3360 least a whole line of source code will never be executed, because
3361 some condition is never satisfied or because it is after a
3362 procedure that never returns.
3364 It is possible for this option to produce a warning even though
3365 there are circumstances under which part of the affected line can
3366 be executed, so care should be taken when removing
3367 apparently-unreachable code.
3369 For instance, when a function is inlined, a warning may mean that
3370 the line is unreachable in only one inlined copy of the function.
3372 This option is not made part of `-Wall' because in a debugging
3373 version of a program there is often substantial code which checks
3374 correct functioning of the program and is, hopefully, unreachable
3375 because the program does work. Another common use of unreachable
3376 code is to provide behavior which is selectable at compile-time.
3379 Warn if a function can not be inlined and it was declared as
3380 inline. Even with this option, the compiler will not warn about
3381 failures to inline functions declared in system headers.
3383 The compiler uses a variety of heuristics to determine whether or
3384 not to inline a function. For example, the compiler takes into
3385 account the size of the function being inlined and the amount of
3386 inlining that has already been done in the current function.
3387 Therefore, seemingly insignificant changes in the source program
3388 can cause the warnings produced by `-Winline' to appear or
3391 `-Wno-invalid-offsetof (C++ only)'
3392 Suppress warnings from applying the `offsetof' macro to a non-POD
3393 type. According to the 1998 ISO C++ standard, applying `offsetof'
3394 to a non-POD type is undefined. In existing C++ implementations,
3395 however, `offsetof' typically gives meaningful results even when
3396 applied to certain kinds of non-POD types. (Such as a simple
3397 `struct' that fails to be a POD type only by virtue of having a
3398 constructor.) This flag is for users who are aware that they are
3399 writing nonportable code and who have deliberately chosen to
3400 ignore the warning about it.
3402 The restrictions on `offsetof' may be relaxed in a future version
3403 of the C++ standard.
3405 `-Wno-int-to-pointer-cast (C only)'
3406 Suppress warnings from casts to pointer type of an integer of a
3409 `-Wno-pointer-to-int-cast (C only)'
3410 Suppress warnings from casts from a pointer to an integer type of a
3414 Warn if a precompiled header (*note Precompiled Headers::) is
3415 found in the search path but can't be used.
3418 Warn if `long long' type is used. This is default. To inhibit
3419 the warning messages, use `-Wno-long-long'. Flags `-Wlong-long'
3420 and `-Wno-long-long' are taken into account only when `-pedantic'
3424 Warn if variadic macros are used in pedantic ISO C90 mode, or the
3425 GNU alternate syntax when in pedantic ISO C99 mode. This is
3426 default. To inhibit the warning messages, use
3427 `-Wno-variadic-macros'.
3430 Warn if variable length array is used in the code. `-Wno-vla'
3431 will prevent the `-pedantic' warning of the variable length array.
3433 `-Wvolatile-register-var'
3434 Warn if a register variable is declared volatile. The volatile
3435 modifier does not inhibit all optimizations that may eliminate
3436 reads and/or writes to register variables.
3438 `-Wdisabled-optimization'
3439 Warn if a requested optimization pass is disabled. This warning
3440 does not generally indicate that there is anything wrong with your
3441 code; it merely indicates that GCC's optimizers were unable to
3442 handle the code effectively. Often, the problem is that your code
3443 is too big or too complex; GCC will refuse to optimize programs
3444 when the optimization itself is likely to take inordinate amounts
3448 Warn for pointer argument passing or assignment with different
3449 signedness. This option is only supported for C and Objective-C.
3450 It is implied by `-Wall' and by `-pedantic', which can be disabled
3451 with `-Wno-pointer-sign'.
3454 Make all warnings into errors.
3457 Make the specified warning into an errors. The specifier for a
3458 warning is appended, for example `-Werror=switch' turns the
3459 warnings controlled by `-Wswitch' into errors. This switch takes
3460 a negative form, to be used to negate `-Werror' for specific
3461 warnings, for example `-Wno-error=switch' makes `-Wswitch'
3462 warnings not be errors, even when `-Werror' is in effect. You can
3463 use the `-fdiagnostics-show-option' option to have each
3464 controllable warning amended with the option which controls it, to
3465 determine what to use with this option.
3467 Note that specifying `-Werror='FOO automatically implies `-W'FOO.
3468 However, `-Wno-error='FOO does not imply anything.
3471 This option is only active when `-fstack-protector' is active. It
3472 warns about functions that will not be protected against stack
3475 `-Woverlength-strings'
3476 Warn about string constants which are longer than the "minimum
3477 maximum" length specified in the C standard. Modern compilers
3478 generally allow string constants which are much longer than the
3479 standard's minimum limit, but very portable programs should avoid
3480 using longer strings.
3482 The limit applies _after_ string constant concatenation, and does
3483 not count the trailing NUL. In C89, the limit was 509 characters;
3484 in C99, it was raised to 4095. C++98 does not specify a normative
3485 minimum maximum, so we do not diagnose overlength strings in C++.
3487 This option is implied by `-pedantic', and can be disabled with
3488 `-Wno-overlength-strings'.
3491 File: gcc.info, Node: Debugging Options, Next: Optimize Options, Prev: Warning Options, Up: Invoking GCC
3493 3.9 Options for Debugging Your Program or GCC
3494 =============================================
3496 GCC has various special options that are used for debugging either your
3500 Produce debugging information in the operating system's native
3501 format (stabs, COFF, XCOFF, or DWARF 2). GDB can work with this
3502 debugging information.
3504 On most systems that use stabs format, `-g' enables use of extra
3505 debugging information that only GDB can use; this extra information
3506 makes debugging work better in GDB but will probably make other
3507 debuggers crash or refuse to read the program. If you want to
3508 control for certain whether to generate the extra information, use
3509 `-gstabs+', `-gstabs', `-gxcoff+', `-gxcoff', or `-gvms' (see
3512 GCC allows you to use `-g' with `-O'. The shortcuts taken by
3513 optimized code may occasionally produce surprising results: some
3514 variables you declared may not exist at all; flow of control may
3515 briefly move where you did not expect it; some statements may not
3516 be executed because they compute constant results or their values
3517 were already at hand; some statements may execute in different
3518 places because they were moved out of loops.
3520 Nevertheless it proves possible to debug optimized output. This
3521 makes it reasonable to use the optimizer for programs that might
3524 The following options are useful when GCC is generated with the
3525 capability for more than one debugging format.
3528 Produce debugging information for use by GDB. This means to use
3529 the most expressive format available (DWARF 2, stabs, or the
3530 native format if neither of those are supported), including GDB
3531 extensions if at all possible.
3534 Produce debugging information in stabs format (if that is
3535 supported), without GDB extensions. This is the format used by
3536 DBX on most BSD systems. On MIPS, Alpha and System V Release 4
3537 systems this option produces stabs debugging output which is not
3538 understood by DBX or SDB. On System V Release 4 systems this
3539 option requires the GNU assembler.
3541 `-feliminate-unused-debug-symbols'
3542 Produce debugging information in stabs format (if that is
3543 supported), for only symbols that are actually used.
3545 `-femit-class-debug-always'
3546 Instead of emitting debugging information for a C++ class in only
3547 one object file, emit it in all object files using the class.
3548 This option should be used only with debuggers that are unable to
3549 handle the way GCC normally emits debugging information for
3550 classes because using this option will increase the size of
3551 debugging information by as much as a factor of two.
3554 Produce debugging information in stabs format (if that is
3555 supported), using GNU extensions understood only by the GNU
3556 debugger (GDB). The use of these extensions is likely to make
3557 other debuggers crash or refuse to read the program.
3560 Produce debugging information in COFF format (if that is
3561 supported). This is the format used by SDB on most System V
3562 systems prior to System V Release 4.
3565 Produce debugging information in XCOFF format (if that is
3566 supported). This is the format used by the DBX debugger on IBM
3570 Produce debugging information in XCOFF format (if that is
3571 supported), using GNU extensions understood only by the GNU
3572 debugger (GDB). The use of these extensions is likely to make
3573 other debuggers crash or refuse to read the program, and may cause
3574 assemblers other than the GNU assembler (GAS) to fail with an
3578 Produce debugging information in DWARF version 2 format (if that is
3579 supported). This is the format used by DBX on IRIX 6. With this
3580 option, GCC uses features of DWARF version 3 when they are useful;
3581 version 3 is upward compatible with version 2, but may still cause
3582 problems for older debuggers.
3585 Produce debugging information in VMS debug format (if that is
3586 supported). This is the format used by DEBUG on VMS systems.
3594 Request debugging information and also use LEVEL to specify how
3595 much information. The default level is 2.
3597 Level 1 produces minimal information, enough for making backtraces
3598 in parts of the program that you don't plan to debug. This
3599 includes descriptions of functions and external variables, but no
3600 information about local variables and no line numbers.
3602 Level 3 includes extra information, such as all the macro
3603 definitions present in the program. Some debuggers support macro
3604 expansion when you use `-g3'.
3606 `-gdwarf-2' does not accept a concatenated debug level, because
3607 GCC used to support an option `-gdwarf' that meant to generate
3608 debug information in version 1 of the DWARF format (which is very
3609 different from version 2), and it would have been too confusing.
3610 That debug format is long obsolete, but the option cannot be
3611 changed now. Instead use an additional `-gLEVEL' option to change
3612 the debug level for DWARF2.
3614 `-feliminate-dwarf2-dups'
3615 Compress DWARF2 debugging information by eliminating duplicated
3616 information about each symbol. This option only makes sense when
3617 generating DWARF2 debugging information with `-gdwarf-2'.
3619 `-femit-struct-debug-baseonly'
3620 Emit debug information for struct-like types only when the base
3621 name of the compilation source file matches the base name of file
3622 in which the struct was defined.
3624 This option substantially reduces the size of debugging
3625 information, but at significant potential loss in type information
3626 to the debugger. See `-femit-struct-debug-reduced' for a less
3627 aggressive option. See `-femit-struct-debug-detailed' for more
3630 This option works only with DWARF 2.
3632 `-femit-struct-debug-reduced'
3633 Emit debug information for struct-like types only when the base
3634 name of the compilation source file matches the base name of file
3635 in which the type was defined, unless the struct is a template or
3636 defined in a system header.
3638 This option significantly reduces the size of debugging
3639 information, with some potential loss in type information to the
3640 debugger. See `-femit-struct-debug-baseonly' for a more
3641 aggressive option. See `-femit-struct-debug-detailed' for more
3644 This option works only with DWARF 2.
3646 `-femit-struct-debug-detailed[=SPEC-LIST]'
3647 Specify the struct-like types for which the compiler will generate
3648 debug information. The intent is to reduce duplicate struct debug
3649 information between different object files within the same program.
3651 This option is a detailed version of `-femit-struct-debug-reduced'
3652 and `-femit-struct-debug-baseonly', which will serve for most
3655 A specification has the syntax
3656 [`dir:'|`ind:'][`ord:'|`gen:'](`any'|`sys'|`base'|`none')
3658 The optional first word limits the specification to structs that
3659 are used directly (`dir:') or used indirectly (`ind:'). A struct
3660 type is used directly when it is the type of a variable, member.
3661 Indirect uses arise through pointers to structs. That is, when
3662 use of an incomplete struct would be legal, the use is indirect.
3663 An example is `struct one direct; struct two * indirect;'.
3665 The optional second word limits the specification to ordinary
3666 structs (`ord:') or generic structs (`gen:'). Generic structs are
3667 a bit complicated to explain. For C++, these are non-explicit
3668 specializations of template classes, or non-template classes
3669 within the above. Other programming languages have generics, but
3670 `-femit-struct-debug-detailed' does not yet implement them.
3672 The third word specifies the source files for those structs for
3673 which the compiler will emit debug information. The values `none'
3674 and `any' have the normal meaning. The value `base' means that
3675 the base of name of the file in which the type declaration appears
3676 must match the base of the name of the main compilation file. In
3677 practice, this means that types declared in `foo.c' and `foo.h'
3678 will have debug information, but types declared in other header
3679 will not. The value `sys' means those types satisfying `base' or
3680 declared in system or compiler headers.
3682 You may need to experiment to determine the best settings for your
3685 The default is `-femit-struct-debug-detailed=all'.
3687 This option works only with DWARF 2.
3690 Generate extra code to write profile information suitable for the
3691 analysis program `prof'. You must use this option when compiling
3692 the source files you want data about, and you must also use it when
3696 Generate extra code to write profile information suitable for the
3697 analysis program `gprof'. You must use this option when compiling
3698 the source files you want data about, and you must also use it when
3702 Makes the compiler print out each function name as it is compiled,
3703 and print some statistics about each pass when it finishes.
3706 Makes the compiler print some statistics about the time consumed
3707 by each pass when it finishes.
3710 Makes the compiler print some statistics about permanent memory
3711 allocation when it finishes.
3714 Add code so that program flow "arcs" are instrumented. During
3715 execution the program records how many times each branch and call
3716 is executed and how many times it is taken or returns. When the
3717 compiled program exits it saves this data to a file called
3718 `AUXNAME.gcda' for each source file. The data may be used for
3719 profile-directed optimizations (`-fbranch-probabilities'), or for
3720 test coverage analysis (`-ftest-coverage'). Each object file's
3721 AUXNAME is generated from the name of the output file, if
3722 explicitly specified and it is not the final executable, otherwise
3723 it is the basename of the source file. In both cases any suffix
3724 is removed (e.g. `foo.gcda' for input file `dir/foo.c', or
3725 `dir/foo.gcda' for output file specified as `-o dir/foo.o').
3726 *Note Cross-profiling::.
3729 This option is used to compile and link code instrumented for
3730 coverage analysis. The option is a synonym for `-fprofile-arcs'
3731 `-ftest-coverage' (when compiling) and `-lgcov' (when linking).
3732 See the documentation for those options for more details.
3734 * Compile the source files with `-fprofile-arcs' plus
3735 optimization and code generation options. For test coverage
3736 analysis, use the additional `-ftest-coverage' option. You
3737 do not need to profile every source file in a program.
3739 * Link your object files with `-lgcov' or `-fprofile-arcs' (the
3740 latter implies the former).
3742 * Run the program on a representative workload to generate the
3743 arc profile information. This may be repeated any number of
3744 times. You can run concurrent instances of your program, and
3745 provided that the file system supports locking, the data
3746 files will be correctly updated. Also `fork' calls are
3747 detected and correctly handled (double counting will not
3750 * For profile-directed optimizations, compile the source files
3751 again with the same optimization and code generation options
3752 plus `-fbranch-probabilities' (*note Options that Control
3753 Optimization: Optimize Options.).
3755 * For test coverage analysis, use `gcov' to produce human
3756 readable information from the `.gcno' and `.gcda' files.
3757 Refer to the `gcov' documentation for further information.
3760 With `-fprofile-arcs', for each function of your program GCC
3761 creates a program flow graph, then finds a spanning tree for the
3762 graph. Only arcs that are not on the spanning tree have to be
3763 instrumented: the compiler adds code to count the number of times
3764 that these arcs are executed. When an arc is the only exit or
3765 only entrance to a block, the instrumentation code can be added to
3766 the block; otherwise, a new basic block must be created to hold
3767 the instrumentation code.
3770 Produce a notes file that the `gcov' code-coverage utility (*note
3771 `gcov'--a Test Coverage Program: Gcov.) can use to show program
3772 coverage. Each source file's note file is called `AUXNAME.gcno'.
3773 Refer to the `-fprofile-arcs' option above for a description of
3774 AUXNAME and instructions on how to generate test coverage data.
3775 Coverage data will match the source files more closely, if you do
3781 Says to make debugging dumps during compilation at times specified
3782 by LETTERS. This is used for debugging the RTL-based passes of
3783 the compiler. The file names for most of the dumps are made by
3784 appending a pass number and a word to the DUMPNAME. DUMPNAME is
3785 generated from the name of the output file, if explicitly
3786 specified and it is not an executable, otherwise it is the
3787 basename of the source file.
3789 Most debug dumps can be enabled either passing a letter to the `-d'
3790 option, or with a long `-fdump-rtl' switch; here are the possible
3791 letters for use in LETTERS and PASS, and their meanings:
3794 Annotate the assembler output with miscellaneous debugging
3799 Dump after block reordering, to `FILE.148r.bbro'.
3802 `-fdump-rtl-combine'
3803 Dump after instruction combination, to the file
3804 `FILE.129r.combine'.
3809 `-dC' and `-fdump-rtl-ce1' enable dumping after the first if
3810 conversion, to the file `FILE.117r.ce1'. `-dC' and
3811 `-fdump-rtl-ce2' enable dumping after the second if
3812 conversion, to the file `FILE.130r.ce2'.
3817 `-dd' and `-fdump-rtl-btl' enable dumping after branch target
3818 load optimization, to `FILE.31.btl'. `-dd' and
3819 `-fdump-rtl-dbr' enable dumping after delayed branch
3820 scheduling, to `FILE.36.dbr'.
3823 Dump all macro definitions, at the end of preprocessing, in
3824 addition to normal output.
3828 Dump after the third if conversion, to `FILE.146r.ce3'.
3833 `-df' and `-fdump-rtl-cfg' enable dumping after control and
3834 data flow analysis, to `FILE.116r.cfg'. `-df' and
3835 `-fdump-rtl-cfg' enable dumping dump after life analysis, to
3836 `FILE.128r.life1' and `FILE.135r.life2'.
3840 Dump after global register allocation, to `FILE.139r.greg'.
3845 `-dG' and `-fdump-rtl-gcse' enable dumping after GCSE, to
3846 `FILE.114r.gcse'. `-dG' and `-fdump-rtl-bypass' enable
3847 dumping after jump bypassing and control flow optimizations,
3848 to `FILE.115r.bypass'.
3852 Dump after finalization of EH handling code, to `FILE.02.eh'.
3855 `-fdump-rtl-sibling'
3856 Dump after sibling call optimizations, to `FILE.106r.sibling'.
3860 Dump after the first jump optimization, to `FILE.112r.jump'.
3864 Dump after conversion from registers to stack, to
3869 Dump after local register allocation, to `FILE.138r.lreg'.
3873 `-dL' and `-fdump-rtl-loop2' enable dumping after the loop
3874 optimization pass, to `FILE.119r.loop2',
3875 `FILE.120r.loop2_init', `FILE.121r.loop2_invariant', and
3876 `FILE.125r.loop2_done'.
3880 Dump after modulo scheduling, to `FILE.136r.sms'.
3884 Dump after performing the machine dependent reorganization
3885 pass, to `FILE.155r.mach'.
3889 Dump after register renumbering, to `FILE.147r.rnreg'.
3892 `-fdump-rtl-regmove'
3893 Dump after the register move pass, to `FILE.132r.regmove'.
3896 `-fdump-rtl-postreload'
3897 Dump after post-reload optimizations, to `FILE.24.postreload'.
3901 Dump after RTL generation, to `FILE.104r.expand'.
3905 Dump after the second scheduling pass, to `FILE.150r.sched2'.
3909 Dump after CSE (including the jump optimization that
3910 sometimes follows CSE), to `FILE.113r.cse'.
3914 Dump after the first scheduling pass, to `FILE.21.sched'.
3918 Dump after the second CSE pass (including the jump
3919 optimization that sometimes follows CSE), to `FILE.127r.cse2'.
3923 Dump after running tracer, to `FILE.118r.tracer'.
3927 `-fdump-rtl-vartrack'
3928 `-dV' and `-fdump-rtl-vpt' enable dumping after the value
3929 profile transformations, to `FILE.10.vpt'. `-dV' and
3930 `-fdump-rtl-vartrack' enable dumping after variable tracking,
3931 to `FILE.154r.vartrack'.
3935 Dump after the second flow pass, to `FILE.142r.flow2'.
3938 `-fdump-rtl-peephole2'
3939 Dump after the peephole pass, to `FILE.145r.peephole2'.
3943 Dump after live range splitting, to `FILE.126r.web'.
3947 Produce all the dumps listed above.
3950 Produce a core dump whenever an error occurs.
3953 Print statistics on memory usage, at the end of the run, to
3957 Annotate the assembler output with a comment indicating which
3958 pattern and alternative was used. The length of each
3959 instruction is also printed.
3962 Dump the RTL in the assembler output as a comment before each
3963 instruction. Also turns on `-dp' annotation.
3966 For each of the other indicated dump files (either with `-d'
3967 or `-fdump-rtl-PASS'), dump a representation of the control
3968 flow graph suitable for viewing with VCG to `FILE.PASS.vcg'.
3971 Just generate RTL for a function instead of compiling it.
3972 Usually used with `r' (`-fdump-rtl-expand').
3975 Dump debugging information during parsing, to standard error.
3978 When doing debugging dumps (see `-d' option above), suppress
3979 address output. This makes it more feasible to use diff on
3980 debugging dumps for compiler invocations with different compiler
3981 binaries and/or different text / bss / data / heap / stack / dso
3985 When doing debugging dumps (see `-d' option above), suppress
3986 instruction numbers, line number note and address output. This
3987 makes it more feasible to use diff on debugging dumps for compiler
3988 invocations with different options, in particular with and without
3991 `-fdump-translation-unit (C++ only)'
3992 `-fdump-translation-unit-OPTIONS (C++ only)'
3993 Dump a representation of the tree structure for the entire
3994 translation unit to a file. The file name is made by appending
3995 `.tu' to the source file name. If the `-OPTIONS' form is used,
3996 OPTIONS controls the details of the dump as described for the
3997 `-fdump-tree' options.
3999 `-fdump-class-hierarchy (C++ only)'
4000 `-fdump-class-hierarchy-OPTIONS (C++ only)'
4001 Dump a representation of each class's hierarchy and virtual
4002 function table layout to a file. The file name is made by
4003 appending `.class' to the source file name. If the `-OPTIONS'
4004 form is used, OPTIONS controls the details of the dump as
4005 described for the `-fdump-tree' options.
4008 Control the dumping at various stages of inter-procedural analysis
4009 language tree to a file. The file name is generated by appending
4010 a switch specific suffix to the source file name. The following
4014 Enables all inter-procedural analysis dumps; currently the
4015 only produced dump is the `cgraph' dump.
4018 Dumps information about call-graph optimization, unused
4019 function removal, and inlining decisions.
4021 `-fdump-tree-SWITCH'
4022 `-fdump-tree-SWITCH-OPTIONS'
4023 Control the dumping at various stages of processing the
4024 intermediate language tree to a file. The file name is generated
4025 by appending a switch specific suffix to the source file name. If
4026 the `-OPTIONS' form is used, OPTIONS is a list of `-' separated
4027 options that control the details of the dump. Not all options are
4028 applicable to all dumps, those which are not meaningful will be
4029 ignored. The following options are available
4032 Print the address of each node. Usually this is not
4033 meaningful as it changes according to the environment and
4034 source file. Its primary use is for tying up a dump file
4035 with a debug environment.
4038 Inhibit dumping of members of a scope or body of a function
4039 merely because that scope has been reached. Only dump such
4040 items when they are directly reachable by some other path.
4041 When dumping pretty-printed trees, this option inhibits
4042 dumping the bodies of control structures.
4045 Print a raw representation of the tree. By default, trees are
4046 pretty-printed into a C-like representation.
4049 Enable more detailed dumps (not honored by every dump option).
4052 Enable dumping various statistics about the pass (not honored
4053 by every dump option).
4056 Enable showing basic block boundaries (disabled in raw dumps).
4059 Enable showing virtual operands for every statement.
4062 Enable showing line numbers for statements.
4065 Enable showing the unique ID (`DECL_UID') for each variable.
4068 Turn on all options, except `raw', `slim' and `lineno'.
4070 The following tree dumps are possible:
4072 Dump before any tree based optimization, to `FILE.original'.
4075 Dump after all tree based optimization, to `FILE.optimized'.
4078 Dump after function inlining, to `FILE.inlined'.
4081 Dump each function before and after the gimplification pass
4082 to a file. The file name is made by appending `.gimple' to
4083 the source file name.
4086 Dump the control flow graph of each function to a file. The
4087 file name is made by appending `.cfg' to the source file name.
4090 Dump the control flow graph of each function to a file in VCG
4091 format. The file name is made by appending `.vcg' to the
4092 source file name. Note that if the file contains more than
4093 one function, the generated file cannot be used directly by
4094 VCG. You will need to cut and paste each function's graph
4095 into its own separate file first.
4098 Dump each function after copying loop headers. The file name
4099 is made by appending `.ch' to the source file name.
4102 Dump SSA related information to a file. The file name is
4103 made by appending `.ssa' to the source file name.
4106 Dump structure aliasing variable information to a file. This
4107 file name is made by appending `.salias' to the source file
4111 Dump aliasing information for each function. The file name
4112 is made by appending `.alias' to the source file name.
4115 Dump each function after CCP. The file name is made by
4116 appending `.ccp' to the source file name.
4119 Dump each function after STORE-CCP. The file name is made by
4120 appending `.storeccp' to the source file name.
4123 Dump trees after partial redundancy elimination. The file
4124 name is made by appending `.pre' to the source file name.
4127 Dump trees after full redundancy elimination. The file name
4128 is made by appending `.fre' to the source file name.
4131 Dump trees after copy propagation. The file name is made by
4132 appending `.copyprop' to the source file name.
4135 Dump trees after store copy-propagation. The file name is
4136 made by appending `.store_copyprop' to the source file name.
4139 Dump each function after dead code elimination. The file
4140 name is made by appending `.dce' to the source file name.
4143 Dump each function after adding mudflap instrumentation. The
4144 file name is made by appending `.mudflap' to the source file
4148 Dump each function after performing scalar replacement of
4149 aggregates. The file name is made by appending `.sra' to the
4153 Dump each function after performing code sinking. The file
4154 name is made by appending `.sink' to the source file name.
4157 Dump each function after applying dominator tree
4158 optimizations. The file name is made by appending `.dom' to
4159 the source file name.
4162 Dump each function after applying dead store elimination.
4163 The file name is made by appending `.dse' to the source file
4167 Dump each function after optimizing PHI nodes into
4168 straightline code. The file name is made by appending
4169 `.phiopt' to the source file name.
4172 Dump each function after forward propagating single use
4173 variables. The file name is made by appending `.forwprop' to
4174 the source file name.
4177 Dump each function after applying the copy rename
4178 optimization. The file name is made by appending
4179 `.copyrename' to the source file name.
4182 Dump each function after applying the named return value
4183 optimization on generic trees. The file name is made by
4184 appending `.nrv' to the source file name.
4187 Dump each function after applying vectorization of loops.
4188 The file name is made by appending `.vect' to the source file
4192 Dump each function after Value Range Propagation (VRP). The
4193 file name is made by appending `.vrp' to the source file name.
4196 Enable all the available tree dumps with the flags provided
4199 `-ftree-vectorizer-verbose=N'
4200 This option controls the amount of debugging output the vectorizer
4201 prints. This information is written to standard error, unless
4202 `-fdump-tree-all' or `-fdump-tree-vect' is specified, in which
4203 case it is output to the usual dump listing file, `.vect'. For
4204 N=0 no diagnostic information is reported. If N=1 the vectorizer
4205 reports each loop that got vectorized, and the total number of
4206 loops that got vectorized. If N=2 the vectorizer also reports
4207 non-vectorized loops that passed the first analysis phase
4208 (vect_analyze_loop_form) - i.e. countable, inner-most, single-bb,
4209 single-entry/exit loops. This is the same verbosity level that
4210 `-fdump-tree-vect-stats' uses. Higher verbosity levels mean
4211 either more information dumped for each reported loop, or same
4212 amount of information reported for more loops: If N=3, alignment
4213 related information is added to the reports. If N=4,
4214 data-references related information (e.g. memory dependences,
4215 memory access-patterns) is added to the reports. If N=5, the
4216 vectorizer reports also non-vectorized inner-most loops that did
4217 not pass the first analysis phase (i.e. may not be countable, or
4218 may have complicated control-flow). If N=6, the vectorizer
4219 reports also non-vectorized nested loops. For N=7, all the
4220 information the vectorizer generates during its analysis and
4221 transformation is reported. This is the same verbosity level that
4222 `-fdump-tree-vect-details' uses.
4224 `-frandom-seed=STRING'
4225 This option provides a seed that GCC uses when it would otherwise
4226 use random numbers. It is used to generate certain symbol names
4227 that have to be different in every compiled file. It is also used
4228 to place unique stamps in coverage data files and the object files
4229 that produce them. You can use the `-frandom-seed' option to
4230 produce reproducibly identical object files.
4232 The STRING should be different for every file you compile.
4235 On targets that use instruction scheduling, this option controls
4236 the amount of debugging output the scheduler prints. This
4237 information is written to standard error, unless `-dS' or `-dR' is
4238 specified, in which case it is output to the usual dump listing
4239 file, `.sched' or `.sched2' respectively. However for N greater
4240 than nine, the output is always printed to standard error.
4242 For N greater than zero, `-fsched-verbose' outputs the same
4243 information as `-dRS'. For N greater than one, it also output
4244 basic block probabilities, detailed ready list information and
4245 unit/insn info. For N greater than two, it includes RTL at abort
4246 point, control-flow and regions info. And for N over four,
4247 `-fsched-verbose' also includes dependence info.
4250 Store the usual "temporary" intermediate files permanently; place
4251 them in the current directory and name them based on the source
4252 file. Thus, compiling `foo.c' with `-c -save-temps' would produce
4253 files `foo.i' and `foo.s', as well as `foo.o'. This creates a
4254 preprocessed `foo.i' output file even though the compiler now
4255 normally uses an integrated preprocessor.
4257 When used in combination with the `-x' command line option,
4258 `-save-temps' is sensible enough to avoid over writing an input
4259 source file with the same extension as an intermediate file. The
4260 corresponding intermediate file may be obtained by renaming the
4261 source file before using `-save-temps'.
4264 Report the CPU time taken by each subprocess in the compilation
4265 sequence. For C source files, this is the compiler proper and
4266 assembler (plus the linker if linking is done). The output looks
4272 The first number on each line is the "user time", that is time
4273 spent executing the program itself. The second number is "system
4274 time", time spent executing operating system routines on behalf of
4275 the program. Both numbers are in seconds.
4278 Run variable tracking pass. It computes where variables are
4279 stored at each position in code. Better debugging information is
4280 then generated (if the debugging information format supports this
4283 It is enabled by default when compiling with optimization (`-Os',
4284 `-O', `-O2', ...), debugging information (`-g') and the debug info
4287 `-print-file-name=LIBRARY'
4288 Print the full absolute name of the library file LIBRARY that
4289 would be used when linking--and don't do anything else. With this
4290 option, GCC does not compile or link anything; it just prints the
4293 `-print-multi-directory'
4294 Print the directory name corresponding to the multilib selected by
4295 any other switches present in the command line. This directory is
4296 supposed to exist in `GCC_EXEC_PREFIX'.
4299 Print the mapping from multilib directory names to compiler
4300 switches that enable them. The directory name is separated from
4301 the switches by `;', and each switch starts with an `@' instead of
4302 the `-', without spaces between multiple switches. This is
4303 supposed to ease shell-processing.
4305 `-print-prog-name=PROGRAM'
4306 Like `-print-file-name', but searches for a program such as `cpp'.
4308 `-print-libgcc-file-name'
4309 Same as `-print-file-name=libgcc.a'.
4311 This is useful when you use `-nostdlib' or `-nodefaultlibs' but
4312 you do want to link with `libgcc.a'. You can do
4314 gcc -nostdlib FILES... `gcc -print-libgcc-file-name`
4316 `-print-search-dirs'
4317 Print the name of the configured installation directory and a list
4318 of program and library directories `gcc' will search--and don't do
4321 This is useful when `gcc' prints the error message `installation
4322 problem, cannot exec cpp0: No such file or directory'. To resolve
4323 this you either need to put `cpp0' and the other compiler
4324 components where `gcc' expects to find them, or you can set the
4325 environment variable `GCC_EXEC_PREFIX' to the directory where you
4326 installed them. Don't forget the trailing `/'. *Note Environment
4330 Print the compiler's target machine (for example,
4331 `i686-pc-linux-gnu')--and don't do anything else.
4334 Print the compiler version (for example, `3.0')--and don't do
4338 Print the compiler's built-in specs--and don't do anything else.
4339 (This is used when GCC itself is being built.) *Note Spec Files::.
4341 `-feliminate-unused-debug-types'
4342 Normally, when producing DWARF2 output, GCC will emit debugging
4343 information for all types declared in a compilation unit,
4344 regardless of whether or not they are actually used in that
4345 compilation unit. Sometimes this is useful, such as if, in the
4346 debugger, you want to cast a value to a type that is not actually
4347 used in your program (but is declared). More often, however, this
4348 results in a significant amount of wasted space. With this
4349 option, GCC will avoid producing debug symbol output for types
4350 that are nowhere used in the source file being compiled.
4353 File: gcc.info, Node: Optimize Options, Next: Preprocessor Options, Prev: Debugging Options, Up: Invoking GCC
4355 3.10 Options That Control Optimization
4356 ======================================
4358 These options control various sorts of optimizations.
4360 Without any optimization option, the compiler's goal is to reduce the
4361 cost of compilation and to make debugging produce the expected results.
4362 Statements are independent: if you stop the program with a breakpoint
4363 between statements, you can then assign a new value to any variable or
4364 change the program counter to any other statement in the function and
4365 get exactly the results you would expect from the source code.
4367 Turning on optimization flags makes the compiler attempt to improve
4368 the performance and/or code size at the expense of compilation time and
4369 possibly the ability to debug the program.
4371 The compiler performs optimization based on the knowledge it has of
4372 the program. Optimization levels `-O' and above, in particular, enable
4373 _unit-at-a-time_ mode, which allows the compiler to consider
4374 information gained from later functions in the file when compiling a
4375 function. Compiling multiple files at once to a single output file in
4376 _unit-at-a-time_ mode allows the compiler to use information gained
4377 from all of the files when compiling each of them.
4379 Not all optimizations are controlled directly by a flag. Only
4380 optimizations that have a flag are listed.
4384 Optimize. Optimizing compilation takes somewhat more time, and a
4385 lot more memory for a large function.
4387 With `-O', the compiler tries to reduce code size and execution
4388 time, without performing any optimizations that take a great deal
4389 of compilation time.
4391 `-O' turns on the following optimization flags:
4394 -fguess-branch-probability
4400 -ftree-dominator-opts
4411 `-O' also turns on `-fomit-frame-pointer' on machines where doing
4412 so does not interfere with debugging.
4415 Optimize even more. GCC performs nearly all supported
4416 optimizations that do not involve a space-speed tradeoff. The
4417 compiler does not perform loop unrolling or function inlining when
4418 you specify `-O2'. As compared to `-O', this option increases
4419 both compilation time and the performance of the generated code.
4421 `-O2' turns on all optimization flags specified by `-O'. It also
4422 turns on the following optimization flags:
4425 -foptimize-sibling-calls
4426 -fcse-follow-jumps -fcse-skip-blocks
4428 -fexpensive-optimizations
4429 -frerun-cse-after-loop
4432 -fschedule-insns -fschedule-insns2
4433 -fsched-interblock -fsched-spec
4435 -fstrict-aliasing -fstrict-overflow
4436 -fdelete-null-pointer-checks
4437 -freorder-blocks -freorder-functions
4438 -falign-functions -falign-jumps
4439 -falign-loops -falign-labels
4443 Please note the warning under `-fgcse' about invoking `-O2' on
4444 programs that use computed gotos.
4446 `-O2' doesn't turn on `-ftree-vrp' for the Ada compiler. This
4447 option must be explicitly specified on the command line to be
4448 enabled for the Ada compiler.
4451 Optimize yet more. `-O3' turns on all optimizations specified by
4452 `-O2' and also turns on the `-finline-functions',
4453 `-funswitch-loops' and `-fgcse-after-reload' options.
4456 Do not optimize. This is the default.
4459 Optimize for size. `-Os' enables all `-O2' optimizations that do
4460 not typically increase code size. It also performs further
4461 optimizations designed to reduce code size.
4463 `-Os' disables the following optimization flags:
4464 -falign-functions -falign-jumps -falign-loops
4465 -falign-labels -freorder-blocks -freorder-blocks-and-partition
4466 -fprefetch-loop-arrays -ftree-vect-loop-version
4468 If you use multiple `-O' options, with or without level numbers,
4469 the last such option is the one that is effective.
4471 Options of the form `-fFLAG' specify machine-independent flags. Most
4472 flags have both positive and negative forms; the negative form of
4473 `-ffoo' would be `-fno-foo'. In the table below, only one of the forms
4474 is listed--the one you typically will use. You can figure out the
4475 other form by either removing `no-' or adding it.
4477 The following options control specific optimizations. They are either
4478 activated by `-O' options or are related to ones that are. You can use
4479 the following flags in the rare cases when "fine-tuning" of
4480 optimizations to be performed is desired.
4482 `-fno-default-inline'
4483 Do not make member functions inline by default merely because they
4484 are defined inside the class scope (C++ only). Otherwise, when
4485 you specify `-O', member functions defined inside class scope are
4486 compiled inline by default; i.e., you don't need to add `inline'
4487 in front of the member function name.
4490 Always pop the arguments to each function call as soon as that
4491 function returns. For machines which must pop arguments after a
4492 function call, the compiler normally lets arguments accumulate on
4493 the stack for several function calls and pops them all at once.
4495 Disabled at levels `-O', `-O2', `-O3', `-Os'.
4498 Force memory operands to be copied into registers before doing
4499 arithmetic on them. This produces better code by making all memory
4500 references potential common subexpressions. When they are not
4501 common subexpressions, instruction combination should eliminate
4502 the separate register-load. This option is now a nop and will be
4506 Force memory address constants to be copied into registers before
4507 doing arithmetic on them.
4509 `-fomit-frame-pointer'
4510 Don't keep the frame pointer in a register for functions that
4511 don't need one. This avoids the instructions to save, set up and
4512 restore frame pointers; it also makes an extra register available
4513 in many functions. *It also makes debugging impossible on some
4516 On some machines, such as the VAX, this flag has no effect, because
4517 the standard calling sequence automatically handles the frame
4518 pointer and nothing is saved by pretending it doesn't exist. The
4519 machine-description macro `FRAME_POINTER_REQUIRED' controls
4520 whether a target machine supports this flag. *Note Register
4521 Usage: (gccint)Registers.
4523 Enabled at levels `-O', `-O2', `-O3', `-Os'.
4525 `-foptimize-sibling-calls'
4526 Optimize sibling and tail recursive calls.
4528 Enabled at levels `-O2', `-O3', `-Os'.
4531 Don't pay attention to the `inline' keyword. Normally this option
4532 is used to keep the compiler from expanding any functions inline.
4533 Note that if you are not optimizing, no functions can be expanded
4536 `-finline-functions'
4537 Integrate all simple functions into their callers. The compiler
4538 heuristically decides which functions are simple enough to be worth
4539 integrating in this way.
4541 If all calls to a given function are integrated, and the function
4542 is declared `static', then the function is normally not output as
4543 assembler code in its own right.
4545 Enabled at level `-O3'.
4547 `-finline-functions-called-once'
4548 Consider all `static' functions called once for inlining into their
4549 caller even if they are not marked `inline'. If a call to a given
4550 function is integrated, then the function is not output as
4551 assembler code in its own right.
4553 Enabled if `-funit-at-a-time' is enabled.
4556 Inline functions marked by `always_inline' and functions whose
4557 body seems smaller than the function call overhead early before
4558 doing `-fprofile-generate' instrumentation and real inlining pass.
4559 Doing so makes profiling significantly cheaper and usually
4560 inlining faster on programs having large chains of nested wrapper
4566 By default, GCC limits the size of functions that can be inlined.
4567 This flag allows the control of this limit for functions that are
4568 explicitly marked as inline (i.e., marked with the inline keyword
4569 or defined within the class definition in c++). N is the size of
4570 functions that can be inlined in number of pseudo instructions
4571 (not counting parameter handling). The default value of N is 600.
4572 Increasing this value can result in more inlined code at the cost
4573 of compilation time and memory consumption. Decreasing usually
4574 makes the compilation faster and less code will be inlined (which
4575 presumably means slower programs). This option is particularly
4576 useful for programs that use inlining heavily such as those based
4577 on recursive templates with C++.
4579 Inlining is actually controlled by a number of parameters, which
4580 may be specified individually by using `--param NAME=VALUE'. The
4581 `-finline-limit=N' option sets some of these parameters as follows:
4583 `max-inline-insns-single'
4586 `max-inline-insns-auto'
4590 is set to 130 or N/4, whichever is smaller.
4592 `max-inline-insns-rtl'
4595 See below for a documentation of the individual parameters
4596 controlling inlining.
4598 _Note:_ pseudo instruction represents, in this particular context,
4599 an abstract measurement of function's size. In no way does it
4600 represent a count of assembly instructions and as such its exact
4601 meaning might change from one release to an another.
4603 `-fkeep-inline-functions'
4604 In C, emit `static' functions that are declared `inline' into the
4605 object file, even if the function has been inlined into all of its
4606 callers. This switch does not affect functions using the `extern
4607 inline' extension in GNU C. In C++, emit any and all inline
4608 functions into the object file.
4610 `-fkeep-static-consts'
4611 Emit variables declared `static const' when optimization isn't
4612 turned on, even if the variables aren't referenced.
4614 GCC enables this option by default. If you want to force the
4615 compiler to check if the variable was referenced, regardless of
4616 whether or not optimization is turned on, use the
4617 `-fno-keep-static-consts' option.
4620 Attempt to merge identical constants (string constants and
4621 floating point constants) across compilation units.
4623 This option is the default for optimized compilation if the
4624 assembler and linker support it. Use `-fno-merge-constants' to
4625 inhibit this behavior.
4627 Enabled at levels `-O', `-O2', `-O3', `-Os'.
4629 `-fmerge-all-constants'
4630 Attempt to merge identical constants and identical variables.
4632 This option implies `-fmerge-constants'. In addition to
4633 `-fmerge-constants' this considers e.g. even constant initialized
4634 arrays or initialized constant variables with integral or floating
4635 point types. Languages like C or C++ require each non-automatic
4636 variable to have distinct location, so using this option will
4637 result in non-conforming behavior.
4640 Perform swing modulo scheduling immediately before the first
4641 scheduling pass. This pass looks at innermost loops and reorders
4642 their instructions by overlapping different iterations.
4644 `-fno-branch-count-reg'
4645 Do not use "decrement and branch" instructions on a count register,
4646 but instead generate a sequence of instructions that decrement a
4647 register, compare it against zero, then branch based upon the
4648 result. This option is only meaningful on architectures that
4649 support such instructions, which include x86, PowerPC, IA-64 and
4652 The default is `-fbranch-count-reg'.
4655 Do not put function addresses in registers; make each instruction
4656 that calls a constant function contain the function's address
4659 This option results in less efficient code, but some strange hacks
4660 that alter the assembler output may be confused by the
4661 optimizations performed when this option is not used.
4663 The default is `-ffunction-cse'
4665 `-fno-zero-initialized-in-bss'
4666 If the target supports a BSS section, GCC by default puts
4667 variables that are initialized to zero into BSS. This can save
4668 space in the resulting code.
4670 This option turns off this behavior because some programs
4671 explicitly rely on variables going to the data section. E.g., so
4672 that the resulting executable can find the beginning of that
4673 section and/or make assumptions based on that.
4675 The default is `-fzero-initialized-in-bss'.
4678 For front-ends that support it, generate additional code to check
4679 that indices used to access arrays are within the declared range.
4680 This is currently only supported by the Java and Fortran
4681 front-ends, where this option defaults to true and false
4684 `-fmudflap -fmudflapth -fmudflapir'
4685 For front-ends that support it (C and C++), instrument all risky
4686 pointer/array dereferencing operations, some standard library
4687 string/heap functions, and some other associated constructs with
4688 range/validity tests. Modules so instrumented should be immune to
4689 buffer overflows, invalid heap use, and some other classes of C/C++
4690 programming errors. The instrumentation relies on a separate
4691 runtime library (`libmudflap'), which will be linked into a
4692 program if `-fmudflap' is given at link time. Run-time behavior
4693 of the instrumented program is controlled by the `MUDFLAP_OPTIONS'
4694 environment variable. See `env MUDFLAP_OPTIONS=-help a.out' for
4697 Use `-fmudflapth' instead of `-fmudflap' to compile and to link if
4698 your program is multi-threaded. Use `-fmudflapir', in addition to
4699 `-fmudflap' or `-fmudflapth', if instrumentation should ignore
4700 pointer reads. This produces less instrumentation (and therefore
4701 faster execution) and still provides some protection against
4702 outright memory corrupting writes, but allows erroneously read
4703 data to propagate within a program.
4706 Perform optimizations where we check to see if a jump branches to a
4707 location where another comparison subsumed by the first is found.
4708 If so, the first branch is redirected to either the destination of
4709 the second branch or a point immediately following it, depending
4710 on whether the condition is known to be true or false.
4712 Enabled at levels `-O2', `-O3', `-Os'.
4714 `-fcse-follow-jumps'
4715 In common subexpression elimination, scan through jump instructions
4716 when the target of the jump is not reached by any other path. For
4717 example, when CSE encounters an `if' statement with an `else'
4718 clause, CSE will follow the jump when the condition tested is
4721 Enabled at levels `-O2', `-O3', `-Os'.
4724 This is similar to `-fcse-follow-jumps', but causes CSE to follow
4725 jumps which conditionally skip over blocks. When CSE encounters a
4726 simple `if' statement with no else clause, `-fcse-skip-blocks'
4727 causes CSE to follow the jump around the body of the `if'.
4729 Enabled at levels `-O2', `-O3', `-Os'.
4731 `-frerun-cse-after-loop'
4732 Re-run common subexpression elimination after loop optimizations
4735 Enabled at levels `-O2', `-O3', `-Os'.
4738 Perform a global common subexpression elimination pass. This pass
4739 also performs global constant and copy propagation.
4741 _Note:_ When compiling a program using computed gotos, a GCC
4742 extension, you may get better runtime performance if you disable
4743 the global common subexpression elimination pass by adding
4744 `-fno-gcse' to the command line.
4746 Enabled at levels `-O2', `-O3', `-Os'.
4749 When `-fgcse-lm' is enabled, global common subexpression
4750 elimination will attempt to move loads which are only killed by
4751 stores into themselves. This allows a loop containing a
4752 load/store sequence to be changed to a load outside the loop, and
4753 a copy/store within the loop.
4755 Enabled by default when gcse is enabled.
4758 When `-fgcse-sm' is enabled, a store motion pass is run after
4759 global common subexpression elimination. This pass will attempt
4760 to move stores out of loops. When used in conjunction with
4761 `-fgcse-lm', loops containing a load/store sequence can be changed
4762 to a load before the loop and a store after the loop.
4764 Not enabled at any optimization level.
4767 When `-fgcse-las' is enabled, the global common subexpression
4768 elimination pass eliminates redundant loads that come after stores
4769 to the same memory location (both partial and full redundancies).
4771 Not enabled at any optimization level.
4773 `-fgcse-after-reload'
4774 When `-fgcse-after-reload' is enabled, a redundant load elimination
4775 pass is performed after reload. The purpose of this pass is to
4776 cleanup redundant spilling.
4778 `-funsafe-loop-optimizations'
4779 If given, the loop optimizer will assume that loop indices do not
4780 overflow, and that the loops with nontrivial exit condition are not
4781 infinite. This enables a wider range of loop optimizations even if
4782 the loop optimizer itself cannot prove that these assumptions are
4783 valid. Using `-Wunsafe-loop-optimizations', the compiler will
4784 warn you if it finds this kind of loop.
4787 Perform cross-jumping transformation. This transformation unifies
4788 equivalent code and save code size. The resulting code may or may
4789 not perform better than without cross-jumping.
4791 Enabled at levels `-O2', `-O3', `-Os'.
4794 Attempt to transform conditional jumps into branch-less
4795 equivalents. This include use of conditional moves, min, max, set
4796 flags and abs instructions, and some tricks doable by standard
4797 arithmetics. The use of conditional execution on chips where it
4798 is available is controlled by `if-conversion2'.
4800 Enabled at levels `-O', `-O2', `-O3', `-Os'.
4803 Use conditional execution (where available) to transform
4804 conditional jumps into branch-less equivalents.
4806 Enabled at levels `-O', `-O2', `-O3', `-Os'.
4808 `-fdelete-null-pointer-checks'
4809 Use global dataflow analysis to identify and eliminate useless
4810 checks for null pointers. The compiler assumes that dereferencing
4811 a null pointer would have halted the program. If a pointer is
4812 checked after it has already been dereferenced, it cannot be null.
4814 In some environments, this assumption is not true, and programs can
4815 safely dereference null pointers. Use
4816 `-fno-delete-null-pointer-checks' to disable this optimization for
4817 programs which depend on that behavior.
4819 Enabled at levels `-O2', `-O3', `-Os'.
4821 `-fexpensive-optimizations'
4822 Perform a number of minor optimizations that are relatively
4825 Enabled at levels `-O2', `-O3', `-Os'.
4827 `-foptimize-register-move'
4829 Attempt to reassign register numbers in move instructions and as
4830 operands of other simple instructions in order to maximize the
4831 amount of register tying. This is especially helpful on machines
4832 with two-operand instructions.
4834 Note `-fregmove' and `-foptimize-register-move' are the same
4837 Enabled at levels `-O2', `-O3', `-Os'.
4840 If supported for the target machine, attempt to reorder
4841 instructions to exploit instruction slots available after delayed
4842 branch instructions.
4844 Enabled at levels `-O', `-O2', `-O3', `-Os'.
4847 If supported for the target machine, attempt to reorder
4848 instructions to eliminate execution stalls due to required data
4849 being unavailable. This helps machines that have slow floating
4850 point or memory load instructions by allowing other instructions
4851 to be issued until the result of the load or floating point
4852 instruction is required.
4854 Enabled at levels `-O2', `-O3', `-Os'.
4857 Similar to `-fschedule-insns', but requests an additional pass of
4858 instruction scheduling after register allocation has been done.
4859 This is especially useful on machines with a relatively small
4860 number of registers and where memory load instructions take more
4863 Enabled at levels `-O2', `-O3', `-Os'.
4865 `-fno-sched-interblock'
4866 Don't schedule instructions across basic blocks. This is normally
4867 enabled by default when scheduling before register allocation, i.e.
4868 with `-fschedule-insns' or at `-O2' or higher.
4871 Don't allow speculative motion of non-load instructions. This is
4872 normally enabled by default when scheduling before register
4873 allocation, i.e. with `-fschedule-insns' or at `-O2' or higher.
4876 Allow speculative motion of some load instructions. This only
4877 makes sense when scheduling before register allocation, i.e. with
4878 `-fschedule-insns' or at `-O2' or higher.
4880 `-fsched-spec-load-dangerous'
4881 Allow speculative motion of more load instructions. This only
4882 makes sense when scheduling before register allocation, i.e. with
4883 `-fschedule-insns' or at `-O2' or higher.
4885 `-fsched-stalled-insns=N'
4886 Define how many insns (if any) can be moved prematurely from the
4887 queue of stalled insns into the ready list, during the second
4890 `-fsched-stalled-insns-dep=N'
4891 Define how many insn groups (cycles) will be examined for a
4892 dependency on a stalled insn that is candidate for premature
4893 removal from the queue of stalled insns. Has an effect only
4894 during the second scheduling pass, and only if
4895 `-fsched-stalled-insns' is used and its value is not zero.
4897 `-fsched2-use-superblocks'
4898 When scheduling after register allocation, do use superblock
4899 scheduling algorithm. Superblock scheduling allows motion across
4900 basic block boundaries resulting on faster schedules. This option
4901 is experimental, as not all machine descriptions used by GCC model
4902 the CPU closely enough to avoid unreliable results from the
4905 This only makes sense when scheduling after register allocation,
4906 i.e. with `-fschedule-insns2' or at `-O2' or higher.
4908 `-fsched2-use-traces'
4909 Use `-fsched2-use-superblocks' algorithm when scheduling after
4910 register allocation and additionally perform code duplication in
4911 order to increase the size of superblocks using tracer pass. See
4912 `-ftracer' for details on trace formation.
4914 This mode should produce faster but significantly longer programs.
4915 Also without `-fbranch-probabilities' the traces constructed may
4916 not match the reality and hurt the performance. This only makes
4917 sense when scheduling after register allocation, i.e. with
4918 `-fschedule-insns2' or at `-O2' or higher.
4921 Eliminates redundant extension instructions and move the non
4922 redundant ones to optimal placement using LCM.
4924 `-freschedule-modulo-scheduled-loops'
4925 The modulo scheduling comes before the traditional scheduling, if
4926 a loop was modulo scheduled we may want to prevent the later
4927 scheduling passes from changing its schedule, we use this option
4931 Enable values to be allocated in registers that will be clobbered
4932 by function calls, by emitting extra instructions to save and
4933 restore the registers around such calls. Such allocation is done
4934 only when it seems to result in better code than would otherwise
4937 This option is always enabled by default on certain machines,
4938 usually those which have no call-preserved registers to use
4941 Enabled at levels `-O2', `-O3', `-Os'.
4944 Perform Partial Redundancy Elimination (PRE) on trees. This flag
4945 is enabled by default at `-O2' and `-O3'.
4948 Perform Full Redundancy Elimination (FRE) on trees. The difference
4949 between FRE and PRE is that FRE only considers expressions that
4950 are computed on all paths leading to the redundant computation.
4951 This analysis faster than PRE, though it exposes fewer
4952 redundancies. This flag is enabled by default at `-O' and higher.
4955 Perform copy propagation on trees. This pass eliminates
4956 unnecessary copy operations. This flag is enabled by default at
4959 `-ftree-store-copy-prop'
4960 Perform copy propagation of memory loads and stores. This pass
4961 eliminates unnecessary copy operations in memory references
4962 (structures, global variables, arrays, etc). This flag is enabled
4963 by default at `-O2' and higher.
4966 Perform structural alias analysis on trees. This flag is enabled
4967 by default at `-O' and higher.
4970 Perform interprocedural pointer analysis.
4973 Perform forward store motion on trees. This flag is enabled by
4974 default at `-O' and higher.
4977 Perform sparse conditional constant propagation (CCP) on trees.
4978 This pass only operates on local scalar variables and is enabled
4979 by default at `-O' and higher.
4982 Perform sparse conditional constant propagation (CCP) on trees.
4983 This pass operates on both local scalar variables and memory
4984 stores and loads (global variables, structures, arrays, etc).
4985 This flag is enabled by default at `-O2' and higher.
4988 Perform dead code elimination (DCE) on trees. This flag is
4989 enabled by default at `-O' and higher.
4991 `-ftree-dominator-opts'
4992 Perform a variety of simple scalar cleanups (constant/copy
4993 propagation, redundancy elimination, range propagation and
4994 expression simplification) based on a dominator tree traversal.
4995 This also performs jump threading (to reduce jumps to jumps). This
4996 flag is enabled by default at `-O' and higher.
4999 Perform loop header copying on trees. This is beneficial since it
5000 increases effectiveness of code motion optimizations. It also
5001 saves one jump. This flag is enabled by default at `-O' and
5002 higher. It is not enabled for `-Os', since it usually increases
5005 `-ftree-loop-optimize'
5006 Perform loop optimizations on trees. This flag is enabled by
5007 default at `-O' and higher.
5009 `-ftree-loop-linear'
5010 Perform linear loop transformations on tree. This flag can
5011 improve cache performance and allow further loop optimizations to
5015 Perform loop invariant motion on trees. This pass moves only
5016 invariants that would be hard to handle at RTL level (function
5017 calls, operations that expand to nontrivial sequences of insns).
5018 With `-funswitch-loops' it also moves operands of conditions that
5019 are invariant out of the loop, so that we can use just trivial
5020 invariantness analysis in loop unswitching. The pass also includes
5023 `-ftree-loop-ivcanon'
5024 Create a canonical counter for number of iterations in the loop
5025 for that determining number of iterations requires complicated
5026 analysis. Later optimizations then may determine the number
5027 easily. Useful especially in connection with unrolling.
5030 Perform induction variable optimizations (strength reduction,
5031 induction variable merging and induction variable elimination) on
5035 Perform scalar replacement of aggregates. This pass replaces
5036 structure references with scalars to prevent committing structures
5037 to memory too early. This flag is enabled by default at `-O' and
5041 Perform copy renaming on trees. This pass attempts to rename
5042 compiler temporaries to other variables at copy locations, usually
5043 resulting in variable names which more closely resemble the
5044 original variables. This flag is enabled by default at `-O' and
5048 Perform temporary expression replacement during the SSA->normal
5049 phase. Single use/single def temporaries are replaced at their
5050 use location with their defining expression. This results in
5051 non-GIMPLE code, but gives the expanders much more complex trees
5052 to work on resulting in better RTL generation. This is enabled by
5053 default at `-O' and higher.
5056 Perform live range splitting during the SSA->normal phase.
5057 Distinct live ranges of a variable are split into unique
5058 variables, allowing for better optimization later. This is
5059 enabled by default at `-O' and higher.
5062 Perform loop vectorization on trees.
5064 `-ftree-vect-loop-version'
5065 Perform loop versioning when doing loop vectorization on trees.
5066 When a loop appears to be vectorizable except that data alignment
5067 or data dependence cannot be determined at compile time then
5068 vectorized and non-vectorized versions of the loop are generated
5069 along with runtime checks for alignment or dependence to control
5070 which version is executed. This option is enabled by default
5071 except at level `-Os' where it is disabled.
5074 Perform Value Range Propagation on trees. This is similar to the
5075 constant propagation pass, but instead of values, ranges of values
5076 are propagated. This allows the optimizers to remove unnecessary
5077 range checks like array bound checks and null pointer checks.
5078 This is enabled by default at `-O2' and higher. Null pointer check
5079 elimination is only done if `-fdelete-null-pointer-checks' is
5083 Perform tail duplication to enlarge superblock size. This
5084 transformation simplifies the control flow of the function
5085 allowing other optimizations to do better job.
5088 Unroll loops whose number of iterations can be determined at
5089 compile time or upon entry to the loop. `-funroll-loops' implies
5090 `-frerun-cse-after-loop'. This option makes code larger, and may
5091 or may not make it run faster.
5093 `-funroll-all-loops'
5094 Unroll all loops, even if their number of iterations is uncertain
5095 when the loop is entered. This usually makes programs run more
5096 slowly. `-funroll-all-loops' implies the same options as
5099 `-fsplit-ivs-in-unroller'
5100 Enables expressing of values of induction variables in later
5101 iterations of the unrolled loop using the value in the first
5102 iteration. This breaks long dependency chains, thus improving
5103 efficiency of the scheduling passes.
5105 Combination of `-fweb' and CSE is often sufficient to obtain the
5106 same effect. However in cases the loop body is more complicated
5107 than a single basic block, this is not reliable. It also does not
5108 work at all on some of the architectures due to restrictions in
5111 This optimization is enabled by default.
5113 `-fvariable-expansion-in-unroller'
5114 With this option, the compiler will create multiple copies of some
5115 local variables when unrolling a loop which can result in superior
5118 `-fprefetch-loop-arrays'
5119 If supported by the target machine, generate instructions to
5120 prefetch memory to improve the performance of loops that access
5123 This option may generate better or worse code; results are highly
5124 dependent on the structure of loops within the source code.
5126 Disabled at level `-Os'.
5130 Disable any machine-specific peephole optimizations. The
5131 difference between `-fno-peephole' and `-fno-peephole2' is in how
5132 they are implemented in the compiler; some targets use one, some
5133 use the other, a few use both.
5135 `-fpeephole' is enabled by default. `-fpeephole2' enabled at
5136 levels `-O2', `-O3', `-Os'.
5138 `-fno-guess-branch-probability'
5139 Do not guess branch probabilities using heuristics.
5141 GCC will use heuristics to guess branch probabilities if they are
5142 not provided by profiling feedback (`-fprofile-arcs'). These
5143 heuristics are based on the control flow graph. If some branch
5144 probabilities are specified by `__builtin_expect', then the
5145 heuristics will be used to guess branch probabilities for the rest
5146 of the control flow graph, taking the `__builtin_expect' info into
5147 account. The interactions between the heuristics and
5148 `__builtin_expect' can be complex, and in some cases, it may be
5149 useful to disable the heuristics so that the effects of
5150 `__builtin_expect' are easier to understand.
5152 The default is `-fguess-branch-probability' at levels `-O', `-O2',
5156 Reorder basic blocks in the compiled function in order to reduce
5157 number of taken branches and improve code locality.
5159 Enabled at levels `-O2', `-O3'.
5161 `-freorder-blocks-and-partition'
5162 In addition to reordering basic blocks in the compiled function,
5163 in order to reduce number of taken branches, partitions hot and
5164 cold basic blocks into separate sections of the assembly and .o
5165 files, to improve paging and cache locality performance.
5167 This optimization is automatically turned off in the presence of
5168 exception handling, for linkonce sections, for functions with a
5169 user-defined section attribute and on any architecture that does
5170 not support named sections.
5172 `-freorder-functions'
5173 Reorder functions in the object file in order to improve code
5174 locality. This is implemented by using special subsections
5175 `.text.hot' for most frequently executed functions and
5176 `.text.unlikely' for unlikely executed functions. Reordering is
5177 done by the linker so object file format must support named
5178 sections and linker must place them in a reasonable way.
5180 Also profile feedback must be available in to make this option
5181 effective. See `-fprofile-arcs' for details.
5183 Enabled at levels `-O2', `-O3', `-Os'.
5186 Allows the compiler to assume the strictest aliasing rules
5187 applicable to the language being compiled. For C (and C++), this
5188 activates optimizations based on the type of expressions. In
5189 particular, an object of one type is assumed never to reside at
5190 the same address as an object of a different type, unless the
5191 types are almost the same. For example, an `unsigned int' can
5192 alias an `int', but not a `void*' or a `double'. A character type
5193 may alias any other type.
5195 Pay special attention to code like this:
5206 The practice of reading from a different union member than the one
5207 most recently written to (called "type-punning") is common. Even
5208 with `-fstrict-aliasing', type-punning is allowed, provided the
5209 memory is accessed through the union type. So, the code above
5210 will work as expected. However, this code might not:
5219 Every language that wishes to perform language-specific alias
5220 analysis should define a function that computes, given an `tree'
5221 node, an alias set for the node. Nodes in different alias sets
5222 are not allowed to alias. For an example, see the C front-end
5223 function `c_get_alias_set'.
5225 Enabled at levels `-O2', `-O3', `-Os'.
5228 Allow the compiler to assume strict signed overflow rules,
5229 depending on the language being compiled. For C (and C++) this
5230 means that overflow when doing arithmetic with signed numbers is
5231 undefined, which means that the compiler may assume that it will
5232 not happen. This permits various optimizations. For example, the
5233 compiler will assume that an expression like `i + 10 > i' will
5234 always be true for signed `i'. This assumption is only valid if
5235 signed overflow is undefined, as the expression is false if `i +
5236 10' overflows when using twos complement arithmetic. When this
5237 option is in effect any attempt to determine whether an operation
5238 on signed numbers will overflow must be written carefully to not
5239 actually involve overflow.
5241 See also the `-fwrapv' option. Using `-fwrapv' means that signed
5242 overflow is fully defined: it wraps. When `-fwrapv' is used,
5243 there is no difference between `-fstrict-overflow' and
5244 `-fno-strict-overflow'. With `-fwrapv' certain types of overflow
5245 are permitted. For example, if the compiler gets an overflow when
5246 doing arithmetic on constants, the overflowed value can still be
5247 used with `-fwrapv', but not otherwise.
5249 The `-fstrict-overflow' option is enabled at levels `-O2', `-O3',
5253 `-falign-functions=N'
5254 Align the start of functions to the next power-of-two greater than
5255 N, skipping up to N bytes. For instance, `-falign-functions=32'
5256 aligns functions to the next 32-byte boundary, but
5257 `-falign-functions=24' would align to the next 32-byte boundary
5258 only if this can be done by skipping 23 bytes or less.
5260 `-fno-align-functions' and `-falign-functions=1' are equivalent
5261 and mean that functions will not be aligned.
5263 Some assemblers only support this flag when N is a power of two;
5264 in that case, it is rounded up.
5266 If N is not specified or is zero, use a machine-dependent default.
5268 Enabled at levels `-O2', `-O3'.
5272 Align all branch targets to a power-of-two boundary, skipping up to
5273 N bytes like `-falign-functions'. This option can easily make
5274 code slower, because it must insert dummy operations for when the
5275 branch target is reached in the usual flow of the code.
5277 `-fno-align-labels' and `-falign-labels=1' are equivalent and mean
5278 that labels will not be aligned.
5280 If `-falign-loops' or `-falign-jumps' are applicable and are
5281 greater than this value, then their values are used instead.
5283 If N is not specified or is zero, use a machine-dependent default
5284 which is very likely to be `1', meaning no alignment.
5286 Enabled at levels `-O2', `-O3'.
5290 Align loops to a power-of-two boundary, skipping up to N bytes
5291 like `-falign-functions'. The hope is that the loop will be
5292 executed many times, which will make up for any execution of the
5295 `-fno-align-loops' and `-falign-loops=1' are equivalent and mean
5296 that loops will not be aligned.
5298 If N is not specified or is zero, use a machine-dependent default.
5300 Enabled at levels `-O2', `-O3'.
5304 Align branch targets to a power-of-two boundary, for branch targets
5305 where the targets can only be reached by jumping, skipping up to N
5306 bytes like `-falign-functions'. In this case, no dummy operations
5309 `-fno-align-jumps' and `-falign-jumps=1' are equivalent and mean
5310 that loops will not be aligned.
5312 If N is not specified or is zero, use a machine-dependent default.
5314 Enabled at levels `-O2', `-O3'.
5317 Parse the whole compilation unit before starting to produce code.
5318 This allows some extra optimizations to take place but consumes
5319 more memory (in general). There are some compatibility issues
5320 with _unit-at-a-time_ mode:
5321 * enabling _unit-at-a-time_ mode may change the order in which
5322 functions, variables, and top-level `asm' statements are
5323 emitted, and will likely break code relying on some particular
5324 ordering. The majority of such top-level `asm' statements,
5325 though, can be replaced by `section' attributes. The
5326 `fno-toplevel-reorder' option may be used to keep the ordering
5327 used in the input file, at the cost of some optimizations.
5329 * _unit-at-a-time_ mode removes unreferenced static variables
5330 and functions. This may result in undefined references when
5331 an `asm' statement refers directly to variables or functions
5332 that are otherwise unused. In that case either the
5333 variable/function shall be listed as an operand of the `asm'
5334 statement operand or, in the case of top-level `asm'
5335 statements the attribute `used' shall be used on the
5338 * Static functions now can use non-standard passing conventions
5339 that may break `asm' statements calling functions directly.
5340 Again, attribute `used' will prevent this behavior.
5342 As a temporary workaround, `-fno-unit-at-a-time' can be used, but
5343 this scheme may not be supported by future releases of GCC.
5345 Enabled at levels `-O', `-O2', `-O3', `-Os'.
5347 `-fno-toplevel-reorder'
5348 Do not reorder top-level functions, variables, and `asm'
5349 statements. Output them in the same order that they appear in the
5350 input file. When this option is used, unreferenced static
5351 variables will not be removed. This option is intended to support
5352 existing code which relies on a particular ordering. For new
5353 code, it is better to use attributes.
5356 Constructs webs as commonly used for register allocation purposes
5357 and assign each web individual pseudo register. This allows the
5358 register allocation pass to operate on pseudos directly, but also
5359 strengthens several other optimization passes, such as CSE, loop
5360 optimizer and trivial dead code remover. It can, however, make
5361 debugging impossible, since variables will no longer stay in a
5364 Enabled by default with `-funroll-loops'.
5367 Assume that the current compilation unit represents whole program
5368 being compiled. All public functions and variables with the
5369 exception of `main' and those merged by attribute
5370 `externally_visible' become static functions and in a affect gets
5371 more aggressively optimized by interprocedural optimizers. While
5372 this option is equivalent to proper use of `static' keyword for
5373 programs consisting of single file, in combination with option
5374 `--combine' this flag can be used to compile most of smaller scale
5375 C programs since the functions and variables become local for the
5376 whole combined compilation unit, not for the single source file
5379 `-fno-cprop-registers'
5380 After register allocation and post-register allocation instruction
5381 splitting, we perform a copy-propagation pass to try to reduce
5382 scheduling dependencies and occasionally eliminate the copy.
5384 Disabled at levels `-O', `-O2', `-O3', `-Os'.
5386 `-fprofile-generate'
5387 Enable options usually used for instrumenting application to
5388 produce profile useful for later recompilation with profile
5389 feedback based optimization. You must use `-fprofile-generate'
5390 both when compiling and when linking your program.
5392 The following options are enabled: `-fprofile-arcs',
5393 `-fprofile-values', `-fvpt'.
5396 Enable profile feedback directed optimizations, and optimizations
5397 generally profitable only with profile feedback available.
5399 The following options are enabled: `-fbranch-probabilities',
5400 `-fvpt', `-funroll-loops', `-fpeel-loops', `-ftracer'
5403 The following options control compiler behavior regarding floating
5404 point arithmetic. These options trade off between speed and
5405 correctness. All must be specifically enabled.
5408 Do not store floating point variables in registers, and inhibit
5409 other options that might change whether a floating point value is
5410 taken from a register or memory.
5412 This option prevents undesirable excess precision on machines such
5413 as the 68000 where the floating registers (of the 68881) keep more
5414 precision than a `double' is supposed to have. Similarly for the
5415 x86 architecture. For most programs, the excess precision does
5416 only good, but a few programs rely on the precise definition of
5417 IEEE floating point. Use `-ffloat-store' for such programs, after
5418 modifying them to store all pertinent intermediate computations
5422 Sets `-fno-math-errno', `-funsafe-math-optimizations',
5423 `-fno-trapping-math', `-ffinite-math-only', `-fno-rounding-math',
5424 `-fno-signaling-nans' and `fcx-limited-range'.
5426 This option causes the preprocessor macro `__FAST_MATH__' to be
5429 This option should never be turned on by any `-O' option since it
5430 can result in incorrect output for programs which depend on an
5431 exact implementation of IEEE or ISO rules/specifications for math
5435 Do not set ERRNO after calling math functions that are executed
5436 with a single instruction, e.g., sqrt. A program that relies on
5437 IEEE exceptions for math error handling may want to use this flag
5438 for speed while maintaining IEEE arithmetic compatibility.
5440 This option should never be turned on by any `-O' option since it
5441 can result in incorrect output for programs which depend on an
5442 exact implementation of IEEE or ISO rules/specifications for math
5445 The default is `-fmath-errno'.
5447 On Darwin systems, the math library never sets `errno'. There is
5448 therefore no reason for the compiler to consider the possibility
5449 that it might, and `-fno-math-errno' is the default.
5451 `-funsafe-math-optimizations'
5452 Allow optimizations for floating-point arithmetic that (a) assume
5453 that arguments and results are valid and (b) may violate IEEE or
5454 ANSI standards. When used at link-time, it may include libraries
5455 or startup files that change the default FPU control word or other
5456 similar optimizations.
5458 This option should never be turned on by any `-O' option since it
5459 can result in incorrect output for programs which depend on an
5460 exact implementation of IEEE or ISO rules/specifications for math
5463 The default is `-fno-unsafe-math-optimizations'.
5465 `-ffinite-math-only'
5466 Allow optimizations for floating-point arithmetic that assume that
5467 arguments and results are not NaNs or +-Infs.
5469 This option should never be turned on by any `-O' option since it
5470 can result in incorrect output for programs which depend on an
5471 exact implementation of IEEE or ISO rules/specifications.
5473 The default is `-fno-finite-math-only'.
5475 `-fno-trapping-math'
5476 Compile code assuming that floating-point operations cannot
5477 generate user-visible traps. These traps include division by
5478 zero, overflow, underflow, inexact result and invalid operation.
5479 This option implies `-fno-signaling-nans'. Setting this option
5480 may allow faster code if one relies on "non-stop" IEEE arithmetic,
5483 This option should never be turned on by any `-O' option since it
5484 can result in incorrect output for programs which depend on an
5485 exact implementation of IEEE or ISO rules/specifications for math
5488 The default is `-ftrapping-math'.
5491 Disable transformations and optimizations that assume default
5492 floating point rounding behavior. This is round-to-zero for all
5493 floating point to integer conversions, and round-to-nearest for
5494 all other arithmetic truncations. This option should be specified
5495 for programs that change the FP rounding mode dynamically, or that
5496 may be executed with a non-default rounding mode. This option
5497 disables constant folding of floating point expressions at
5498 compile-time (which may be affected by rounding mode) and
5499 arithmetic transformations that are unsafe in the presence of
5500 sign-dependent rounding modes.
5502 The default is `-fno-rounding-math'.
5504 This option is experimental and does not currently guarantee to
5505 disable all GCC optimizations that are affected by rounding mode.
5506 Future versions of GCC may provide finer control of this setting
5507 using C99's `FENV_ACCESS' pragma. This command line option will
5508 be used to specify the default state for `FENV_ACCESS'.
5510 `-frtl-abstract-sequences'
5511 It is a size optimization method. This option is to find identical
5512 sequences of code, which can be turned into pseudo-procedures and
5513 then replace all occurrences with calls to the newly created
5514 subroutine. It is kind of an opposite of `-finline-functions'.
5515 This optimization runs at RTL level.
5518 Compile code assuming that IEEE signaling NaNs may generate
5519 user-visible traps during floating-point operations. Setting this
5520 option disables optimizations that may change the number of
5521 exceptions visible with signaling NaNs. This option implies
5524 This option causes the preprocessor macro `__SUPPORT_SNAN__' to be
5527 The default is `-fno-signaling-nans'.
5529 This option is experimental and does not currently guarantee to
5530 disable all GCC optimizations that affect signaling NaN behavior.
5532 `-fsingle-precision-constant'
5533 Treat floating point constant as single precision constant instead
5534 of implicitly converting it to double precision constant.
5536 `-fcx-limited-range'
5537 `-fno-cx-limited-range'
5538 When enabled, this option states that a range reduction step is not
5539 needed when performing complex division. The default is
5540 `-fno-cx-limited-range', but is enabled by `-ffast-math'.
5542 This option controls the default setting of the ISO C99
5543 `CX_LIMITED_RANGE' pragma. Nevertheless, the option applies to
5547 The following options control optimizations that may improve
5548 performance, but are not enabled by any `-O' options. This section
5549 includes experimental options that may produce broken code.
5551 `-fbranch-probabilities'
5552 After running a program compiled with `-fprofile-arcs' (*note
5553 Options for Debugging Your Program or `gcc': Debugging Options.),
5554 you can compile it a second time using `-fbranch-probabilities',
5555 to improve optimizations based on the number of times each branch
5556 was taken. When the program compiled with `-fprofile-arcs' exits
5557 it saves arc execution counts to a file called `SOURCENAME.gcda'
5558 for each source file The information in this data file is very
5559 dependent on the structure of the generated code, so you must use
5560 the same source code and the same optimization options for both
5563 With `-fbranch-probabilities', GCC puts a `REG_BR_PROB' note on
5564 each `JUMP_INSN' and `CALL_INSN'. These can be used to improve
5565 optimization. Currently, they are only used in one place: in
5566 `reorg.c', instead of guessing which path a branch is mostly to
5567 take, the `REG_BR_PROB' values are used to exactly determine which
5568 path is taken more often.
5571 If combined with `-fprofile-arcs', it adds code so that some data
5572 about values of expressions in the program is gathered.
5574 With `-fbranch-probabilities', it reads back the data gathered
5575 from profiling values of expressions and adds `REG_VALUE_PROFILE'
5576 notes to instructions for their later usage in optimizations.
5578 Enabled with `-fprofile-generate' and `-fprofile-use'.
5581 If combined with `-fprofile-arcs', it instructs the compiler to add
5582 a code to gather information about values of expressions.
5584 With `-fbranch-probabilities', it reads back the data gathered and
5585 actually performs the optimizations based on them. Currently the
5586 optimizations include specialization of division operation using
5587 the knowledge about the value of the denominator.
5589 `-frename-registers'
5590 Attempt to avoid false dependencies in scheduled code by making use
5591 of registers left over after register allocation. This
5592 optimization will most benefit processors with lots of registers.
5593 Depending on the debug information format adopted by the target,
5594 however, it can make debugging impossible, since variables will no
5595 longer stay in a "home register".
5597 Enabled by default with `-funroll-loops'.
5600 Perform tail duplication to enlarge superblock size. This
5601 transformation simplifies the control flow of the function
5602 allowing other optimizations to do better job.
5604 Enabled with `-fprofile-use'.
5607 Unroll loops whose number of iterations can be determined at
5608 compile time or upon entry to the loop. `-funroll-loops' implies
5609 `-frerun-cse-after-loop', `-fweb' and `-frename-registers'. It
5610 also turns on complete loop peeling (i.e. complete removal of
5611 loops with small constant number of iterations). This option
5612 makes code larger, and may or may not make it run faster.
5614 Enabled with `-fprofile-use'.
5616 `-funroll-all-loops'
5617 Unroll all loops, even if their number of iterations is uncertain
5618 when the loop is entered. This usually makes programs run more
5619 slowly. `-funroll-all-loops' implies the same options as
5623 Peels the loops for that there is enough information that they do
5624 not roll much (from profile feedback). It also turns on complete
5625 loop peeling (i.e. complete removal of loops with small constant
5626 number of iterations).
5628 Enabled with `-fprofile-use'.
5630 `-fmove-loop-invariants'
5631 Enables the loop invariant motion pass in the RTL loop optimizer.
5632 Enabled at level `-O1'
5635 Move branches with loop invariant conditions out of the loop, with
5636 duplicates of the loop on both branches (modified according to
5637 result of the condition).
5639 `-ffunction-sections'
5641 Place each function or data item into its own section in the output
5642 file if the target supports arbitrary sections. The name of the
5643 function or the name of the data item determines the section's name
5646 Use these options on systems where the linker can perform
5647 optimizations to improve locality of reference in the instruction
5648 space. Most systems using the ELF object format and SPARC
5649 processors running Solaris 2 have linkers with such optimizations.
5650 AIX may have these optimizations in the future.
5652 Only use these options when there are significant benefits from
5653 doing so. When you specify these options, the assembler and
5654 linker will create larger object and executable files and will
5655 also be slower. You will not be able to use `gprof' on all
5656 systems if you specify this option and you may have problems with
5657 debugging if you specify both this option and `-g'.
5659 `-fbranch-target-load-optimize'
5660 Perform branch target register load optimization before prologue /
5661 epilogue threading. The use of target registers can typically be
5662 exposed only during reload, thus hoisting loads out of loops and
5663 doing inter-block scheduling needs a separate optimization pass.
5665 `-fbranch-target-load-optimize2'
5666 Perform branch target register load optimization after prologue /
5669 `-fbtr-bb-exclusive'
5670 When performing branch target register load optimization, don't
5671 reuse branch target registers in within any basic block.
5674 Emit extra code to check for buffer overflows, such as stack
5675 smashing attacks. This is done by adding a guard variable to
5676 functions with vulnerable objects. This includes functions that
5677 call alloca, and functions with buffers larger than 8 bytes. The
5678 guards are initialized when a function is entered and then checked
5679 when the function exits. If a guard check fails, an error message
5680 is printed and the program exits.
5682 `-fstack-protector-all'
5683 Like `-fstack-protector' except that all functions are protected.
5686 Try to reduce the number of symbolic address calculations by using
5687 shared "anchor" symbols to address nearby objects. This
5688 transformation can help to reduce the number of GOT entries and
5689 GOT accesses on some targets.
5691 For example, the implementation of the following function `foo':
5694 int foo (void) { return a + b + c; }
5696 would usually calculate the addresses of all three variables, but
5697 if you compile it with `-fsection-anchors', it will access the
5698 variables from a common anchor point instead. The effect is
5699 similar to the following pseudocode (which isn't valid C):
5703 register int *xr = &x;
5704 return xr[&a - &x] + xr[&b - &x] + xr[&c - &x];
5707 Not all targets support this option.
5709 `--param NAME=VALUE'
5710 In some places, GCC uses various constants to control the amount of
5711 optimization that is done. For example, GCC will not inline
5712 functions that contain more that a certain number of instructions.
5713 You can control some of these constants on the command-line using
5714 the `--param' option.
5716 The names of specific parameters, and the meaning of the values,
5717 are tied to the internals of the compiler, and are subject to
5718 change without notice in future releases.
5720 In each case, the VALUE is an integer. The allowable choices for
5721 NAME are given in the following table:
5723 `salias-max-implicit-fields'
5724 The maximum number of fields in a variable without direct
5725 structure accesses for which structure aliasing will consider
5726 trying to track each field. The default is 5
5728 `salias-max-array-elements'
5729 The maximum number of elements an array can have and its
5730 elements still be tracked individually by structure aliasing.
5733 `sra-max-structure-size'
5734 The maximum structure size, in bytes, at which the scalar
5735 replacement of aggregates (SRA) optimization will perform
5736 block copies. The default value, 0, implies that GCC will
5737 select the most appropriate size itself.
5739 `sra-field-structure-ratio'
5740 The threshold ratio (as a percentage) between instantiated
5741 fields and the complete structure size. We say that if the
5742 ratio of the number of bytes in instantiated fields to the
5743 number of bytes in the complete structure exceeds this
5744 parameter, then block copies are not used. The default is 75.
5746 `max-crossjump-edges'
5747 The maximum number of incoming edges to consider for
5748 crossjumping. The algorithm used by `-fcrossjumping' is
5749 O(N^2) in the number of edges incoming to each block.
5750 Increasing values mean more aggressive optimization, making
5751 the compile time increase with probably small improvement in
5754 `min-crossjump-insns'
5755 The minimum number of instructions which must be matched at
5756 the end of two blocks before crossjumping will be performed
5757 on them. This value is ignored in the case where all
5758 instructions in the block being crossjumped from are matched.
5759 The default value is 5.
5761 `max-grow-copy-bb-insns'
5762 The maximum code size expansion factor when copying basic
5763 blocks instead of jumping. The expansion is relative to a
5764 jump instruction. The default value is 8.
5766 `max-goto-duplication-insns'
5767 The maximum number of instructions to duplicate to a block
5768 that jumps to a computed goto. To avoid O(N^2) behavior in a
5769 number of passes, GCC factors computed gotos early in the
5770 compilation process, and unfactors them as late as possible.
5771 Only computed jumps at the end of a basic blocks with no more
5772 than max-goto-duplication-insns are unfactored. The default
5775 `max-delay-slot-insn-search'
5776 The maximum number of instructions to consider when looking
5777 for an instruction to fill a delay slot. If more than this
5778 arbitrary number of instructions is searched, the time
5779 savings from filling the delay slot will be minimal so stop
5780 searching. Increasing values mean more aggressive
5781 optimization, making the compile time increase with probably
5782 small improvement in executable run time.
5784 `max-delay-slot-live-search'
5785 When trying to fill delay slots, the maximum number of
5786 instructions to consider when searching for a block with
5787 valid live register information. Increasing this arbitrarily
5788 chosen value means more aggressive optimization, increasing
5789 the compile time. This parameter should be removed when the
5790 delay slot code is rewritten to maintain the control-flow
5794 The approximate maximum amount of memory that will be
5795 allocated in order to perform the global common subexpression
5796 elimination optimization. If more memory than specified is
5797 required, the optimization will not be done.
5800 The maximum number of passes of GCSE to run. The default is
5803 `max-pending-list-length'
5804 The maximum number of pending dependencies scheduling will
5805 allow before flushing the current state and starting over.
5806 Large functions with few branches or calls can create
5807 excessively large lists which needlessly consume memory and
5810 `max-inline-insns-single'
5811 Several parameters control the tree inliner used in gcc.
5812 This number sets the maximum number of instructions (counted
5813 in GCC's internal representation) in a single function that
5814 the tree inliner will consider for inlining. This only
5815 affects functions declared inline and methods implemented in
5816 a class declaration (C++). The default value is 450.
5818 `max-inline-insns-auto'
5819 When you use `-finline-functions' (included in `-O3'), a lot
5820 of functions that would otherwise not be considered for
5821 inlining by the compiler will be investigated. To those
5822 functions, a different (more restrictive) limit compared to
5823 functions declared inline can be applied. The default value
5826 `large-function-insns'
5827 The limit specifying really large functions. For functions
5828 larger than this limit after inlining inlining is constrained
5829 by `--param large-function-growth'. This parameter is useful
5830 primarily to avoid extreme compilation time caused by
5831 non-linear algorithms used by the backend. This parameter is
5832 ignored when `-funit-at-a-time' is not used. The default
5835 `large-function-growth'
5836 Specifies maximal growth of large function caused by inlining
5837 in percents. This parameter is ignored when
5838 `-funit-at-a-time' is not used. The default value is 100
5839 which limits large function growth to 2.0 times the original
5843 The limit specifying large translation unit. Growth caused
5844 by inlining of units larger than this limit is limited by
5845 `--param inline-unit-growth'. For small units this might be
5846 too tight (consider unit consisting of function A that is
5847 inline and B that just calls A three time. If B is small
5848 relative to A, the growth of unit is 300\% and yet such
5849 inlining is very sane. For very large units consisting of
5850 small inlininable functions however the overall unit growth
5851 limit is needed to avoid exponential explosion of code size.
5852 Thus for smaller units, the size is increased to `--param
5853 large-unit-insns' before applying `--param
5854 inline-unit-growth'. The default is 10000
5856 `inline-unit-growth'
5857 Specifies maximal overall growth of the compilation unit
5858 caused by inlining. This parameter is ignored when
5859 `-funit-at-a-time' is not used. The default value is 50
5860 which limits unit growth to 1.5 times the original size.
5862 `max-inline-insns-recursive'
5863 `max-inline-insns-recursive-auto'
5864 Specifies maximum number of instructions out-of-line copy of
5865 self recursive inline function can grow into by performing
5868 For functions declared inline `--param
5869 max-inline-insns-recursive' is taken into account. For
5870 function not declared inline, recursive inlining happens only
5871 when `-finline-functions' (included in `-O3') is enabled and
5872 `--param max-inline-insns-recursive-auto' is used. The
5873 default value is 450.
5875 `max-inline-recursive-depth'
5876 `max-inline-recursive-depth-auto'
5877 Specifies maximum recursion depth used by the recursive
5880 For functions declared inline `--param
5881 max-inline-recursive-depth' is taken into account. For
5882 function not declared inline, recursive inlining happens only
5883 when `-finline-functions' (included in `-O3') is enabled and
5884 `--param max-inline-recursive-depth-auto' is used. The
5885 default value is 450.
5887 `min-inline-recursive-probability'
5888 Recursive inlining is profitable only for function having
5889 deep recursion in average and can hurt for function having
5890 little recursion depth by increasing the prologue size or
5891 complexity of function body to other optimizers.
5893 When profile feedback is available (see `-fprofile-generate')
5894 the actual recursion depth can be guessed from probability
5895 that function will recurse via given call expression. This
5896 parameter limits inlining only to call expression whose
5897 probability exceeds given threshold (in percents). The
5898 default value is 10.
5901 Specify cost of call instruction relative to simple
5902 arithmetics operations (having cost of 1). Increasing this
5903 cost disqualifies inlining of non-leaf functions and at the
5904 same time increases size of leaf function that is believed to
5905 reduce function size by being inlined. In effect it
5906 increases amount of inlining for code having large
5907 abstraction penalty (many functions that just pass the
5908 arguments to other functions) and decrease inlining for code
5909 with low abstraction penalty. The default value is 16.
5911 `max-unrolled-insns'
5912 The maximum number of instructions that a loop should have if
5913 that loop is unrolled, and if the loop is unrolled, it
5914 determines how many times the loop code is unrolled.
5916 `max-average-unrolled-insns'
5917 The maximum number of instructions biased by probabilities of
5918 their execution that a loop should have if that loop is
5919 unrolled, and if the loop is unrolled, it determines how many
5920 times the loop code is unrolled.
5923 The maximum number of unrollings of a single loop.
5926 The maximum number of instructions that a loop should have if
5927 that loop is peeled, and if the loop is peeled, it determines
5928 how many times the loop code is peeled.
5931 The maximum number of peelings of a single loop.
5933 `max-completely-peeled-insns'
5934 The maximum number of insns of a completely peeled loop.
5936 `max-completely-peel-times'
5937 The maximum number of iterations of a loop to be suitable for
5940 `max-unswitch-insns'
5941 The maximum number of insns of an unswitched loop.
5943 `max-unswitch-level'
5944 The maximum number of branches unswitched in a single loop.
5947 The minimum cost of an expensive expression in the loop
5950 `iv-consider-all-candidates-bound'
5951 Bound on number of candidates for induction variables below
5952 that all candidates are considered for each use in induction
5953 variable optimizations. Only the most relevant candidates
5954 are considered if there are more candidates, to avoid
5955 quadratic time complexity.
5957 `iv-max-considered-uses'
5958 The induction variable optimizations give up on loops that
5959 contain more induction variable uses.
5961 `iv-always-prune-cand-set-bound'
5962 If number of candidates in the set is smaller than this value,
5963 we always try to remove unnecessary ivs from the set during
5964 its optimization when a new iv is added to the set.
5966 `scev-max-expr-size'
5967 Bound on size of expressions used in the scalar evolutions
5968 analyzer. Large expressions slow the analyzer.
5970 `vect-max-version-checks'
5971 The maximum number of runtime checks that can be performed
5972 when doing loop versioning in the vectorizer. See option
5973 ftree-vect-loop-version for more information.
5975 `max-iterations-to-track'
5976 The maximum number of iterations of a loop the brute force
5977 algorithm for analysis of # of iterations of the loop tries
5980 `hot-bb-count-fraction'
5981 Select fraction of the maximal count of repetitions of basic
5982 block in program given basic block needs to have to be
5985 `hot-bb-frequency-fraction'
5986 Select fraction of the maximal frequency of executions of
5987 basic block in function given basic block needs to have to be
5990 `max-predicted-iterations'
5991 The maximum number of loop iterations we predict statically.
5992 This is useful in cases where function contain single loop
5993 with known bound and other loop with unknown. We predict the
5994 known number of iterations correctly, while the unknown
5995 number of iterations average to roughly 10. This means that
5996 the loop without bounds would appear artificially cold
5997 relative to the other one.
5999 `tracer-dynamic-coverage'
6000 `tracer-dynamic-coverage-feedback'
6001 This value is used to limit superblock formation once the
6002 given percentage of executed instructions is covered. This
6003 limits unnecessary code size expansion.
6005 The `tracer-dynamic-coverage-feedback' is used only when
6006 profile feedback is available. The real profiles (as opposed
6007 to statically estimated ones) are much less balanced allowing
6008 the threshold to be larger value.
6010 `tracer-max-code-growth'
6011 Stop tail duplication once code growth has reached given
6012 percentage. This is rather hokey argument, as most of the
6013 duplicates will be eliminated later in cross jumping, so it
6014 may be set to much higher values than is the desired code
6017 `tracer-min-branch-ratio'
6018 Stop reverse growth when the reverse probability of best edge
6019 is less than this threshold (in percent).
6021 `tracer-min-branch-ratio'
6022 `tracer-min-branch-ratio-feedback'
6023 Stop forward growth if the best edge do have probability
6024 lower than this threshold.
6026 Similarly to `tracer-dynamic-coverage' two values are
6027 present, one for compilation for profile feedback and one for
6028 compilation without. The value for compilation with profile
6029 feedback needs to be more conservative (higher) in order to
6030 make tracer effective.
6032 `max-cse-path-length'
6033 Maximum number of basic blocks on path that cse considers.
6037 The maximum instructions CSE process before flushing. The
6040 `global-var-threshold'
6041 Counts the number of function calls (N) and the number of
6042 call-clobbered variables (V). If NxV is larger than this
6043 limit, a single artificial variable will be created to
6044 represent all the call-clobbered variables at function call
6045 sites. This artificial variable will then be made to alias
6046 every call-clobbered variable. (done as `int * size_t' on
6047 the host machine; beware overflow).
6050 Maximum number of virtual operands allowed to represent
6051 aliases before triggering the alias grouping heuristic.
6052 Alias grouping reduces compile times and memory consumption
6053 needed for aliasing at the expense of precision loss in alias
6057 GCC uses a garbage collector to manage its own memory
6058 allocation. This parameter specifies the minimum percentage
6059 by which the garbage collector's heap should be allowed to
6060 expand between collections. Tuning this may improve
6061 compilation speed; it has no effect on code generation.
6063 The default is 30% + 70% * (RAM/1GB) with an upper bound of
6064 100% when RAM >= 1GB. If `getrlimit' is available, the
6065 notion of "RAM" is the smallest of actual RAM and
6066 `RLIMIT_DATA' or `RLIMIT_AS'. If GCC is not able to
6067 calculate RAM on a particular platform, the lower bound of
6068 30% is used. Setting this parameter and `ggc-min-heapsize'
6069 to zero causes a full collection to occur at every
6070 opportunity. This is extremely slow, but can be useful for
6074 Minimum size of the garbage collector's heap before it begins
6075 bothering to collect garbage. The first collection occurs
6076 after the heap expands by `ggc-min-expand'% beyond
6077 `ggc-min-heapsize'. Again, tuning this may improve
6078 compilation speed, and has no effect on code generation.
6080 The default is the smaller of RAM/8, RLIMIT_RSS, or a limit
6081 which tries to ensure that RLIMIT_DATA or RLIMIT_AS are not
6082 exceeded, but with a lower bound of 4096 (four megabytes) and
6083 an upper bound of 131072 (128 megabytes). If GCC is not able
6084 to calculate RAM on a particular platform, the lower bound is
6085 used. Setting this parameter very large effectively disables
6086 garbage collection. Setting this parameter and
6087 `ggc-min-expand' to zero causes a full collection to occur at
6090 `max-reload-search-insns'
6091 The maximum number of instruction reload should look backward
6092 for equivalent register. Increasing values mean more
6093 aggressive optimization, making the compile time increase
6094 with probably slightly better performance. The default value
6097 `max-cselib-memory-locations'
6098 The maximum number of memory locations cselib should take
6099 into account. Increasing values mean more aggressive
6100 optimization, making the compile time increase with probably
6101 slightly better performance. The default value is 500.
6103 `max-flow-memory-locations'
6104 Similar as `max-cselib-memory-locations' but for dataflow
6105 liveness. The default value is 100.
6107 `reorder-blocks-duplicate'
6108 `reorder-blocks-duplicate-feedback'
6109 Used by basic block reordering pass to decide whether to use
6110 unconditional branch or duplicate the code on its
6111 destination. Code is duplicated when its estimated size is
6112 smaller than this value multiplied by the estimated size of
6113 unconditional jump in the hot spots of the program.
6115 The `reorder-block-duplicate-feedback' is used only when
6116 profile feedback is available and may be set to higher values
6117 than `reorder-block-duplicate' since information about the
6118 hot spots is more accurate.
6120 `max-sched-ready-insns'
6121 The maximum number of instructions ready to be issued the
6122 scheduler should consider at any given time during the first
6123 scheduling pass. Increasing values mean more thorough
6124 searches, making the compilation time increase with probably
6125 little benefit. The default value is 100.
6127 `max-sched-region-blocks'
6128 The maximum number of blocks in a region to be considered for
6129 interblock scheduling. The default value is 10.
6131 `max-sched-region-insns'
6132 The maximum number of insns in a region to be considered for
6133 interblock scheduling. The default value is 100.
6136 The minimum probability (in percents) of reaching a source
6137 block for interblock speculative scheduling. The default
6140 `max-sched-extend-regions-iters'
6141 The maximum number of iterations through CFG to extend
6142 regions. 0 - disable region extension, N - do at most N
6143 iterations. The default value is 0.
6145 `max-sched-insn-conflict-delay'
6146 The maximum conflict delay for an insn to be considered for
6147 speculative motion. The default value is 3.
6149 `sched-spec-prob-cutoff'
6150 The minimal probability of speculation success (in percents),
6151 so that speculative insn will be scheduled. The default
6154 `max-last-value-rtl'
6155 The maximum size measured as number of RTLs that can be
6156 recorded in an expression in combiner for a pseudo register
6157 as last known value of that register. The default is 10000.
6159 `integer-share-limit'
6160 Small integer constants can use a shared data structure,
6161 reducing the compiler's memory usage and increasing its
6162 speed. This sets the maximum value of a shared integer
6163 constant's. The default value is 256.
6165 `min-virtual-mappings'
6166 Specifies the minimum number of virtual mappings in the
6167 incremental SSA updater that should be registered to trigger
6168 the virtual mappings heuristic defined by
6169 virtual-mappings-ratio. The default value is 100.
6171 `virtual-mappings-ratio'
6172 If the number of virtual mappings is virtual-mappings-ratio
6173 bigger than the number of virtual symbols to be updated, then
6174 the incremental SSA updater switches to a full update for
6175 those symbols. The default ratio is 3.
6178 The minimum size of buffers (i.e. arrays) that will receive
6179 stack smashing protection when `-fstack-protection' is used.
6181 `max-jump-thread-duplication-stmts'
6182 Maximum number of statements allowed in a block that needs to
6183 be duplicated when threading jumps.
6185 `max-fields-for-field-sensitive'
6186 Maximum number of fields in a structure we will treat in a
6187 field sensitive manner during pointer analysis.
6191 File: gcc.info, Node: Preprocessor Options, Next: Assembler Options, Prev: Optimize Options, Up: Invoking GCC
6193 3.11 Options Controlling the Preprocessor
6194 =========================================
6196 These options control the C preprocessor, which is run on each C source
6197 file before actual compilation.
6199 If you use the `-E' option, nothing is done except preprocessing.
6200 Some of these options make sense only together with `-E' because they
6201 cause the preprocessor output to be unsuitable for actual compilation.
6203 You can use `-Wp,OPTION' to bypass the compiler driver and pass
6204 OPTION directly through to the preprocessor. If OPTION contains
6205 commas, it is split into multiple options at the commas. However,
6206 many options are modified, translated or interpreted by the
6207 compiler driver before being passed to the preprocessor, and `-Wp'
6208 forcibly bypasses this phase. The preprocessor's direct interface
6209 is undocumented and subject to change, so whenever possible you
6210 should avoid using `-Wp' and let the driver handle the options
6213 `-Xpreprocessor OPTION'
6214 Pass OPTION as an option to the preprocessor. You can use this to
6215 supply system-specific preprocessor options which GCC does not
6216 know how to recognize.
6218 If you want to pass an option that takes an argument, you must use
6219 `-Xpreprocessor' twice, once for the option and once for the
6223 Predefine NAME as a macro, with definition `1'.
6225 `-D NAME=DEFINITION'
6226 The contents of DEFINITION are tokenized and processed as if they
6227 appeared during translation phase three in a `#define' directive.
6228 In particular, the definition will be truncated by embedded
6231 If you are invoking the preprocessor from a shell or shell-like
6232 program you may need to use the shell's quoting syntax to protect
6233 characters such as spaces that have a meaning in the shell syntax.
6235 If you wish to define a function-like macro on the command line,
6236 write its argument list with surrounding parentheses before the
6237 equals sign (if any). Parentheses are meaningful to most shells,
6238 so you will need to quote the option. With `sh' and `csh',
6239 `-D'NAME(ARGS...)=DEFINITION'' works.
6241 `-D' and `-U' options are processed in the order they are given on
6242 the command line. All `-imacros FILE' and `-include FILE' options
6243 are processed after all `-D' and `-U' options.
6246 Cancel any previous definition of NAME, either built in or
6247 provided with a `-D' option.
6250 Do not predefine any system-specific or GCC-specific macros. The
6251 standard predefined macros remain defined.
6254 Add the directory DIR to the list of directories to be searched
6255 for header files. Directories named by `-I' are searched before
6256 the standard system include directories. If the directory DIR is
6257 a standard system include directory, the option is ignored to
6258 ensure that the default search order for system directories and
6259 the special treatment of system headers are not defeated .
6262 Write output to FILE. This is the same as specifying FILE as the
6263 second non-option argument to `cpp'. `gcc' has a different
6264 interpretation of a second non-option argument, so you must use
6265 `-o' to specify the output file.
6268 Turns on all optional warnings which are desirable for normal code.
6269 At present this is `-Wcomment', `-Wtrigraphs', `-Wmultichar' and a
6270 warning about integer promotion causing a change of sign in `#if'
6271 expressions. Note that many of the preprocessor's warnings are on
6272 by default and have no options to control them.
6276 Warn whenever a comment-start sequence `/*' appears in a `/*'
6277 comment, or whenever a backslash-newline appears in a `//' comment.
6278 (Both forms have the same effect.)
6281 Most trigraphs in comments cannot affect the meaning of the
6282 program. However, a trigraph that would form an escaped newline
6283 (`??/' at the end of a line) can, by changing where the comment
6284 begins or ends. Therefore, only trigraphs that would form escaped
6285 newlines produce warnings inside a comment.
6287 This option is implied by `-Wall'. If `-Wall' is not given, this
6288 option is still enabled unless trigraphs are enabled. To get
6289 trigraph conversion without warnings, but get the other `-Wall'
6290 warnings, use `-trigraphs -Wall -Wno-trigraphs'.
6293 Warn about certain constructs that behave differently in
6294 traditional and ISO C. Also warn about ISO C constructs that have
6295 no traditional C equivalent, and problematic constructs which
6299 Warn the first time `#import' is used.
6302 Warn whenever an identifier which is not a macro is encountered in
6303 an `#if' directive, outside of `defined'. Such identifiers are
6307 Warn about macros defined in the main file that are unused. A
6308 macro is "used" if it is expanded or tested for existence at least
6309 once. The preprocessor will also warn if the macro has not been
6310 used at the time it is redefined or undefined.
6312 Built-in macros, macros defined on the command line, and macros
6313 defined in include files are not warned about.
6315 _Note:_ If a macro is actually used, but only used in skipped
6316 conditional blocks, then CPP will report it as unused. To avoid
6317 the warning in such a case, you might improve the scope of the
6318 macro's definition by, for example, moving it into the first
6319 skipped block. Alternatively, you could provide a dummy use with
6322 #if defined the_macro_causing_the_warning
6326 Warn whenever an `#else' or an `#endif' are followed by text.
6327 This usually happens in code of the form
6335 The second and third `FOO' should be in comments, but often are not
6336 in older programs. This warning is on by default.
6339 Make all warnings into hard errors. Source code which triggers
6340 warnings will be rejected.
6343 Issue warnings for code in system headers. These are normally
6344 unhelpful in finding bugs in your own code, therefore suppressed.
6345 If you are responsible for the system library, you may want to see
6349 Suppress all warnings, including those which GNU CPP issues by
6353 Issue all the mandatory diagnostics listed in the C standard.
6354 Some of them are left out by default, since they trigger
6355 frequently on harmless code.
6358 Issue all the mandatory diagnostics, and make all mandatory
6359 diagnostics into errors. This includes mandatory diagnostics that
6360 GCC issues without `-pedantic' but treats as warnings.
6363 Instead of outputting the result of preprocessing, output a rule
6364 suitable for `make' describing the dependencies of the main source
6365 file. The preprocessor outputs one `make' rule containing the
6366 object file name for that source file, a colon, and the names of
6367 all the included files, including those coming from `-include' or
6368 `-imacros' command line options.
6370 Unless specified explicitly (with `-MT' or `-MQ'), the object file
6371 name consists of the basename of the source file with any suffix
6372 replaced with object file suffix. If there are many included
6373 files then the rule is split into several lines using `\'-newline.
6374 The rule has no commands.
6376 This option does not suppress the preprocessor's debug output,
6377 such as `-dM'. To avoid mixing such debug output with the
6378 dependency rules you should explicitly specify the dependency
6379 output file with `-MF', or use an environment variable like
6380 `DEPENDENCIES_OUTPUT' (*note Environment Variables::). Debug
6381 output will still be sent to the regular output stream as normal.
6383 Passing `-M' to the driver implies `-E', and suppresses warnings
6384 with an implicit `-w'.
6387 Like `-M' but do not mention header files that are found in system
6388 header directories, nor header files that are included, directly
6389 or indirectly, from such a header.
6391 This implies that the choice of angle brackets or double quotes in
6392 an `#include' directive does not in itself determine whether that
6393 header will appear in `-MM' dependency output. This is a slight
6394 change in semantics from GCC versions 3.0 and earlier.
6397 When used with `-M' or `-MM', specifies a file to write the
6398 dependencies to. If no `-MF' switch is given the preprocessor
6399 sends the rules to the same place it would have sent preprocessed
6402 When used with the driver options `-MD' or `-MMD', `-MF' overrides
6403 the default dependency output file.
6406 In conjunction with an option such as `-M' requesting dependency
6407 generation, `-MG' assumes missing header files are generated files
6408 and adds them to the dependency list without raising an error.
6409 The dependency filename is taken directly from the `#include'
6410 directive without prepending any path. `-MG' also suppresses
6411 preprocessed output, as a missing header file renders this useless.
6413 This feature is used in automatic updating of makefiles.
6416 This option instructs CPP to add a phony target for each dependency
6417 other than the main file, causing each to depend on nothing. These
6418 dummy rules work around errors `make' gives if you remove header
6419 files without updating the `Makefile' to match.
6421 This is typical output:
6423 test.o: test.c test.h
6428 Change the target of the rule emitted by dependency generation. By
6429 default CPP takes the name of the main input file, including any
6430 path, deletes any file suffix such as `.c', and appends the
6431 platform's usual object suffix. The result is the target.
6433 An `-MT' option will set the target to be exactly the string you
6434 specify. If you want multiple targets, you can specify them as a
6435 single argument to `-MT', or use multiple `-MT' options.
6437 For example, `-MT '$(objpfx)foo.o'' might give
6439 $(objpfx)foo.o: foo.c
6442 Same as `-MT', but it quotes any characters which are special to
6443 Make. `-MQ '$(objpfx)foo.o'' gives
6445 $$(objpfx)foo.o: foo.c
6447 The default target is automatically quoted, as if it were given
6451 `-MD' is equivalent to `-M -MF FILE', except that `-E' is not
6452 implied. The driver determines FILE based on whether an `-o'
6453 option is given. If it is, the driver uses its argument but with
6454 a suffix of `.d', otherwise it take the basename of the input file
6455 and applies a `.d' suffix.
6457 If `-MD' is used in conjunction with `-E', any `-o' switch is
6458 understood to specify the dependency output file (*note -MF:
6459 dashMF.), but if used without `-E', each `-o' is understood to
6460 specify a target object file.
6462 Since `-E' is not implied, `-MD' can be used to generate a
6463 dependency output file as a side-effect of the compilation process.
6466 Like `-MD' except mention only user header files, not system
6470 When using precompiled headers (*note Precompiled Headers::), this
6471 flag will cause the dependency-output flags to also list the files
6472 from the precompiled header's dependencies. If not specified only
6473 the precompiled header would be listed and not the files that were
6474 used to create it because those files are not consulted when a
6475 precompiled header is used.
6478 This option allows use of a precompiled header (*note Precompiled
6479 Headers::) together with `-E'. It inserts a special `#pragma',
6480 `#pragma GCC pch_preprocess "<filename>"' in the output to mark
6481 the place where the precompiled header was found, and its
6482 filename. When `-fpreprocessed' is in use, GCC recognizes this
6483 `#pragma' and loads the PCH.
6485 This option is off by default, because the resulting preprocessed
6486 output is only really suitable as input to GCC. It is switched on
6489 You should not write this `#pragma' in your own code, but it is
6490 safe to edit the filename if the PCH file is available in a
6491 different location. The filename may be absolute or it may be
6492 relative to GCC's current directory.
6497 `-x assembler-with-cpp'
6498 Specify the source language: C, C++, Objective-C, or assembly.
6499 This has nothing to do with standards conformance or extensions;
6500 it merely selects which base syntax to expect. If you give none
6501 of these options, cpp will deduce the language from the extension
6502 of the source file: `.c', `.cc', `.m', or `.S'. Some other common
6503 extensions for C++ and assembly are also recognized. If cpp does
6504 not recognize the extension, it will treat the file as C; this is
6505 the most generic mode.
6507 _Note:_ Previous versions of cpp accepted a `-lang' option which
6508 selected both the language and the standards conformance level.
6509 This option has been removed, because it conflicts with the `-l'
6514 Specify the standard to which the code should conform. Currently
6515 CPP knows about C and C++ standards; others may be added in the
6518 STANDARD may be one of:
6521 The ISO C standard from 1990. `c89' is the customary
6522 shorthand for this version of the standard.
6524 The `-ansi' option is equivalent to `-std=c89'.
6527 The 1990 C standard, as amended in 1994.
6533 The revised ISO C standard, published in December 1999.
6534 Before publication, this was known as C9X.
6537 The 1990 C standard plus GNU extensions. This is the default.
6541 The 1999 C standard plus GNU extensions.
6544 The 1998 ISO C++ standard plus amendments.
6547 The same as `-std=c++98' plus GNU extensions. This is the
6548 default for C++ code.
6551 Split the include path. Any directories specified with `-I'
6552 options before `-I-' are searched only for headers requested with
6553 `#include "FILE"'; they are not searched for `#include <FILE>'.
6554 If additional directories are specified with `-I' options after
6555 the `-I-', those directories are searched for all `#include'
6558 In addition, `-I-' inhibits the use of the directory of the current
6559 file directory as the first search directory for `#include "FILE"'.
6560 This option has been deprecated.
6563 Do not search the standard system directories for header files.
6564 Only the directories you have specified with `-I' options (and the
6565 directory of the current file, if appropriate) are searched.
6568 Do not search for header files in the C++-specific standard
6569 directories, but do still search the other standard directories.
6570 (This option is used when building the C++ library.)
6573 Process FILE as if `#include "file"' appeared as the first line of
6574 the primary source file. However, the first directory searched
6575 for FILE is the preprocessor's working directory _instead of_ the
6576 directory containing the main source file. If not found there, it
6577 is searched for in the remainder of the `#include "..."' search
6580 If multiple `-include' options are given, the files are included
6581 in the order they appear on the command line.
6584 Exactly like `-include', except that any output produced by
6585 scanning FILE is thrown away. Macros it defines remain defined.
6586 This allows you to acquire all the macros from a header without
6587 also processing its declarations.
6589 All files specified by `-imacros' are processed before all files
6590 specified by `-include'.
6593 Search DIR for header files, but do it _after_ all directories
6594 specified with `-I' and the standard system directories have been
6595 exhausted. DIR is treated as a system include directory.
6598 Specify PREFIX as the prefix for subsequent `-iwithprefix'
6599 options. If the prefix represents a directory, you should include
6603 `-iwithprefixbefore DIR'
6604 Append DIR to the prefix specified previously with `-iprefix', and
6605 add the resulting directory to the include search path.
6606 `-iwithprefixbefore' puts it in the same place `-I' would;
6607 `-iwithprefix' puts it where `-idirafter' would.
6610 This option is like the `--sysroot' option, but applies only to
6611 header files. See the `--sysroot' option for more information.
6614 Use DIR as a subdirectory of the directory containing
6615 target-specific C++ headers.
6618 Search DIR for header files, after all directories specified by
6619 `-I' but before the standard system directories. Mark it as a
6620 system directory, so that it gets the same special treatment as is
6621 applied to the standard system directories.
6624 Search DIR only for header files requested with `#include "FILE"';
6625 they are not searched for `#include <FILE>', before all
6626 directories specified by `-I' and before the standard system
6630 This option provides a simplified preprocessor to improve the
6631 performance of distributed build systems such as distcc. It's
6632 behavior depends on a number of other flags.
6634 If the `-E' option is enabled, it suppresses things like macro
6635 expansion, trigraph conversion, and escaped newline splicing
6636 outside of directives. All directives are processed normally,
6637 except that macro definitions are output similar to the `-dD'
6640 If the `-fpreprocessed' option is enabled, it suppresses
6641 predefinition of most builtin and command line macros. This
6642 prevents duplicate definition of macros output with the `-E'
6645 `-fdollars-in-identifiers'
6646 Accept `$' in identifiers.
6648 `-fextended-identifiers'
6649 Accept universal character names in identifiers. This option is
6650 experimental; in a future version of GCC, it will be enabled by
6651 default for C99 and C++.
6654 Indicate to the preprocessor that the input file has already been
6655 preprocessed. This suppresses things like macro expansion,
6656 trigraph conversion, escaped newline splicing, and processing of
6657 most directives. The preprocessor still recognizes and removes
6658 comments, so that you can pass a file preprocessed with `-C' to
6659 the compiler without problems. In this mode the integrated
6660 preprocessor is little more than a tokenizer for the front ends.
6662 `-fpreprocessed' is implicit if the input file has one of the
6663 extensions `.i', `.ii' or `.mi'. These are the extensions that
6664 GCC uses for preprocessed files created by `-save-temps'.
6667 Set the distance between tab stops. This helps the preprocessor
6668 report correct column numbers in warnings or errors, even if tabs
6669 appear on the line. If the value is less than 1 or greater than
6670 100, the option is ignored. The default is 8.
6672 `-fexec-charset=CHARSET'
6673 Set the execution character set, used for string and character
6674 constants. The default is UTF-8. CHARSET can be any encoding
6675 supported by the system's `iconv' library routine.
6677 `-fwide-exec-charset=CHARSET'
6678 Set the wide execution character set, used for wide string and
6679 character constants. The default is UTF-32 or UTF-16, whichever
6680 corresponds to the width of `wchar_t'. As with `-fexec-charset',
6681 CHARSET can be any encoding supported by the system's `iconv'
6682 library routine; however, you will have problems with encodings
6683 that do not fit exactly in `wchar_t'.
6685 `-finput-charset=CHARSET'
6686 Set the input character set, used for translation from the
6687 character set of the input file to the source character set used
6688 by GCC. If the locale does not specify, or GCC cannot get this
6689 information from the locale, the default is UTF-8. This can be
6690 overridden by either the locale or this command line option.
6691 Currently the command line option takes precedence if there's a
6692 conflict. CHARSET can be any encoding supported by the system's
6693 `iconv' library routine.
6695 `-fworking-directory'
6696 Enable generation of linemarkers in the preprocessor output that
6697 will let the compiler know the current working directory at the
6698 time of preprocessing. When this option is enabled, the
6699 preprocessor will emit, after the initial linemarker, a second
6700 linemarker with the current working directory followed by two
6701 slashes. GCC will use this directory, when it's present in the
6702 preprocessed input, as the directory emitted as the current
6703 working directory in some debugging information formats. This
6704 option is implicitly enabled if debugging information is enabled,
6705 but this can be inhibited with the negated form
6706 `-fno-working-directory'. If the `-P' flag is present in the
6707 command line, this option has no effect, since no `#line'
6708 directives are emitted whatsoever.
6711 Do not print column numbers in diagnostics. This may be necessary
6712 if diagnostics are being scanned by a program that does not
6713 understand the column numbers, such as `dejagnu'.
6715 `-A PREDICATE=ANSWER'
6716 Make an assertion with the predicate PREDICATE and answer ANSWER.
6717 This form is preferred to the older form `-A PREDICATE(ANSWER)',
6718 which is still supported, because it does not use shell special
6721 `-A -PREDICATE=ANSWER'
6722 Cancel an assertion with the predicate PREDICATE and answer ANSWER.
6725 CHARS is a sequence of one or more of the following characters,
6726 and must not be preceded by a space. Other characters are
6727 interpreted by the compiler proper, or reserved for future
6728 versions of GCC, and so are silently ignored. If you specify
6729 characters whose behavior conflicts, the result is undefined.
6732 Instead of the normal output, generate a list of `#define'
6733 directives for all the macros defined during the execution of
6734 the preprocessor, including predefined macros. This gives
6735 you a way of finding out what is predefined in your version
6736 of the preprocessor. Assuming you have no file `foo.h', the
6739 touch foo.h; cpp -dM foo.h
6741 will show all the predefined macros.
6744 Like `M' except in two respects: it does _not_ include the
6745 predefined macros, and it outputs _both_ the `#define'
6746 directives and the result of preprocessing. Both kinds of
6747 output go to the standard output file.
6750 Like `D', but emit only the macro names, not their expansions.
6753 Output `#include' directives in addition to the result of
6757 Inhibit generation of linemarkers in the output from the
6758 preprocessor. This might be useful when running the preprocessor
6759 on something that is not C code, and will be sent to a program
6760 which might be confused by the linemarkers.
6763 Do not discard comments. All comments are passed through to the
6764 output file, except for comments in processed directives, which
6765 are deleted along with the directive.
6767 You should be prepared for side effects when using `-C'; it causes
6768 the preprocessor to treat comments as tokens in their own right.
6769 For example, comments appearing at the start of what would be a
6770 directive line have the effect of turning that line into an
6771 ordinary source line, since the first token on the line is no
6775 Do not discard comments, including during macro expansion. This is
6776 like `-C', except that comments contained within macros are also
6777 passed through to the output file where the macro is expanded.
6779 In addition to the side-effects of the `-C' option, the `-CC'
6780 option causes all C++-style comments inside a macro to be
6781 converted to C-style comments. This is to prevent later use of
6782 that macro from inadvertently commenting out the remainder of the
6785 The `-CC' option is generally used to support lint comments.
6788 Try to imitate the behavior of old-fashioned C preprocessors, as
6789 opposed to ISO C preprocessors.
6792 Process trigraph sequences. These are three-character sequences,
6793 all starting with `??', that are defined by ISO C to stand for
6794 single characters. For example, `??/' stands for `\', so `'??/n''
6795 is a character constant for a newline. By default, GCC ignores
6796 trigraphs, but in standard-conforming modes it converts them. See
6797 the `-std' and `-ansi' options.
6799 The nine trigraphs and their replacements are
6801 Trigraph: ??( ??) ??< ??> ??= ??/ ??' ??! ??-
6802 Replacement: [ ] { } # \ ^ | ~
6805 Enable special code to work around file systems which only permit
6806 very short file names, such as MS-DOS.
6810 Print text describing all the command line options instead of
6811 preprocessing anything.
6814 Verbose mode. Print out GNU CPP's version number at the beginning
6815 of execution, and report the final form of the include path.
6818 Print the name of each header file used, in addition to other
6819 normal activities. Each name is indented to show how deep in the
6820 `#include' stack it is. Precompiled header files are also
6821 printed, even if they are found to be invalid; an invalid
6822 precompiled header file is printed with `...x' and a valid one
6827 Print out GNU CPP's version number. With one dash, proceed to
6828 preprocess as normal. With two dashes, exit immediately.
6831 File: gcc.info, Node: Assembler Options, Next: Link Options, Prev: Preprocessor Options, Up: Invoking GCC
6833 3.12 Passing Options to the Assembler
6834 =====================================
6836 You can pass options to the assembler.
6839 Pass OPTION as an option to the assembler. If OPTION contains
6840 commas, it is split into multiple options at the commas.
6842 `-Xassembler OPTION'
6843 Pass OPTION as an option to the assembler. You can use this to
6844 supply system-specific assembler options which GCC does not know
6847 If you want to pass an option that takes an argument, you must use
6848 `-Xassembler' twice, once for the option and once for the argument.
6852 File: gcc.info, Node: Link Options, Next: Directory Options, Prev: Assembler Options, Up: Invoking GCC
6854 3.13 Options for Linking
6855 ========================
6857 These options come into play when the compiler links object files into
6858 an executable output file. They are meaningless if the compiler is not
6862 A file name that does not end in a special recognized suffix is
6863 considered to name an object file or library. (Object files are
6864 distinguished from libraries by the linker according to the file
6865 contents.) If linking is done, these object files are used as
6866 input to the linker.
6871 If any of these options is used, then the linker is not run, and
6872 object file names should not be used as arguments. *Note Overall
6877 Search the library named LIBRARY when linking. (The second
6878 alternative with the library as a separate argument is only for
6879 POSIX compliance and is not recommended.)
6881 It makes a difference where in the command you write this option;
6882 the linker searches and processes libraries and object files in
6883 the order they are specified. Thus, `foo.o -lz bar.o' searches
6884 library `z' after file `foo.o' but before `bar.o'. If `bar.o'
6885 refers to functions in `z', those functions may not be loaded.
6887 The linker searches a standard list of directories for the library,
6888 which is actually a file named `libLIBRARY.a'. The linker then
6889 uses this file as if it had been specified precisely by name.
6891 The directories searched include several standard system
6892 directories plus any that you specify with `-L'.
6894 Normally the files found this way are library files--archive files
6895 whose members are object files. The linker handles an archive
6896 file by scanning through it for members which define symbols that
6897 have so far been referenced but not defined. But if the file that
6898 is found is an ordinary object file, it is linked in the usual
6899 fashion. The only difference between using an `-l' option and
6900 specifying a file name is that `-l' surrounds LIBRARY with `lib'
6901 and `.a' and searches several directories.
6904 You need this special case of the `-l' option in order to link an
6905 Objective-C or Objective-C++ program.
6908 Do not use the standard system startup files when linking. The
6909 standard system libraries are used normally, unless `-nostdlib' or
6910 `-nodefaultlibs' is used.
6913 Do not use the standard system libraries when linking. Only the
6914 libraries you specify will be passed to the linker. The standard
6915 startup files are used normally, unless `-nostartfiles' is used.
6916 The compiler may generate calls to `memcmp', `memset', `memcpy'
6917 and `memmove'. These entries are usually resolved by entries in
6918 libc. These entry points should be supplied through some other
6919 mechanism when this option is specified.
6922 Do not use the standard system startup files or libraries when
6923 linking. No startup files and only the libraries you specify will
6924 be passed to the linker. The compiler may generate calls to
6925 `memcmp', `memset', `memcpy' and `memmove'. These entries are
6926 usually resolved by entries in libc. These entry points should be
6927 supplied through some other mechanism when this option is
6930 One of the standard libraries bypassed by `-nostdlib' and
6931 `-nodefaultlibs' is `libgcc.a', a library of internal subroutines
6932 that GCC uses to overcome shortcomings of particular machines, or
6933 special needs for some languages. (*Note Interfacing to GCC
6934 Output: (gccint)Interface, for more discussion of `libgcc.a'.) In
6935 most cases, you need `libgcc.a' even when you want to avoid other
6936 standard libraries. In other words, when you specify `-nostdlib'
6937 or `-nodefaultlibs' you should usually specify `-lgcc' as well.
6938 This ensures that you have no unresolved references to internal GCC
6939 library subroutines. (For example, `__main', used to ensure C++
6940 constructors will be called; *note `collect2': (gccint)Collect2.)
6943 Produce a position independent executable on targets which support
6944 it. For predictable results, you must also specify the same set
6945 of options that were used to generate code (`-fpie', `-fPIE', or
6946 model suboptions) when you specify this option.
6949 Pass the flag `-export-dynamic' to the ELF linker, on targets that
6950 support it. This instructs the linker to add all symbols, not only
6951 used ones, to the dynamic symbol table. This option is needed for
6952 some uses of `dlopen' or to allow obtaining backtraces from within
6956 Remove all symbol table and relocation information from the
6960 On systems that support dynamic linking, this prevents linking
6961 with the shared libraries. On other systems, this option has no
6965 Produce a shared object which can then be linked with other
6966 objects to form an executable. Not all systems support this
6967 option. For predictable results, you must also specify the same
6968 set of options that were used to generate code (`-fpic', `-fPIC',
6969 or model suboptions) when you specify this option.(1)
6973 On systems that provide `libgcc' as a shared library, these options
6974 force the use of either the shared or static version respectively.
6975 If no shared version of `libgcc' was built when the compiler was
6976 configured, these options have no effect.
6978 There are several situations in which an application should use the
6979 shared `libgcc' instead of the static version. The most common of
6980 these is when the application wishes to throw and catch exceptions
6981 across different shared libraries. In that case, each of the
6982 libraries as well as the application itself should use the shared
6985 Therefore, the G++ and GCJ drivers automatically add
6986 `-shared-libgcc' whenever you build a shared library or a main
6987 executable, because C++ and Java programs typically use
6988 exceptions, so this is the right thing to do.
6990 If, instead, you use the GCC driver to create shared libraries,
6991 you may find that they will not always be linked with the shared
6992 `libgcc'. If GCC finds, at its configuration time, that you have
6993 a non-GNU linker or a GNU linker that does not support option
6994 `--eh-frame-hdr', it will link the shared version of `libgcc' into
6995 shared libraries by default. Otherwise, it will take advantage of
6996 the linker and optimize away the linking with the shared version
6997 of `libgcc', linking with the static version of libgcc by default.
6998 This allows exceptions to propagate through such shared
6999 libraries, without incurring relocation costs at library load time.
7001 However, if a library or main executable is supposed to throw or
7002 catch exceptions, you must link it using the G++ or GCJ driver, as
7003 appropriate for the languages used in the program, or using the
7004 option `-shared-libgcc', such that it is linked with the shared
7008 Bind references to global symbols when building a shared object.
7009 Warn about any unresolved references (unless overridden by the
7010 link editor option `-Xlinker -z -Xlinker defs'). Only a few
7011 systems support this option.
7014 Pass OPTION as an option to the linker. You can use this to
7015 supply system-specific linker options which GCC does not know how
7018 If you want to pass an option that takes an argument, you must use
7019 `-Xlinker' twice, once for the option and once for the argument.
7020 For example, to pass `-assert definitions', you must write
7021 `-Xlinker -assert -Xlinker definitions'. It does not work to write
7022 `-Xlinker "-assert definitions"', because this passes the entire
7023 string as a single argument, which is not what the linker expects.
7026 Pass OPTION as an option to the linker. If OPTION contains
7027 commas, it is split into multiple options at the commas.
7030 Pretend the symbol SYMBOL is undefined, to force linking of
7031 library modules to define it. You can use `-u' multiple times with
7032 different symbols to force loading of additional library modules.
7034 ---------- Footnotes ----------
7036 (1) On some systems, `gcc -shared' needs to build supplementary stub
7037 code for constructors to work. On multi-libbed systems, `gcc -shared'
7038 must select the correct support libraries to link against. Failing to
7039 supply the correct flags may lead to subtle defects. Supplying them in
7040 cases where they are not necessary is innocuous.
7043 File: gcc.info, Node: Directory Options, Next: Spec Files, Prev: Link Options, Up: Invoking GCC
7045 3.14 Options for Directory Search
7046 =================================
7048 These options specify directories to search for header files, for
7049 libraries and for parts of the compiler:
7052 Add the directory DIR to the head of the list of directories to be
7053 searched for header files. This can be used to override a system
7054 header file, substituting your own version, since these
7055 directories are searched before the system header file
7056 directories. However, you should not use this option to add
7057 directories that contain vendor-supplied system header files (use
7058 `-isystem' for that). If you use more than one `-I' option, the
7059 directories are scanned in left-to-right order; the standard
7060 system directories come after.
7062 If a standard system include directory, or a directory specified
7063 with `-isystem', is also specified with `-I', the `-I' option will
7064 be ignored. The directory will still be searched but as a system
7065 directory at its normal position in the system include chain.
7066 This is to ensure that GCC's procedure to fix buggy system headers
7067 and the ordering for the include_next directive are not
7068 inadvertently changed. If you really need to change the search
7069 order for system directories, use the `-nostdinc' and/or
7073 Add the directory DIR to the head of the list of directories to be
7074 searched for header files only for the case of `#include "FILE"';
7075 they are not searched for `#include <FILE>', otherwise just like
7079 Add directory DIR to the list of directories to be searched for
7083 This option specifies where to find the executables, libraries,
7084 include files, and data files of the compiler itself.
7086 The compiler driver program runs one or more of the subprograms
7087 `cpp', `cc1', `as' and `ld'. It tries PREFIX as a prefix for each
7088 program it tries to run, both with and without `MACHINE/VERSION/'
7089 (*note Target Options::).
7091 For each subprogram to be run, the compiler driver first tries the
7092 `-B' prefix, if any. If that name is not found, or if `-B' was
7093 not specified, the driver tries two standard prefixes, which are
7094 `/usr/lib/gcc/' and `/usr/local/lib/gcc/'. If neither of those
7095 results in a file name that is found, the unmodified program name
7096 is searched for using the directories specified in your `PATH'
7097 environment variable.
7099 The compiler will check to see if the path provided by the `-B'
7100 refers to a directory, and if necessary it will add a directory
7101 separator character at the end of the path.
7103 `-B' prefixes that effectively specify directory names also apply
7104 to libraries in the linker, because the compiler translates these
7105 options into `-L' options for the linker. They also apply to
7106 includes files in the preprocessor, because the compiler
7107 translates these options into `-isystem' options for the
7108 preprocessor. In this case, the compiler appends `include' to the
7111 The run-time support file `libgcc.a' can also be searched for using
7112 the `-B' prefix, if needed. If it is not found there, the two
7113 standard prefixes above are tried, and that is all. The file is
7114 left out of the link if it is not found by those means.
7116 Another way to specify a prefix much like the `-B' prefix is to use
7117 the environment variable `GCC_EXEC_PREFIX'. *Note Environment
7120 As a special kludge, if the path provided by `-B' is
7121 `[dir/]stageN/', where N is a number in the range 0 to 9, then it
7122 will be replaced by `[dir/]include'. This is to help with
7123 boot-strapping the compiler.
7126 Process FILE after the compiler reads in the standard `specs'
7127 file, in order to override the defaults that the `gcc' driver
7128 program uses when determining what switches to pass to `cc1',
7129 `cc1plus', `as', `ld', etc. More than one `-specs=FILE' can be
7130 specified on the command line, and they are processed in order,
7134 Use DIR as the logical root directory for headers and libraries.
7135 For example, if the compiler would normally search for headers in
7136 `/usr/include' and libraries in `/usr/lib', it will instead search
7137 `DIR/usr/include' and `DIR/usr/lib'.
7139 If you use both this option and the `-isysroot' option, then the
7140 `--sysroot' option will apply to libraries, but the `-isysroot'
7141 option will apply to header files.
7143 The GNU linker (beginning with version 2.16) has the necessary
7144 support for this option. If your linker does not support this
7145 option, the header file aspect of `--sysroot' will still work, but
7146 the library aspect will not.
7149 This option has been deprecated. Please use `-iquote' instead for
7150 `-I' directories before the `-I-' and remove the `-I-'. Any
7151 directories you specify with `-I' options before the `-I-' option
7152 are searched only for the case of `#include "FILE"'; they are not
7153 searched for `#include <FILE>'.
7155 If additional directories are specified with `-I' options after
7156 the `-I-', these directories are searched for all `#include'
7157 directives. (Ordinarily _all_ `-I' directories are used this way.)
7159 In addition, the `-I-' option inhibits the use of the current
7160 directory (where the current input file came from) as the first
7161 search directory for `#include "FILE"'. There is no way to
7162 override this effect of `-I-'. With `-I.' you can specify
7163 searching the directory which was current when the compiler was
7164 invoked. That is not exactly the same as what the preprocessor
7165 does by default, but it is often satisfactory.
7167 `-I-' does not inhibit the use of the standard system directories
7168 for header files. Thus, `-I-' and `-nostdinc' are independent.
7171 File: gcc.info, Node: Spec Files, Next: Target Options, Prev: Directory Options, Up: Invoking GCC
7173 3.15 Specifying subprocesses and the switches to pass to them
7174 =============================================================
7176 `gcc' is a driver program. It performs its job by invoking a sequence
7177 of other programs to do the work of compiling, assembling and linking.
7178 GCC interprets its command-line parameters and uses these to deduce
7179 which programs it should invoke, and which command-line options it
7180 ought to place on their command lines. This behavior is controlled by
7181 "spec strings". In most cases there is one spec string for each
7182 program that GCC can invoke, but a few programs have multiple spec
7183 strings to control their behavior. The spec strings built into GCC can
7184 be overridden by using the `-specs=' command-line switch to specify a
7187 "Spec files" are plaintext files that are used to construct spec
7188 strings. They consist of a sequence of directives separated by blank
7189 lines. The type of directive is determined by the first non-whitespace
7190 character on the line and it can be one of the following:
7193 Issues a COMMAND to the spec file processor. The commands that can
7197 Search for FILE and insert its text at the current point in
7200 `%include_noerr <FILE>'
7201 Just like `%include', but do not generate an error message if
7202 the include file cannot be found.
7204 `%rename OLD_NAME NEW_NAME'
7205 Rename the spec string OLD_NAME to NEW_NAME.
7209 This tells the compiler to create, override or delete the named
7210 spec string. All lines after this directive up to the next
7211 directive or blank line are considered to be the text for the spec
7212 string. If this results in an empty string then the spec will be
7213 deleted. (Or, if the spec did not exist, then nothing will
7214 happened.) Otherwise, if the spec does not currently exist a new
7215 spec will be created. If the spec does exist then its contents
7216 will be overridden by the text of this directive, unless the first
7217 character of that text is the `+' character, in which case the
7218 text will be appended to the spec.
7221 Creates a new `[SUFFIX] spec' pair. All lines after this directive
7222 and up to the next directive or blank line are considered to make
7223 up the spec string for the indicated suffix. When the compiler
7224 encounters an input file with the named suffix, it will processes
7225 the spec string in order to work out how to compile that file.
7231 This says that any input file whose name ends in `.ZZ' should be
7232 passed to the program `z-compile', which should be invoked with the
7233 command-line switch `-input' and with the result of performing the
7234 `%i' substitution. (See below.)
7236 As an alternative to providing a spec string, the text that
7237 follows a suffix directive can be one of the following:
7240 This says that the suffix is an alias for a known LANGUAGE.
7241 This is similar to using the `-x' command-line switch to GCC
7242 to specify a language explicitly. For example:
7247 Says that .ZZ files are, in fact, C++ source files.
7250 This causes an error messages saying:
7252 NAME compiler not installed on this system.
7254 GCC already has an extensive list of suffixes built into it. This
7255 directive will add an entry to the end of the list of suffixes, but
7256 since the list is searched from the end backwards, it is
7257 effectively possible to override earlier entries using this
7261 GCC has the following spec strings built into it. Spec files can
7262 override these strings or create their own. Note that individual
7263 targets can also add their own spec strings to this list.
7265 asm Options to pass to the assembler
7266 asm_final Options to pass to the assembler post-processor
7267 cpp Options to pass to the C preprocessor
7268 cc1 Options to pass to the C compiler
7269 cc1plus Options to pass to the C++ compiler
7270 endfile Object files to include at the end of the link
7271 link Options to pass to the linker
7272 lib Libraries to include on the command line to the linker
7273 libgcc Decides which GCC support library to pass to the linker
7274 linker Sets the name of the linker
7275 predefines Defines to be passed to the C preprocessor
7276 signed_char Defines to pass to CPP to say whether `char' is signed
7278 startfile Object files to include at the start of the link
7280 Here is a small example of a spec file:
7285 --start-group -lgcc -lc -leval1 --end-group %(old_lib)
7287 This example renames the spec called `lib' to `old_lib' and then
7288 overrides the previous definition of `lib' with a new one. The new
7289 definition adds in some extra command-line options before including the
7290 text of the old definition.
7292 "Spec strings" are a list of command-line options to be passed to their
7293 corresponding program. In addition, the spec strings can contain
7294 `%'-prefixed sequences to substitute variable text or to conditionally
7295 insert text into the command line. Using these constructs it is
7296 possible to generate quite complex command lines.
7298 Here is a table of all defined `%'-sequences for spec strings. Note
7299 that spaces are not generated automatically around the results of
7300 expanding these sequences. Therefore you can concatenate them together
7301 or combine them with constant text in a single argument.
7304 Substitute one `%' into the program name or argument.
7307 Substitute the name of the input file being processed.
7310 Substitute the basename of the input file being processed. This
7311 is the substring up to (and not including) the last period and not
7312 including the directory.
7315 This is the same as `%b', but include the file suffix (text after
7319 Marks the argument containing or following the `%d' as a temporary
7320 file name, so that that file will be deleted if GCC exits
7321 successfully. Unlike `%g', this contributes no text to the
7325 Substitute a file name that has suffix SUFFIX and is chosen once
7326 per compilation, and mark the argument in the same way as `%d'.
7327 To reduce exposure to denial-of-service attacks, the file name is
7328 now chosen in a way that is hard to predict even when previously
7329 chosen file names are known. For example, `%g.s ... %g.o ... %g.s'
7330 might turn into `ccUVUUAU.s ccXYAXZ12.o ccUVUUAU.s'. SUFFIX
7331 matches the regexp `[.A-Za-z]*' or the special string `%O', which
7332 is treated exactly as if `%O' had been preprocessed. Previously,
7333 `%g' was simply substituted with a file name chosen once per
7334 compilation, without regard to any appended suffix (which was
7335 therefore treated just like ordinary text), making such attacks
7336 more likely to succeed.
7339 Like `%g', but generates a new temporary file name even if
7340 `%uSUFFIX' was already seen.
7343 Substitutes the last file name generated with `%uSUFFIX',
7344 generating a new one if there is no such last file name. In the
7345 absence of any `%uSUFFIX', this is just like `%gSUFFIX', except
7346 they don't share the same suffix _space_, so `%g.s ... %U.s ...
7347 %g.s ... %U.s' would involve the generation of two distinct file
7348 names, one for each `%g.s' and another for each `%U.s'.
7349 Previously, `%U' was simply substituted with a file name chosen
7350 for the previous `%u', without regard to any appended suffix.
7353 Substitutes the name of the `HOST_BIT_BUCKET', if any, and if it is
7354 writable, and if save-temps is off; otherwise, substitute the name
7355 of a temporary file, just like `%u'. This temporary file is not
7356 meant for communication between processes, but rather as a junk
7361 Like `%g', except if `-pipe' is in effect. In that case `%|'
7362 substitutes a single dash and `%m' substitutes nothing at all.
7363 These are the two most common ways to instruct a program that it
7364 should read from standard input or write to standard output. If
7365 you need something more elaborate you can use an `%{pipe:`X'}'
7366 construct: see for example `f/lang-specs.h'.
7369 Substitutes .SUFFIX for the suffixes of a matched switch's args
7370 when it is subsequently output with `%*'. SUFFIX is terminated by
7371 the next space or %.
7374 Marks the argument containing or following the `%w' as the
7375 designated output file of this compilation. This puts the argument
7376 into the sequence of arguments that `%o' will substitute later.
7379 Substitutes the names of all the output files, with spaces
7380 automatically placed around them. You should write spaces around
7381 the `%o' as well or the results are undefined. `%o' is for use in
7382 the specs for running the linker. Input files whose names have no
7383 recognized suffix are not compiled at all, but they are included
7384 among the output files, so they will be linked.
7387 Substitutes the suffix for object files. Note that this is
7388 handled specially when it immediately follows `%g, %u, or %U',
7389 because of the need for those to form complete file names. The
7390 handling is such that `%O' is treated exactly as if it had already
7391 been substituted, except that `%g, %u, and %U' do not currently
7392 support additional SUFFIX characters following `%O' as they would
7393 following, for example, `.o'.
7396 Substitutes the standard macro predefinitions for the current
7397 target machine. Use this when running `cpp'.
7400 Like `%p', but puts `__' before and after the name of each
7401 predefined macro, except for macros that start with `__' or with
7402 `_L', where L is an uppercase letter. This is for ISO C.
7405 Substitute any of `-iprefix' (made from `GCC_EXEC_PREFIX'),
7406 `-isysroot' (made from `TARGET_SYSTEM_ROOT'), `-isystem' (made
7407 from `COMPILER_PATH' and `-B' options) and `-imultilib' as
7411 Current argument is the name of a library or startup file of some
7412 sort. Search for that file in a standard list of directories and
7413 substitute the full name found.
7416 Print STR as an error message. STR is terminated by a newline.
7417 Use this when inconsistent options are detected.
7420 Substitute the contents of spec string NAME at this point.
7423 Like `%(...)' but put `__' around `-D' arguments.
7426 Accumulate an option for `%X'.
7429 Output the accumulated linker options specified by `-Wl' or a `%x'
7433 Output the accumulated assembler options specified by `-Wa'.
7436 Output the accumulated preprocessor options specified by `-Wp'.
7439 Process the `asm' spec. This is used to compute the switches to
7440 be passed to the assembler.
7443 Process the `asm_final' spec. This is a spec string for passing
7444 switches to an assembler post-processor, if such a program is
7448 Process the `link' spec. This is the spec for computing the
7449 command line passed to the linker. Typically it will make use of
7450 the `%L %G %S %D and %E' sequences.
7453 Dump out a `-L' option for each directory that GCC believes might
7454 contain startup files. If the target supports multilibs then the
7455 current multilib directory will be prepended to each of these
7459 Process the `lib' spec. This is a spec string for deciding which
7460 libraries should be included on the command line to the linker.
7463 Process the `libgcc' spec. This is a spec string for deciding
7464 which GCC support library should be included on the command line
7468 Process the `startfile' spec. This is a spec for deciding which
7469 object files should be the first ones passed to the linker.
7470 Typically this might be a file named `crt0.o'.
7473 Process the `endfile' spec. This is a spec string that specifies
7474 the last object files that will be passed to the linker.
7477 Process the `cpp' spec. This is used to construct the arguments
7478 to be passed to the C preprocessor.
7481 Process the `cc1' spec. This is used to construct the options to
7482 be passed to the actual C compiler (`cc1').
7485 Process the `cc1plus' spec. This is used to construct the options
7486 to be passed to the actual C++ compiler (`cc1plus').
7489 Substitute the variable part of a matched option. See below.
7490 Note that each comma in the substituted string is replaced by a
7494 Remove all occurrences of `-S' from the command line. Note--this
7495 command is position dependent. `%' commands in the spec string
7496 before this one will see `-S', `%' commands in the spec string
7497 after this one will not.
7500 Call the named function FUNCTION, passing it ARGS. ARGS is first
7501 processed as a nested spec string, then split into an argument
7502 vector in the usual fashion. The function returns a string which
7503 is processed as if it had appeared literally as part of the
7506 The following built-in spec functions are provided:
7509 The `if-exists' spec function takes one argument, an absolute
7510 pathname to a file. If the file exists, `if-exists' returns
7511 the pathname. Here is a small example of its usage:
7514 crt0%O%s %:if-exists(crti%O%s) crtbegin%O%s
7517 The `if-exists-else' spec function is similar to the
7518 `if-exists' spec function, except that it takes two
7519 arguments. The first argument is an absolute pathname to a
7520 file. If the file exists, `if-exists-else' returns the
7521 pathname. If it does not exist, it returns the second
7522 argument. This way, `if-exists-else' can be used to select
7523 one file or another, based on the existence of the first.
7524 Here is a small example of its usage:
7527 crt0%O%s %:if-exists(crti%O%s) \
7528 %:if-exists-else(crtbeginT%O%s crtbegin%O%s)
7531 The `replace-outfile' spec function takes two arguments. It
7532 looks for the first argument in the outfiles array and
7533 replaces it with the second argument. Here is a small
7534 example of its usage:
7536 %{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)}
7540 Substitutes the `-S' switch, if that switch was given to GCC. If
7541 that switch was not specified, this substitutes nothing. Note that
7542 the leading dash is omitted when specifying this option, and it is
7543 automatically inserted if the substitution is performed. Thus the
7544 spec string `%{foo}' would match the command-line option `-foo'
7545 and would output the command line option `-foo'.
7548 Like %{`S'} but mark last argument supplied within as a file to be
7552 Substitutes all the switches specified to GCC whose names start
7553 with `-S', but which also take an argument. This is used for
7554 switches like `-o', `-D', `-I', etc. GCC considers `-o foo' as
7555 being one switch whose names starts with `o'. %{o*} would
7556 substitute this text, including the space. Thus two arguments
7560 Like %{`S'*}, but preserve order of `S' and `T' options (the order
7561 of `S' and `T' in the spec is not significant). There can be any
7562 number of ampersand-separated variables; for each the wild card is
7563 optional. Useful for CPP as `%{D*&U*&A*}'.
7566 Substitutes `X', if the `-S' switch was given to GCC.
7569 Substitutes `X', if the `-S' switch was _not_ given to GCC.
7572 Substitutes `X' if one or more switches whose names start with
7573 `-S' are specified to GCC. Normally `X' is substituted only once,
7574 no matter how many such switches appeared. However, if `%*'
7575 appears somewhere in `X', then `X' will be substituted once for
7576 each matching switch, with the `%*' replaced by the part of that
7577 switch that matched the `*'.
7580 Substitutes `X', if processing a file with suffix `S'.
7583 Substitutes `X', if _not_ processing a file with suffix `S'.
7586 Substitutes `X' if either `-S' or `-P' was given to GCC. This may
7587 be combined with `!', `.', and `*' sequences as well, although
7588 they have a stronger binding than the `|'. If `%*' appears in
7589 `X', all of the alternatives must be starred, and only the first
7590 matching alternative is substituted.
7592 For example, a spec string like this:
7594 %{.c:-foo} %{!.c:-bar} %{.c|d:-baz} %{!.c|d:-boggle}
7596 will output the following command-line options from the following
7597 input command-line options:
7601 -d fred.c -foo -baz -boggle
7602 -d jim.d -bar -baz -boggle
7605 If `S' was given to GCC, substitutes `X'; else if `T' was given to
7606 GCC, substitutes `Y'; else substitutes `D'. There can be as many
7607 clauses as you need. This may be combined with `.', `!', `|', and
7611 The conditional text `X' in a %{`S':`X'} or similar construct may
7612 contain other nested `%' constructs or spaces, or even newlines. They
7613 are processed as usual, as described above. Trailing white space in
7614 `X' is ignored. White space may also appear anywhere on the left side
7615 of the colon in these constructs, except between `.' or `*' and the
7618 The `-O', `-f', `-m', and `-W' switches are handled specifically in
7619 these constructs. If another value of `-O' or the negated form of a
7620 `-f', `-m', or `-W' switch is found later in the command line, the
7621 earlier switch value is ignored, except with {`S'*} where `S' is just
7622 one letter, which passes all matching options.
7624 The character `|' at the beginning of the predicate text is used to
7625 indicate that a command should be piped to the following command, but
7626 only if `-pipe' is specified.
7628 It is built into GCC which switches take arguments and which do not.
7629 (You might think it would be useful to generalize this to allow each
7630 compiler's spec to say which switches take arguments. But this cannot
7631 be done in a consistent fashion. GCC cannot even decide which input
7632 files have been specified without knowing which switches take arguments,
7633 and it must know which input files to compile in order to tell which
7636 GCC also knows implicitly that arguments starting in `-l' are to be
7637 treated as compiler output files, and passed to the linker in their
7638 proper position among the other output files.
7641 File: gcc.info, Node: Target Options, Next: Submodel Options, Prev: Spec Files, Up: Invoking GCC
7643 3.16 Specifying Target Machine and Compiler Version
7644 ===================================================
7646 The usual way to run GCC is to run the executable called `gcc', or
7647 `<machine>-gcc' when cross-compiling, or `<machine>-gcc-<version>' to
7648 run a version other than the one that was installed last. Sometimes
7649 this is inconvenient, so GCC provides options that will switch to
7650 another cross-compiler or version.
7653 The argument MACHINE specifies the target machine for compilation.
7655 The value to use for MACHINE is the same as was specified as the
7656 machine type when configuring GCC as a cross-compiler. For
7657 example, if a cross-compiler was configured with `configure
7658 arm-elf', meaning to compile for an arm processor with elf
7659 binaries, then you would specify `-b arm-elf' to run that cross
7660 compiler. Because there are other options beginning with `-b', the
7661 configuration must contain a hyphen.
7664 The argument VERSION specifies which version of GCC to run. This
7665 is useful when multiple versions are installed. For example,
7666 VERSION might be `4.0', meaning to run GCC version 4.0.
7668 The `-V' and `-b' options work by running the
7669 `<machine>-gcc-<version>' executable, so there's no real reason to use
7670 them if you can just run that directly.
7673 File: gcc.info, Node: Submodel Options, Next: Code Gen Options, Prev: Target Options, Up: Invoking GCC
7675 3.17 Hardware Models and Configurations
7676 =======================================
7678 Earlier we discussed the standard option `-b' which chooses among
7679 different installed compilers for completely different target machines,
7680 such as VAX vs. 68000 vs. 80386.
7682 In addition, each of these target machine types can have its own
7683 special options, starting with `-m', to choose among various hardware
7684 models or configurations--for example, 68010 vs 68020, floating
7685 coprocessor or none. A single installed version of the compiler can
7686 compile for any model or configuration, according to the options
7689 Some configurations of the compiler also support additional special
7690 options, usually for compatibility with other compilers on the same
7698 * Blackfin Options::
7702 * DEC Alpha Options::
7703 * DEC Alpha/VMS Options::
7705 * GNU/Linux Options::
7708 * i386 and x86-64 Options::
7721 * RS/6000 and PowerPC Options::
7722 * S/390 and zSeries Options::
7726 * System V Options::
7727 * TMS320C3x/C4x Options::
7731 * Xstormy16 Options::
7736 File: gcc.info, Node: ARC Options, Next: ARM Options, Up: Submodel Options
7741 These options are defined for ARC implementations:
7744 Compile code for little endian mode. This is the default.
7747 Compile code for big endian mode.
7750 Prepend the name of the cpu to all public symbol names. In
7751 multiple-processor systems, there are many ARC variants with
7752 different instruction and register set characteristics. This flag
7753 prevents code compiled for one cpu to be linked with code compiled
7754 for another. No facility exists for handling variants that are
7755 "almost identical". This is an all or nothing option.
7758 Compile code for ARC variant CPU. Which variants are supported
7759 depend on the configuration. All variants support `-mcpu=base',
7760 this is the default.
7762 `-mtext=TEXT-SECTION'
7763 `-mdata=DATA-SECTION'
7764 `-mrodata=READONLY-DATA-SECTION'
7765 Put functions, data, and readonly data in TEXT-SECTION,
7766 DATA-SECTION, and READONLY-DATA-SECTION respectively by default.
7767 This can be overridden with the `section' attribute. *Note
7768 Variable Attributes::.
7772 File: gcc.info, Node: ARM Options, Next: AVR Options, Prev: ARC Options, Up: Submodel Options
7777 These `-m' options are defined for Advanced RISC Machines (ARM)
7781 Generate code for the specified ABI. Permissible values are:
7782 `apcs-gnu', `atpcs', `aapcs', `aapcs-linux' and `iwmmxt'.
7785 Generate a stack frame that is compliant with the ARM Procedure
7786 Call Standard for all functions, even if this is not strictly
7787 necessary for correct execution of the code. Specifying
7788 `-fomit-frame-pointer' with this option will cause the stack
7789 frames not to be generated for leaf functions. The default is
7793 This is a synonym for `-mapcs-frame'.
7796 Generate code which supports calling between the ARM and Thumb
7797 instruction sets. Without this option the two instruction sets
7798 cannot be reliably used inside one program. The default is
7799 `-mno-thumb-interwork', since slightly larger code is generated
7800 when `-mthumb-interwork' is specified.
7803 Prevent the reordering of instructions in the function prolog, or
7804 the merging of those instruction with the instructions in the
7805 function's body. This means that all functions will start with a
7806 recognizable set of instructions (or in fact one of a choice from
7807 a small set of different function prologues), and this information
7808 can be used to locate the start if functions inside an executable
7809 piece of code. The default is `-msched-prolog'.
7812 Generate output containing floating point instructions. This is
7816 Generate output containing library calls for floating point.
7817 *Warning:* the requisite libraries are not available for all ARM
7818 targets. Normally the facilities of the machine's usual C
7819 compiler are used, but this cannot be done directly in
7820 cross-compilation. You must make your own arrangements to provide
7821 suitable library functions for cross-compilation.
7823 `-msoft-float' changes the calling convention in the output file;
7824 therefore, it is only useful if you compile _all_ of a program with
7825 this option. In particular, you need to compile `libgcc.a', the
7826 library that comes with GCC, with `-msoft-float' in order for this
7830 Specifies which ABI to use for floating point values. Permissible
7831 values are: `soft', `softfp' and `hard'.
7833 `soft' and `hard' are equivalent to `-msoft-float' and
7834 `-mhard-float' respectively. `softfp' allows the generation of
7835 floating point instructions, but still uses the soft-float calling
7839 Generate code for a processor running in little-endian mode. This
7840 is the default for all standard configurations.
7843 Generate code for a processor running in big-endian mode; the
7844 default is to compile code for a little-endian processor.
7846 `-mwords-little-endian'
7847 This option only applies when generating code for big-endian
7848 processors. Generate code for a little-endian word order but a
7849 big-endian byte order. That is, a byte order of the form
7850 `32107654'. Note: this option should only be used if you require
7851 compatibility with code for big-endian ARM processors generated by
7852 versions of the compiler prior to 2.8.
7855 This specifies the name of the target ARM processor. GCC uses
7856 this name to determine what kind of instructions it can emit when
7857 generating assembly code. Permissible names are: `arm2', `arm250',
7858 `arm3', `arm6', `arm60', `arm600', `arm610', `arm620', `arm7',
7859 `arm7m', `arm7d', `arm7dm', `arm7di', `arm7dmi', `arm70', `arm700',
7860 `arm700i', `arm710', `arm710c', `arm7100', `arm7500', `arm7500fe',
7861 `arm7tdmi', `arm7tdmi-s', `arm8', `strongarm', `strongarm110',
7862 `strongarm1100', `arm8', `arm810', `arm9', `arm9e', `arm920',
7863 `arm920t', `arm922t', `arm946e-s', `arm966e-s', `arm968e-s',
7864 `arm926ej-s', `arm940t', `arm9tdmi', `arm10tdmi', `arm1020t',
7865 `arm1026ej-s', `arm10e', `arm1020e', `arm1022e', `arm1136j-s',
7866 `arm1136jf-s', `mpcore', `mpcorenovfp', `arm1176jz-s',
7867 `arm1176jzf-s', `xscale', `iwmmxt', `ep9312'.
7870 This option is very similar to the `-mcpu=' option, except that
7871 instead of specifying the actual target processor type, and hence
7872 restricting which instructions can be used, it specifies that GCC
7873 should tune the performance of the code as if the target were of
7874 the type specified in this option, but still choosing the
7875 instructions that it will generate based on the cpu specified by a
7876 `-mcpu=' option. For some ARM implementations better performance
7877 can be obtained by using this option.
7880 This specifies the name of the target ARM architecture. GCC uses
7881 this name to determine what kind of instructions it can emit when
7882 generating assembly code. This option can be used in conjunction
7883 with or instead of the `-mcpu=' option. Permissible names are:
7884 `armv2', `armv2a', `armv3', `armv3m', `armv4', `armv4t', `armv5',
7885 `armv5t', `armv5te', `armv6', `armv6j', `iwmmxt', `ep9312'.
7890 This specifies what floating point hardware (or hardware
7891 emulation) is available on the target. Permissible names are:
7892 `fpa', `fpe2', `fpe3', `maverick', `vfp'. `-mfp' and `-mfpe' are
7893 synonyms for `-mfpu'=`fpe'NUMBER, for compatibility with older
7896 If `-msoft-float' is specified this specifies the format of
7897 floating point values.
7899 `-mstructure-size-boundary=N'
7900 The size of all structures and unions will be rounded up to a
7901 multiple of the number of bits set by this option. Permissible
7902 values are 8, 32 and 64. The default value varies for different
7903 toolchains. For the COFF targeted toolchain the default value is
7904 8. A value of 64 is only allowed if the underlying ABI supports
7907 Specifying the larger number can produce faster, more efficient
7908 code, but can also increase the size of the program. Different
7909 values are potentially incompatible. Code compiled with one value
7910 cannot necessarily expect to work with code or libraries compiled
7911 with another value, if they exchange information using structures
7914 `-mabort-on-noreturn'
7915 Generate a call to the function `abort' at the end of a `noreturn'
7916 function. It will be executed if the function tries to return.
7920 Tells the compiler to perform function calls by first loading the
7921 address of the function into a register and then performing a
7922 subroutine call on this register. This switch is needed if the
7923 target function will lie outside of the 64 megabyte addressing
7924 range of the offset based version of subroutine call instruction.
7926 Even if this switch is enabled, not all function calls will be
7927 turned into long calls. The heuristic is that static functions,
7928 functions which have the `short-call' attribute, functions that
7929 are inside the scope of a `#pragma no_long_calls' directive and
7930 functions whose definitions have already been compiled within the
7931 current compilation unit, will not be turned into long calls. The
7932 exception to this rule is that weak function definitions,
7933 functions with the `long-call' attribute or the `section'
7934 attribute, and functions that are within the scope of a `#pragma
7935 long_calls' directive, will always be turned into long calls.
7937 This feature is not enabled by default. Specifying
7938 `-mno-long-calls' will restore the default behavior, as will
7939 placing the function calls within the scope of a `#pragma
7940 long_calls_off' directive. Note these switches have no effect on
7941 how the compiler generates code to handle function calls via
7944 `-mnop-fun-dllimport'
7945 Disable support for the `dllimport' attribute.
7948 Treat the register used for PIC addressing as read-only, rather
7949 than loading it in the prologue for each function. The run-time
7950 system is responsible for initializing this register with an
7951 appropriate value before execution begins.
7953 `-mpic-register=REG'
7954 Specify the register to be used for PIC addressing. The default
7955 is R10 unless stack-checking is enabled, when R9 is used.
7957 `-mcirrus-fix-invalid-insns'
7958 Insert NOPs into the instruction stream to in order to work around
7959 problems with invalid Maverick instruction combinations. This
7960 option is only valid if the `-mcpu=ep9312' option has been used to
7961 enable generation of instructions for the Cirrus Maverick floating
7962 point co-processor. This option is not enabled by default, since
7963 the problem is only present in older Maverick implementations.
7964 The default can be re-enabled by use of the
7965 `-mno-cirrus-fix-invalid-insns' switch.
7967 `-mpoke-function-name'
7968 Write the name of each function into the text section, directly
7969 preceding the function prologue. The generated code is similar to
7973 .ascii "arm_poke_function_name", 0
7976 .word 0xff000000 + (t1 - t0)
7977 arm_poke_function_name
7979 stmfd sp!, {fp, ip, lr, pc}
7982 When performing a stack backtrace, code can inspect the value of
7983 `pc' stored at `fp + 0'. If the trace function then looks at
7984 location `pc - 12' and the top 8 bits are set, then we know that
7985 there is a function name embedded immediately preceding this
7986 location and has length `((pc[-3]) & 0xff000000)'.
7989 Generate code for the 16-bit Thumb instruction set. The default
7990 is to use the 32-bit ARM instruction set.
7993 Generate a stack frame that is compliant with the Thumb Procedure
7994 Call Standard for all non-leaf functions. (A leaf function is one
7995 that does not call any other functions.) The default is
7999 Generate a stack frame that is compliant with the Thumb Procedure
8000 Call Standard for all leaf functions. (A leaf function is one
8001 that does not call any other functions.) The default is
8002 `-mno-apcs-leaf-frame'.
8004 `-mcallee-super-interworking'
8005 Gives all externally visible functions in the file being compiled
8006 an ARM instruction set header which switches to Thumb mode before
8007 executing the rest of the function. This allows these functions
8008 to be called from non-interworking code.
8010 `-mcaller-super-interworking'
8011 Allows calls via function pointers (including virtual functions) to
8012 execute correctly regardless of whether the target code has been
8013 compiled for interworking or not. There is a small overhead in
8014 the cost of executing a function pointer if this option is enabled.
8017 Specify the access model for the thread local storage pointer.
8018 The valid models are `soft', which generates calls to
8019 `__aeabi_read_tp', `cp15', which fetches the thread pointer from
8020 `cp15' directly (supported in the arm6k architecture), and `auto',
8021 which uses the best available method for the selected processor.
8022 The default setting is `auto'.
8026 File: gcc.info, Node: AVR Options, Next: Blackfin Options, Prev: ARM Options, Up: Submodel Options
8031 These options are defined for AVR implementations:
8034 Specify ATMEL AVR instruction set or MCU type.
8036 Instruction set avr1 is for the minimal AVR core, not supported by
8037 the C compiler, only for assembler programs (MCU types: at90s1200,
8038 attiny10, attiny11, attiny12, attiny15, attiny28).
8040 Instruction set avr2 (default) is for the classic AVR core with up
8041 to 8K program memory space (MCU types: at90s2313, at90s2323,
8042 attiny22, at90s2333, at90s2343, at90s4414, at90s4433, at90s4434,
8043 at90s8515, at90c8534, at90s8535).
8045 Instruction set avr3 is for the classic AVR core with up to 128K
8046 program memory space (MCU types: atmega103, atmega603, at43usb320,
8049 Instruction set avr4 is for the enhanced AVR core with up to 8K
8050 program memory space (MCU types: atmega8, atmega83, atmega85).
8052 Instruction set avr5 is for the enhanced AVR core with up to 128K
8053 program memory space (MCU types: atmega16, atmega161, atmega163,
8054 atmega32, atmega323, atmega64, atmega128, at43usb355, at94k).
8057 Output instruction sizes to the asm file.
8060 Specify the initial stack address, which may be a symbol or
8061 numeric value, `__stack' is the default.
8064 Generated code is not compatible with hardware interrupts. Code
8065 size will be smaller.
8068 Functions prologues/epilogues expanded as call to appropriate
8069 subroutines. Code size will be smaller.
8072 Do not generate tablejump insns which sometimes increase code size.
8075 Change only the low 8 bits of the stack pointer.
8078 Assume int to be 8 bit integer. This affects the sizes of all
8079 types: A char will be 1 byte, an int will be 1 byte, an long will
8080 be 2 bytes and long long will be 4 bytes. Please note that this
8081 option does not comply to the C standards, but it will provide you
8082 with smaller code size.
8085 File: gcc.info, Node: Blackfin Options, Next: CRIS Options, Prev: AVR Options, Up: Submodel Options
8087 3.17.4 Blackfin Options
8088 -----------------------
8090 `-momit-leaf-frame-pointer'
8091 Don't keep the frame pointer in a register for leaf functions.
8092 This avoids the instructions to save, set up and restore frame
8093 pointers and makes an extra register available in leaf functions.
8094 The option `-fomit-frame-pointer' removes the frame pointer for
8095 all functions which might make debugging harder.
8098 When enabled, the compiler will ensure that the generated code
8099 does not contain speculative loads after jump instructions. This
8100 option is enabled by default.
8102 `-mno-specld-anomaly'
8103 Don't generate extra code to prevent speculative loads from
8107 When enabled, the compiler will ensure that the generated code
8108 does not contain CSYNC or SSYNC instructions too soon after
8109 conditional branches. This option is enabled by default.
8111 `-mno-csync-anomaly'
8112 Don't generate extra code to prevent CSYNC or SSYNC instructions
8113 from occurring too soon after a conditional branch.
8116 When enabled, the compiler is free to take advantage of the
8117 knowledge that the entire program fits into the low 64k of memory.
8120 Assume that the program is arbitrarily large. This is the default.
8122 `-mid-shared-library'
8123 Generate code that supports shared libraries via the library ID
8124 method. This allows for execute in place and shared libraries in
8125 an environment without virtual memory management. This option
8128 `-mno-id-shared-library'
8129 Generate code that doesn't assume ID based shared libraries are
8130 being used. This is the default.
8132 `-mshared-library-id=n'
8133 Specified the identification number of the ID based shared library
8134 being compiled. Specifying a value of 0 will generate more
8135 compact code, specifying other values will force the allocation of
8136 that number to the current library but is no more space or time
8137 efficient than omitting this option.
8141 Tells the compiler to perform function calls by first loading the
8142 address of the function into a register and then performing a
8143 subroutine call on this register. This switch is needed if the
8144 target function will lie outside of the 24 bit addressing range of
8145 the offset based version of subroutine call instruction.
8147 This feature is not enabled by default. Specifying
8148 `-mno-long-calls' will restore the default behavior. Note these
8149 switches have no effect on how the compiler generates code to
8150 handle function calls via function pointers.
8153 File: gcc.info, Node: CRIS Options, Next: CRX Options, Prev: Blackfin Options, Up: Submodel Options
8158 These options are defined specifically for the CRIS ports.
8160 `-march=ARCHITECTURE-TYPE'
8161 `-mcpu=ARCHITECTURE-TYPE'
8162 Generate code for the specified architecture. The choices for
8163 ARCHITECTURE-TYPE are `v3', `v8' and `v10' for respectively
8164 ETRAX 4, ETRAX 100, and ETRAX 100 LX. Default is `v0' except for
8165 cris-axis-linux-gnu, where the default is `v10'.
8167 `-mtune=ARCHITECTURE-TYPE'
8168 Tune to ARCHITECTURE-TYPE everything applicable about the generated
8169 code, except for the ABI and the set of available instructions.
8170 The choices for ARCHITECTURE-TYPE are the same as for
8171 `-march=ARCHITECTURE-TYPE'.
8173 `-mmax-stack-frame=N'
8174 Warn when the stack frame of a function exceeds N bytes.
8176 `-melinux-stacksize=N'
8177 Only available with the `cris-axis-aout' target. Arranges for
8178 indications in the program to the kernel loader that the stack of
8179 the program should be set to N bytes.
8183 The options `-metrax4' and `-metrax100' are synonyms for
8184 `-march=v3' and `-march=v8' respectively.
8186 `-mmul-bug-workaround'
8187 `-mno-mul-bug-workaround'
8188 Work around a bug in the `muls' and `mulu' instructions for CPU
8189 models where it applies. This option is active by default.
8192 Enable CRIS-specific verbose debug-related information in the
8193 assembly code. This option also has the effect to turn off the
8194 `#NO_APP' formatted-code indicator to the assembler at the
8195 beginning of the assembly file.
8198 Do not use condition-code results from previous instruction;
8199 always emit compare and test instructions before use of condition
8203 Do not emit instructions with side-effects in addressing modes
8204 other than post-increment.
8212 These options (no-options) arranges (eliminate arrangements) for
8213 the stack-frame, individual data and constants to be aligned for
8214 the maximum single data access size for the chosen CPU model. The
8215 default is to arrange for 32-bit alignment. ABI details such as
8216 structure layout are not affected by these options.
8221 Similar to the stack- data- and const-align options above, these
8222 options arrange for stack-frame, writable data and constants to
8223 all be 32-bit, 16-bit or 8-bit aligned. The default is 32-bit
8226 `-mno-prologue-epilogue'
8227 `-mprologue-epilogue'
8228 With `-mno-prologue-epilogue', the normal function prologue and
8229 epilogue that sets up the stack-frame are omitted and no return
8230 instructions or return sequences are generated in the code. Use
8231 this option only together with visual inspection of the compiled
8232 code: no warnings or errors are generated when call-saved
8233 registers must be saved, or storage for local variable needs to be
8238 With `-fpic' and `-fPIC', don't generate (do generate) instruction
8239 sequences that load addresses for functions from the PLT part of
8240 the GOT rather than (traditional on other architectures) calls to
8241 the PLT. The default is `-mgotplt'.
8244 Legacy no-op option only recognized with the cris-axis-aout target.
8247 Legacy no-op option only recognized with the cris-axis-elf and
8248 cris-axis-linux-gnu targets.
8251 Only recognized with the cris-axis-aout target, where it selects a
8252 GNU/linux-like multilib, include files and instruction set for
8256 Legacy no-op option only recognized with the cris-axis-linux-gnu
8260 This option, recognized for the cris-axis-aout and cris-axis-elf
8261 arranges to link with input-output functions from a simulator
8262 library. Code, initialized data and zero-initialized data are
8263 allocated consecutively.
8266 Like `-sim', but pass linker options to locate initialized data at
8267 0x40000000 and zero-initialized data at 0x80000000.
8270 File: gcc.info, Node: CRX Options, Next: Darwin Options, Prev: CRIS Options, Up: Submodel Options
8275 These options are defined specifically for the CRX ports.
8278 Enable the use of multiply-accumulate instructions. Disabled by
8282 Push instructions will be used to pass outgoing arguments when
8283 functions are called. Enabled by default.
8286 File: gcc.info, Node: Darwin Options, Next: DEC Alpha Options, Prev: CRX Options, Up: Submodel Options
8288 3.17.7 Darwin Options
8289 ---------------------
8291 These options are defined for all architectures running the Darwin
8294 FSF GCC on Darwin does not create "fat" object files; it will create
8295 an object file for the single architecture that it was built to target.
8296 Apple's GCC on Darwin does create "fat" files if multiple `-arch'
8297 options are used; it does so by running the compiler or linker multiple
8298 times and joining the results together with `lipo'.
8300 The subtype of the file created (like `ppc7400' or `ppc970' or `i686')
8301 is determined by the flags that specify the ISA that GCC is targetting,
8302 like `-mcpu' or `-march'. The `-force_cpusubtype_ALL' option can be
8303 used to override this.
8305 The Darwin tools vary in their behavior when presented with an ISA
8306 mismatch. The assembler, `as', will only permit instructions to be
8307 used that are valid for the subtype of the file it is generating, so
8308 you cannot put 64-bit instructions in an `ppc750' object file. The
8309 linker for shared libraries, `/usr/bin/libtool', will fail and print an
8310 error if asked to create a shared library with a less restrictive
8311 subtype than its input files (for instance, trying to put a `ppc970'
8312 object file in a `ppc7400' library). The linker for executables, `ld',
8313 will quietly give the executable the most restrictive subtype of any of
8317 Add the framework directory DIR to the head of the list of
8318 directories to be searched for header files. These directories are
8319 interleaved with those specified by `-I' options and are scanned
8320 in a left-to-right order.
8322 A framework directory is a directory with frameworks in it. A
8323 framework is a directory with a `"Headers"' and/or
8324 `"PrivateHeaders"' directory contained directly in it that ends in
8325 `".framework"'. The name of a framework is the name of this
8326 directory excluding the `".framework"'. Headers associated with
8327 the framework are found in one of those two directories, with
8328 `"Headers"' being searched first. A subframework is a framework
8329 directory that is in a framework's `"Frameworks"' directory.
8330 Includes of subframework headers can only appear in a header of a
8331 framework that contains the subframework, or in a sibling
8332 subframework header. Two subframeworks are siblings if they occur
8333 in the same framework. A subframework should not have the same
8334 name as a framework, a warning will be issued if this is violated.
8335 Currently a subframework cannot have subframeworks, in the
8336 future, the mechanism may be extended to support this. The
8337 standard frameworks can be found in `"/System/Library/Frameworks"'
8338 and `"/Library/Frameworks"'. An example include looks like
8339 `#include <Framework/header.h>', where `Framework' denotes the
8340 name of the framework and header.h is found in the
8341 `"PrivateHeaders"' or `"Headers"' directory.
8344 Emit debugging information for symbols that are used. For STABS
8345 debugging format, this enables `-feliminate-unused-debug-symbols'.
8346 This is by default ON.
8349 Emit debugging information for all symbols and types.
8351 `-mmacosx-version-min=VERSION'
8352 The earliest version of MacOS X that this executable will run on
8353 is VERSION. Typical values of VERSION include `10.1', `10.2', and
8356 The default for this option is to make choices that seem to be most
8360 Enable kernel development mode. The `-mkernel' option sets
8361 `-static', `-fno-common', `-fno-cxa-atexit', `-fno-exceptions',
8362 `-fno-non-call-exceptions', `-fapple-kext', `-fno-weak' and
8363 `-fno-rtti' where applicable. This mode also sets `-mno-altivec',
8364 `-msoft-float', `-fno-builtin' and `-mlong-branch' for PowerPC
8368 Override the defaults for `bool' so that `sizeof(bool)==1'. By
8369 default `sizeof(bool)' is `4' when compiling for Darwin/PowerPC
8370 and `1' when compiling for Darwin/x86, so this option has no
8373 *Warning:* The `-mone-byte-bool' switch causes GCC to generate
8374 code that is not binary compatible with code generated without
8375 that switch. Using this switch may require recompiling all other
8376 modules in a program, including system libraries. Use this switch
8377 to conform to a non-default data model.
8379 `-mfix-and-continue'
8380 `-ffix-and-continue'
8382 Generate code suitable for fast turn around development. Needed to
8383 enable gdb to dynamically load `.o' files into already running
8384 programs. `-findirect-data' and `-ffix-and-continue' are provided
8385 for backwards compatibility.
8388 Loads all members of static archive libraries. See man ld(1) for
8391 `-arch_errors_fatal'
8392 Cause the errors having to do with files that have the wrong
8393 architecture to be fatal.
8396 Causes the output file to be marked such that the dynamic linker
8397 will bind all undefined references when the file is loaded or
8401 Produce a Mach-o bundle format file. See man ld(1) for more
8404 `-bundle_loader EXECUTABLE'
8405 This option specifies the EXECUTABLE that will be loading the build
8406 output file being linked. See man ld(1) for more information.
8409 When passed this option, GCC will produce a dynamic library
8410 instead of an executable when linking, using the Darwin `libtool'
8413 `-force_cpusubtype_ALL'
8414 This causes GCC's output file to have the ALL subtype, instead of
8415 one controlled by the `-mcpu' or `-march' option.
8417 `-allowable_client CLIENT_NAME'
8419 `-compatibility_version'
8424 `-dylinker_install_name'
8426 `-exported_symbols_list'
8429 `-force_flat_namespace'
8430 `-headerpad_max_install_names'
8434 `-keep_private_externs'
8437 `-multiply_defined_unused'
8439 `-no_dead_strip_inits_and_terms'
8446 `-prebind_all_twolevel_modules'
8450 `-sectobjectsymbols'
8454 `-sectobjectsymbols'
8457 `-segs_read_only_addr'
8458 `-segs_read_write_addr'
8460 `-seg_addr_table_filename'
8463 `-segs_read_only_addr'
8464 `-segs_read_write_addr'
8469 `-twolevel_namespace'
8472 `-unexported_symbols_list'
8473 `-weak_reference_mismatches'
8475 These options are passed to the Darwin linker. The Darwin linker
8476 man page describes them in detail.
8479 File: gcc.info, Node: DEC Alpha Options, Next: DEC Alpha/VMS Options, Prev: Darwin Options, Up: Submodel Options
8481 3.17.8 DEC Alpha Options
8482 ------------------------
8484 These `-m' options are defined for the DEC Alpha implementations:
8488 Use (do not use) the hardware floating-point instructions for
8489 floating-point operations. When `-msoft-float' is specified,
8490 functions in `libgcc.a' will be used to perform floating-point
8491 operations. Unless they are replaced by routines that emulate the
8492 floating-point operations, or compiled in such a way as to call
8493 such emulations routines, these routines will issue floating-point
8494 operations. If you are compiling for an Alpha without
8495 floating-point operations, you must ensure that the library is
8496 built so as not to call them.
8498 Note that Alpha implementations without floating-point operations
8499 are required to have floating-point registers.
8503 Generate code that uses (does not use) the floating-point register
8504 set. `-mno-fp-regs' implies `-msoft-float'. If the floating-point
8505 register set is not used, floating point operands are passed in
8506 integer registers as if they were integers and floating-point
8507 results are passed in `$0' instead of `$f0'. This is a
8508 non-standard calling sequence, so any function with a
8509 floating-point argument or return value called by code compiled
8510 with `-mno-fp-regs' must also be compiled with that option.
8512 A typical use of this option is building a kernel that does not
8513 use, and hence need not save and restore, any floating-point
8517 The Alpha architecture implements floating-point hardware
8518 optimized for maximum performance. It is mostly compliant with
8519 the IEEE floating point standard. However, for full compliance,
8520 software assistance is required. This option generates code fully
8521 IEEE compliant code _except_ that the INEXACT-FLAG is not
8522 maintained (see below). If this option is turned on, the
8523 preprocessor macro `_IEEE_FP' is defined during compilation. The
8524 resulting code is less efficient but is able to correctly support
8525 denormalized numbers and exceptional IEEE values such as
8526 not-a-number and plus/minus infinity. Other Alpha compilers call
8527 this option `-ieee_with_no_inexact'.
8529 `-mieee-with-inexact'
8530 This is like `-mieee' except the generated code also maintains the
8531 IEEE INEXACT-FLAG. Turning on this option causes the generated
8532 code to implement fully-compliant IEEE math. In addition to
8533 `_IEEE_FP', `_IEEE_FP_EXACT' is defined as a preprocessor macro.
8534 On some Alpha implementations the resulting code may execute
8535 significantly slower than the code generated by default. Since
8536 there is very little code that depends on the INEXACT-FLAG, you
8537 should normally not specify this option. Other Alpha compilers
8538 call this option `-ieee_with_inexact'.
8540 `-mfp-trap-mode=TRAP-MODE'
8541 This option controls what floating-point related traps are enabled.
8542 Other Alpha compilers call this option `-fptm TRAP-MODE'. The
8543 trap mode can be set to one of four values:
8546 This is the default (normal) setting. The only traps that
8547 are enabled are the ones that cannot be disabled in software
8548 (e.g., division by zero trap).
8551 In addition to the traps enabled by `n', underflow traps are
8555 Like `u', but the instructions are marked to be safe for
8556 software completion (see Alpha architecture manual for
8560 Like `su', but inexact traps are enabled as well.
8562 `-mfp-rounding-mode=ROUNDING-MODE'
8563 Selects the IEEE rounding mode. Other Alpha compilers call this
8564 option `-fprm ROUNDING-MODE'. The ROUNDING-MODE can be one of:
8567 Normal IEEE rounding mode. Floating point numbers are
8568 rounded towards the nearest machine number or towards the
8569 even machine number in case of a tie.
8572 Round towards minus infinity.
8575 Chopped rounding mode. Floating point numbers are rounded
8579 Dynamic rounding mode. A field in the floating point control
8580 register (FPCR, see Alpha architecture reference manual)
8581 controls the rounding mode in effect. The C library
8582 initializes this register for rounding towards plus infinity.
8583 Thus, unless your program modifies the FPCR, `d' corresponds
8584 to round towards plus infinity.
8586 `-mtrap-precision=TRAP-PRECISION'
8587 In the Alpha architecture, floating point traps are imprecise.
8588 This means without software assistance it is impossible to recover
8589 from a floating trap and program execution normally needs to be
8590 terminated. GCC can generate code that can assist operating
8591 system trap handlers in determining the exact location that caused
8592 a floating point trap. Depending on the requirements of an
8593 application, different levels of precisions can be selected:
8596 Program precision. This option is the default and means a
8597 trap handler can only identify which program caused a
8598 floating point exception.
8601 Function precision. The trap handler can determine the
8602 function that caused a floating point exception.
8605 Instruction precision. The trap handler can determine the
8606 exact instruction that caused a floating point exception.
8608 Other Alpha compilers provide the equivalent options called
8609 `-scope_safe' and `-resumption_safe'.
8612 This option marks the generated code as IEEE conformant. You must
8613 not use this option unless you also specify `-mtrap-precision=i'
8614 and either `-mfp-trap-mode=su' or `-mfp-trap-mode=sui'. Its only
8615 effect is to emit the line `.eflag 48' in the function prologue of
8616 the generated assembly file. Under DEC Unix, this has the effect
8617 that IEEE-conformant math library routines will be linked in.
8620 Normally GCC examines a 32- or 64-bit integer constant to see if
8621 it can construct it from smaller constants in two or three
8622 instructions. If it cannot, it will output the constant as a
8623 literal and generate code to load it from the data segment at
8626 Use this option to require GCC to construct _all_ integer constants
8627 using code, even if it takes more instructions (the maximum is
8630 You would typically use this option to build a shared library
8631 dynamic loader. Itself a shared library, it must relocate itself
8632 in memory before it can find the variables and constants in its
8637 Select whether to generate code to be assembled by the
8638 vendor-supplied assembler (`-malpha-as') or by the GNU assembler
8649 Indicate whether GCC should generate code to use the optional BWX,
8650 CIX, FIX and MAX instruction sets. The default is to use the
8651 instruction sets supported by the CPU type specified via `-mcpu='
8652 option or that of the CPU on which GCC was built if none was
8657 Generate code that uses (does not use) VAX F and G floating point
8658 arithmetic instead of IEEE single and double precision.
8661 `-mno-explicit-relocs'
8662 Older Alpha assemblers provided no way to generate symbol
8663 relocations except via assembler macros. Use of these macros does
8664 not allow optimal instruction scheduling. GNU binutils as of
8665 version 2.12 supports a new syntax that allows the compiler to
8666 explicitly mark which relocations should apply to which
8667 instructions. This option is mostly useful for debugging, as GCC
8668 detects the capabilities of the assembler when it is built and
8669 sets the default accordingly.
8673 When `-mexplicit-relocs' is in effect, static data is accessed via
8674 "gp-relative" relocations. When `-msmall-data' is used, objects 8
8675 bytes long or smaller are placed in a "small data area" (the
8676 `.sdata' and `.sbss' sections) and are accessed via 16-bit
8677 relocations off of the `$gp' register. This limits the size of
8678 the small data area to 64KB, but allows the variables to be
8679 directly accessed via a single instruction.
8681 The default is `-mlarge-data'. With this option the data area is
8682 limited to just below 2GB. Programs that require more than 2GB of
8683 data must use `malloc' or `mmap' to allocate the data in the heap
8684 instead of in the program's data segment.
8686 When generating code for shared libraries, `-fpic' implies
8687 `-msmall-data' and `-fPIC' implies `-mlarge-data'.
8691 When `-msmall-text' is used, the compiler assumes that the code of
8692 the entire program (or shared library) fits in 4MB, and is thus
8693 reachable with a branch instruction. When `-msmall-data' is used,
8694 the compiler can assume that all local symbols share the same
8695 `$gp' value, and thus reduce the number of instructions required
8696 for a function call from 4 to 1.
8698 The default is `-mlarge-text'.
8701 Set the instruction set and instruction scheduling parameters for
8702 machine type CPU_TYPE. You can specify either the `EV' style name
8703 or the corresponding chip number. GCC supports scheduling
8704 parameters for the EV4, EV5 and EV6 family of processors and will
8705 choose the default values for the instruction set from the
8706 processor you specify. If you do not specify a processor type,
8707 GCC will default to the processor on which the compiler was built.
8709 Supported values for CPU_TYPE are
8714 Schedules as an EV4 and has no instruction set extensions.
8718 Schedules as an EV5 and has no instruction set extensions.
8722 Schedules as an EV5 and supports the BWX extension.
8727 Schedules as an EV5 and supports the BWX and MAX extensions.
8731 Schedules as an EV6 and supports the BWX, FIX, and MAX
8736 Schedules as an EV6 and supports the BWX, CIX, FIX, and MAX
8740 Set only the instruction scheduling parameters for machine type
8741 CPU_TYPE. The instruction set is not changed.
8743 `-mmemory-latency=TIME'
8744 Sets the latency the scheduler should assume for typical memory
8745 references as seen by the application. This number is highly
8746 dependent on the memory access patterns used by the application
8747 and the size of the external cache on the machine.
8749 Valid options for TIME are
8752 A decimal number representing clock cycles.
8758 The compiler contains estimates of the number of clock cycles
8759 for "typical" EV4 & EV5 hardware for the Level 1, 2 & 3 caches
8760 (also called Dcache, Scache, and Bcache), as well as to main
8761 memory. Note that L3 is only valid for EV5.
8765 File: gcc.info, Node: DEC Alpha/VMS Options, Next: FRV Options, Prev: DEC Alpha Options, Up: Submodel Options
8767 3.17.9 DEC Alpha/VMS Options
8768 ----------------------------
8770 These `-m' options are defined for the DEC Alpha/VMS implementations:
8772 `-mvms-return-codes'
8773 Return VMS condition codes from main. The default is to return
8774 POSIX style condition (e.g. error) codes.
8777 File: gcc.info, Node: FRV Options, Next: GNU/Linux Options, Prev: DEC Alpha/VMS Options, Up: Submodel Options
8783 Only use the first 32 general purpose registers.
8786 Use all 64 general purpose registers.
8789 Use only the first 32 floating point registers.
8792 Use all 64 floating point registers
8795 Use hardware instructions for floating point operations.
8798 Use library routines for floating point operations.
8801 Dynamically allocate condition code registers.
8804 Do not try to dynamically allocate condition code registers, only
8805 use `icc0' and `fcc0'.
8808 Change ABI to use double word insns.
8811 Do not use double word instructions.
8814 Use floating point double instructions.
8817 Do not use floating point double instructions.
8820 Use media instructions.
8823 Do not use media instructions.
8826 Use multiply and add/subtract instructions.
8829 Do not use multiply and add/subtract instructions.
8832 Select the FDPIC ABI, that uses function descriptors to represent
8833 pointers to functions. Without any PIC/PIE-related options, it
8834 implies `-fPIE'. With `-fpic' or `-fpie', it assumes GOT entries
8835 and small data are within a 12-bit range from the GOT base
8836 address; with `-fPIC' or `-fPIE', GOT offsets are computed with 32
8840 Enable inlining of PLT entries in function calls to functions that
8841 are not known to bind locally. It has no effect without `-mfdpic'.
8842 It's enabled by default if optimizing for speed and compiling for
8843 shared libraries (i.e., `-fPIC' or `-fpic'), or when an
8844 optimization option such as `-O3' or above is present in the
8848 Assume a large TLS segment when generating thread-local code.
8851 Do not assume a large TLS segment when generating thread-local
8855 Enable the use of `GPREL' relocations in the FDPIC ABI for data
8856 that is known to be in read-only sections. It's enabled by
8857 default, except for `-fpic' or `-fpie': even though it may help
8858 make the global offset table smaller, it trades 1 instruction for
8859 4. With `-fPIC' or `-fPIE', it trades 3 instructions for 4, one
8860 of which may be shared by multiple symbols, and it avoids the need
8861 for a GOT entry for the referenced symbol, so it's more likely to
8862 be a win. If it is not, `-mno-gprel-ro' can be used to disable it.
8864 `-multilib-library-pic'
8865 Link with the (library, not FD) pic libraries. It's implied by
8866 `-mlibrary-pic', as well as by `-fPIC' and `-fpic' without
8867 `-mfdpic'. You should never have to use it explicitly.
8870 Follow the EABI requirement of always creating a frame pointer
8871 whenever a stack frame is allocated. This option is enabled by
8872 default and can be disabled with `-mno-linked-fp'.
8875 Use indirect addressing to call functions outside the current
8876 compilation unit. This allows the functions to be placed anywhere
8877 within the 32-bit address space.
8880 Try to align labels to an 8-byte boundary by inserting nops into
8881 the previous packet. This option only has an effect when VLIW
8882 packing is enabled. It doesn't create new packets; it merely adds
8883 nops to existing ones.
8886 Generate position-independent EABI code.
8889 Use only the first four media accumulator registers.
8892 Use all eight media accumulator registers.
8895 Pack VLIW instructions.
8898 Do not pack VLIW instructions.
8901 Do not mark ABI switches in e_flags.
8904 Enable the use of conditional-move instructions (default).
8906 This switch is mainly for debugging the compiler and will likely
8907 be removed in a future version.
8910 Disable the use of conditional-move instructions.
8912 This switch is mainly for debugging the compiler and will likely
8913 be removed in a future version.
8916 Enable the use of conditional set instructions (default).
8918 This switch is mainly for debugging the compiler and will likely
8919 be removed in a future version.
8922 Disable the use of conditional set instructions.
8924 This switch is mainly for debugging the compiler and will likely
8925 be removed in a future version.
8928 Enable the use of conditional execution (default).
8930 This switch is mainly for debugging the compiler and will likely
8931 be removed in a future version.
8934 Disable the use of conditional execution.
8936 This switch is mainly for debugging the compiler and will likely
8937 be removed in a future version.
8940 Run a pass to pack branches into VLIW instructions (default).
8942 This switch is mainly for debugging the compiler and will likely
8943 be removed in a future version.
8946 Do not run a pass to pack branches into VLIW instructions.
8948 This switch is mainly for debugging the compiler and will likely
8949 be removed in a future version.
8952 Enable optimization of `&&' and `||' in conditional execution
8955 This switch is mainly for debugging the compiler and will likely
8956 be removed in a future version.
8958 `-mno-multi-cond-exec'
8959 Disable optimization of `&&' and `||' in conditional execution.
8961 This switch is mainly for debugging the compiler and will likely
8962 be removed in a future version.
8964 `-mnested-cond-exec'
8965 Enable nested conditional execution optimizations (default).
8967 This switch is mainly for debugging the compiler and will likely
8968 be removed in a future version.
8970 `-mno-nested-cond-exec'
8971 Disable nested conditional execution optimizations.
8973 This switch is mainly for debugging the compiler and will likely
8974 be removed in a future version.
8977 This switch removes redundant `membar' instructions from the
8978 compiler generated code. It is enabled by default.
8980 `-mno-optimize-membar'
8981 This switch disables the automatic removal of redundant `membar'
8982 instructions from the generated code.
8985 Cause gas to print out tomcat statistics.
8988 Select the processor type for which to generate code. Possible
8989 values are `frv', `fr550', `tomcat', `fr500', `fr450', `fr405',
8990 `fr400', `fr300' and `simple'.
8994 File: gcc.info, Node: GNU/Linux Options, Next: H8/300 Options, Prev: FRV Options, Up: Submodel Options
8996 3.17.11 GNU/Linux Options
8997 -------------------------
8999 These `-m' options are defined for GNU/Linux targets:
9002 Use the GNU C library instead of uClibc. This is the default
9003 except on `*-*-linux-*uclibc*' targets.
9006 Use uClibc instead of the GNU C library. This is the default on
9007 `*-*-linux-*uclibc*' targets.
9010 File: gcc.info, Node: H8/300 Options, Next: HPPA Options, Prev: GNU/Linux Options, Up: Submodel Options
9012 3.17.12 H8/300 Options
9013 ----------------------
9015 These `-m' options are defined for the H8/300 implementations:
9018 Shorten some address references at link time, when possible; uses
9019 the linker option `-relax'. *Note `ld' and the H8/300:
9020 (ld)H8/300, for a fuller description.
9023 Generate code for the H8/300H.
9026 Generate code for the H8S.
9029 Generate code for the H8S and H8/300H in the normal mode. This
9030 switch must be used either with `-mh' or `-ms'.
9033 Generate code for the H8S/2600. This switch must be used with
9037 Make `int' data 32 bits by default.
9040 On the H8/300H and H8S, use the same alignment rules as for the
9041 H8/300. The default for the H8/300H and H8S is to align longs and
9042 floats on 4 byte boundaries. `-malign-300' causes them to be
9043 aligned on 2 byte boundaries. This option has no effect on the
9047 File: gcc.info, Node: HPPA Options, Next: i386 and x86-64 Options, Prev: H8/300 Options, Up: Submodel Options
9049 3.17.13 HPPA Options
9050 --------------------
9052 These `-m' options are defined for the HPPA family of computers:
9054 `-march=ARCHITECTURE-TYPE'
9055 Generate code for the specified architecture. The choices for
9056 ARCHITECTURE-TYPE are `1.0' for PA 1.0, `1.1' for PA 1.1, and
9057 `2.0' for PA 2.0 processors. Refer to `/usr/lib/sched.models' on
9058 an HP-UX system to determine the proper architecture option for
9059 your machine. Code compiled for lower numbered architectures will
9060 run on higher numbered architectures, but not the other way around.
9065 Synonyms for `-march=1.0', `-march=1.1', and `-march=2.0'
9069 Generate code suitable for big switch tables. Use this option
9070 only if the assembler/linker complain about out of range branches
9071 within a switch table.
9074 Fill delay slots of function calls with unconditional jump
9075 instructions by modifying the return pointer for the function call
9076 to be the target of the conditional jump.
9079 Prevent floating point registers from being used in any manner.
9080 This is necessary for compiling kernels which perform lazy context
9081 switching of floating point registers. If you use this option and
9082 attempt to perform floating point operations, the compiler will
9085 `-mdisable-indexing'
9086 Prevent the compiler from using indexing address modes. This
9087 avoids some rather obscure problems when compiling MIG generated
9091 Generate code that assumes the target has no space registers.
9092 This allows GCC to generate faster indirect calls and use unscaled
9093 index address modes.
9095 Such code is suitable for level 0 PA systems and kernels.
9097 `-mfast-indirect-calls'
9098 Generate code that assumes calls never cross space boundaries.
9099 This allows GCC to emit code which performs faster indirect calls.
9101 This option will not work in the presence of shared libraries or
9104 `-mfixed-range=REGISTER-RANGE'
9105 Generate code treating the given register range as fixed registers.
9106 A fixed register is one that the register allocator can not use.
9107 This is useful when compiling kernel code. A register range is
9108 specified as two registers separated by a dash. Multiple register
9109 ranges can be specified separated by a comma.
9112 Generate 3-instruction load and store sequences as sometimes
9113 required by the HP-UX 10 linker. This is equivalent to the `+k'
9114 option to the HP compilers.
9116 `-mportable-runtime'
9117 Use the portable calling conventions proposed by HP for ELF
9121 Enable the use of assembler directives only GAS understands.
9123 `-mschedule=CPU-TYPE'
9124 Schedule code according to the constraints for the machine type
9125 CPU-TYPE. The choices for CPU-TYPE are `700' `7100', `7100LC',
9126 `7200', `7300' and `8000'. Refer to `/usr/lib/sched.models' on an
9127 HP-UX system to determine the proper scheduling option for your
9128 machine. The default scheduling is `8000'.
9131 Enable the optimization pass in the HP-UX linker. Note this makes
9132 symbolic debugging impossible. It also triggers a bug in the
9133 HP-UX 8 and HP-UX 9 linkers in which they give bogus error
9134 messages when linking some programs.
9137 Generate output containing library calls for floating point.
9138 *Warning:* the requisite libraries are not available for all HPPA
9139 targets. Normally the facilities of the machine's usual C
9140 compiler are used, but this cannot be done directly in
9141 cross-compilation. You must make your own arrangements to provide
9142 suitable library functions for cross-compilation. The embedded
9143 target `hppa1.1-*-pro' does provide software floating point
9146 `-msoft-float' changes the calling convention in the output file;
9147 therefore, it is only useful if you compile _all_ of a program with
9148 this option. In particular, you need to compile `libgcc.a', the
9149 library that comes with GCC, with `-msoft-float' in order for this
9153 Generate the predefine, `_SIO', for server IO. The default is
9154 `-mwsio'. This generates the predefines, `__hp9000s700',
9155 `__hp9000s700__' and `_WSIO', for workstation IO. These options
9156 are available under HP-UX and HI-UX.
9159 Use GNU ld specific options. This passes `-shared' to ld when
9160 building a shared library. It is the default when GCC is
9161 configured, explicitly or implicitly, with the GNU linker. This
9162 option does not have any affect on which ld is called, it only
9163 changes what parameters are passed to that ld. The ld that is
9164 called is determined by the `--with-ld' configure option, GCC's
9165 program search path, and finally by the user's `PATH'. The linker
9166 used by GCC can be printed using `which `gcc
9167 -print-prog-name=ld`'. This option is only available on the 64
9168 bit HP-UX GCC, i.e. configured with `hppa*64*-*-hpux*'.
9171 Use HP ld specific options. This passes `-b' to ld when building
9172 a shared library and passes `+Accept TypeMismatch' to ld on all
9173 links. It is the default when GCC is configured, explicitly or
9174 implicitly, with the HP linker. This option does not have any
9175 affect on which ld is called, it only changes what parameters are
9176 passed to that ld. The ld that is called is determined by the
9177 `--with-ld' configure option, GCC's program search path, and
9178 finally by the user's `PATH'. The linker used by GCC can be
9179 printed using `which `gcc -print-prog-name=ld`'. This option is
9180 only available on the 64 bit HP-UX GCC, i.e. configured with
9184 Generate code that uses long call sequences. This ensures that a
9185 call is always able to reach linker generated stubs. The default
9186 is to generate long calls only when the distance from the call
9187 site to the beginning of the function or translation unit, as the
9188 case may be, exceeds a predefined limit set by the branch type
9189 being used. The limits for normal calls are 7,600,000 and 240,000
9190 bytes, respectively for the PA 2.0 and PA 1.X architectures.
9191 Sibcalls are always limited at 240,000 bytes.
9193 Distances are measured from the beginning of functions when using
9194 the `-ffunction-sections' option, or when using the `-mgas' and
9195 `-mno-portable-runtime' options together under HP-UX with the SOM
9198 It is normally not desirable to use this option as it will degrade
9199 performance. However, it may be useful in large applications,
9200 particularly when partial linking is used to build the application.
9202 The types of long calls used depends on the capabilities of the
9203 assembler and linker, and the type of code being generated. The
9204 impact on systems that support long absolute calls, and long pic
9205 symbol-difference or pc-relative calls should be relatively small.
9206 However, an indirect call is used on 32-bit ELF systems in pic code
9207 and it is quite long.
9210 Generate compiler predefines and select a startfile for the
9211 specified UNIX standard. The choices for UNIX-STD are `93', `95'
9212 and `98'. `93' is supported on all HP-UX versions. `95' is
9213 available on HP-UX 10.10 and later. `98' is available on HP-UX
9214 11.11 and later. The default values are `93' for HP-UX 10.00,
9215 `95' for HP-UX 10.10 though to 11.00, and `98' for HP-UX 11.11 and
9218 `-munix=93' provides the same predefines as GCC 3.3 and 3.4.
9219 `-munix=95' provides additional predefines for `XOPEN_UNIX' and
9220 `_XOPEN_SOURCE_EXTENDED', and the startfile `unix95.o'.
9221 `-munix=98' provides additional predefines for `_XOPEN_UNIX',
9222 `_XOPEN_SOURCE_EXTENDED', `_INCLUDE__STDC_A1_SOURCE' and
9223 `_INCLUDE_XOPEN_SOURCE_500', and the startfile `unix98.o'.
9225 It is _important_ to note that this option changes the interfaces
9226 for various library routines. It also affects the operational
9227 behavior of the C library. Thus, _extreme_ care is needed in
9230 Library code that is intended to operate with more than one UNIX
9231 standard must test, set and restore the variable
9232 __XPG4_EXTENDED_MASK as appropriate. Most GNU software doesn't
9233 provide this capability.
9236 Suppress the generation of link options to search libdld.sl when
9237 the `-static' option is specified on HP-UX 10 and later.
9240 The HP-UX implementation of setlocale in libc has a dependency on
9241 libdld.sl. There isn't an archive version of libdld.sl. Thus,
9242 when the `-static' option is specified, special link options are
9243 needed to resolve this dependency.
9245 On HP-UX 10 and later, the GCC driver adds the necessary options to
9246 link with libdld.sl when the `-static' option is specified. This
9247 causes the resulting binary to be dynamic. On the 64-bit port,
9248 the linkers generate dynamic binaries by default in any case. The
9249 `-nolibdld' option can be used to prevent the GCC driver from
9250 adding these link options.
9253 Add support for multithreading with the "dce thread" library under
9254 HP-UX. This option sets flags for both the preprocessor and
9258 File: gcc.info, Node: i386 and x86-64 Options, Next: IA-64 Options, Prev: HPPA Options, Up: Submodel Options
9260 3.17.14 Intel 386 and AMD x86-64 Options
9261 ----------------------------------------
9263 These `-m' options are defined for the i386 and x86-64 family of
9267 Tune to CPU-TYPE everything applicable about the generated code,
9268 except for the ABI and the set of available instructions. The
9269 choices for CPU-TYPE are:
9271 Produce code optimized for the most common IA32/AMD64/EM64T
9272 processors. If you know the CPU on which your code will run,
9273 then you should use the corresponding `-mtune' option instead
9274 of `-mtune=generic'. But, if you do not know exactly what
9275 CPU users of your application will have, then you should use
9278 As new processors are deployed in the marketplace, the
9279 behavior of this option will change. Therefore, if you
9280 upgrade to a newer version of GCC, the code generated option
9281 will change to reflect the processors that were most common
9282 when that version of GCC was released.
9284 There is no `-march=generic' option because `-march'
9285 indicates the instruction set the compiler can use, and there
9286 is no generic instruction set applicable to all processors.
9287 In contrast, `-mtune' indicates the processor (or, in this
9288 case, collection of processors) for which the code is
9292 This selects the CPU to tune for at compilation time by
9293 determining the processor type of the compiling machine.
9294 Using `-mtune=native' will produce code optimized for the
9295 local machine under the constraints of the selected
9296 instruction set. Using `-march=native' will enable all
9297 instruction subsets supported by the local machine (hence the
9298 result might not run on different machines).
9301 Original Intel's i386 CPU.
9304 Intel's i486 CPU. (No scheduling is implemented for this
9308 Intel Pentium CPU with no MMX support.
9311 Intel PentiumMMX CPU based on Pentium core with MMX
9312 instruction set support.
9315 Intel PentiumPro CPU.
9318 Same as `generic', but when used as `march' option, PentiumPro
9319 instruction set will be used, so the code will run on all
9323 Intel Pentium2 CPU based on PentiumPro core with MMX
9324 instruction set support.
9326 _pentium3, pentium3m_
9327 Intel Pentium3 CPU based on PentiumPro core with MMX and SSE
9328 instruction set support.
9331 Low power version of Intel Pentium3 CPU with MMX, SSE and
9332 SSE2 instruction set support. Used by Centrino notebooks.
9334 _pentium4, pentium4m_
9335 Intel Pentium4 CPU with MMX, SSE and SSE2 instruction set
9339 Improved version of Intel Pentium4 CPU with MMX, SSE, SSE2
9340 and SSE3 instruction set support.
9343 Improved version of Intel Pentium4 CPU with 64-bit
9344 extensions, MMX, SSE, SSE2 and SSE3 instruction set support.
9347 AMD K6 CPU with MMX instruction set support.
9350 Improved versions of AMD K6 CPU with MMX and 3dNOW!
9351 instruction set support.
9353 _athlon, athlon-tbird_
9354 AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW! and SSE
9355 prefetch instructions support.
9357 _athlon-4, athlon-xp, athlon-mp_
9358 Improved AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW! and
9359 full SSE instruction set support.
9361 _k8, opteron, athlon64, athlon-fx_
9362 AMD K8 core based CPUs with x86-64 instruction set support.
9363 (This supersets MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW! and
9364 64-bit instruction set extensions.)
9367 IDT Winchip C6 CPU, dealt in same way as i486 with additional
9368 MMX instruction set support.
9371 IDT Winchip2 CPU, dealt in same way as i486 with additional
9372 MMX and 3dNOW! instruction set support.
9375 Via C3 CPU with MMX and 3dNOW! instruction set support. (No
9376 scheduling is implemented for this chip.)
9379 Via C3-2 CPU with MMX and SSE instruction set support. (No
9380 scheduling is implemented for this chip.)
9382 While picking a specific CPU-TYPE will schedule things
9383 appropriately for that particular chip, the compiler will not
9384 generate any code that does not run on the i386 without the
9385 `-march=CPU-TYPE' option being used.
9388 Generate instructions for the machine type CPU-TYPE. The choices
9389 for CPU-TYPE are the same as for `-mtune'. Moreover, specifying
9390 `-march=CPU-TYPE' implies `-mtune=CPU-TYPE'.
9393 A deprecated synonym for `-mtune'.
9399 These options are synonyms for `-mtune=i386', `-mtune=i486',
9400 `-mtune=pentium', and `-mtune=pentiumpro' respectively. These
9401 synonyms are deprecated.
9404 Generate floating point arithmetics for selected unit UNIT. The
9405 choices for UNIT are:
9408 Use the standard 387 floating point coprocessor present
9409 majority of chips and emulated otherwise. Code compiled with
9410 this option will run almost everywhere. The temporary
9411 results are computed in 80bit precision instead of precision
9412 specified by the type resulting in slightly different results
9413 compared to most of other chips. See `-ffloat-store' for
9414 more detailed description.
9416 This is the default choice for i386 compiler.
9419 Use scalar floating point instructions present in the SSE
9420 instruction set. This instruction set is supported by
9421 Pentium3 and newer chips, in the AMD line by Athlon-4,
9422 Athlon-xp and Athlon-mp chips. The earlier version of SSE
9423 instruction set supports only single precision arithmetics,
9424 thus the double and extended precision arithmetics is still
9425 done using 387. Later version, present only in Pentium4 and
9426 the future AMD x86-64 chips supports double precision
9429 For the i386 compiler, you need to use `-march=CPU-TYPE',
9430 `-msse' or `-msse2' switches to enable SSE extensions and
9431 make this option effective. For the x86-64 compiler, these
9432 extensions are enabled by default.
9434 The resulting code should be considerably faster in the
9435 majority of cases and avoid the numerical instability
9436 problems of 387 code, but may break some existing code that
9437 expects temporaries to be 80bit.
9439 This is the default choice for the x86-64 compiler.
9442 Attempt to utilize both instruction sets at once. This
9443 effectively double the amount of available registers and on
9444 chips with separate execution units for 387 and SSE the
9445 execution resources too. Use this option with care, as it is
9446 still experimental, because the GCC register allocator does
9447 not model separate functional units well resulting in
9448 instable performance.
9451 Output asm instructions using selected DIALECT. Supported choices
9452 are `intel' or `att' (the default one). Darwin does not support
9457 Control whether or not the compiler uses IEEE floating point
9458 comparisons. These handle correctly the case where the result of a
9459 comparison is unordered.
9462 Generate output containing library calls for floating point.
9463 *Warning:* the requisite libraries are not part of GCC. Normally
9464 the facilities of the machine's usual C compiler are used, but
9465 this can't be done directly in cross-compilation. You must make
9466 your own arrangements to provide suitable library functions for
9469 On machines where a function returns floating point results in the
9470 80387 register stack, some floating point opcodes may be emitted
9471 even if `-msoft-float' is used.
9473 `-mno-fp-ret-in-387'
9474 Do not use the FPU registers for return values of functions.
9476 The usual calling convention has functions return values of types
9477 `float' and `double' in an FPU register, even if there is no FPU.
9478 The idea is that the operating system should emulate an FPU.
9480 The option `-mno-fp-ret-in-387' causes such values to be returned
9481 in ordinary CPU registers instead.
9483 `-mno-fancy-math-387'
9484 Some 387 emulators do not support the `sin', `cos' and `sqrt'
9485 instructions for the 387. Specify this option to avoid generating
9486 those instructions. This option is the default on FreeBSD,
9487 OpenBSD and NetBSD. This option is overridden when `-march'
9488 indicates that the target cpu will always have an FPU and so the
9489 instruction will not need emulation. As of revision 2.6.1, these
9490 instructions are not generated unless you also use the
9491 `-funsafe-math-optimizations' switch.
9495 Control whether GCC aligns `double', `long double', and `long
9496 long' variables on a two word boundary or a one word boundary.
9497 Aligning `double' variables on a two word boundary will produce
9498 code that runs somewhat faster on a `Pentium' at the expense of
9501 On x86-64, `-malign-double' is enabled by default.
9503 *Warning:* if you use the `-malign-double' switch, structures
9504 containing the above types will be aligned differently than the
9505 published application binary interface specifications for the 386
9506 and will not be binary compatible with structures in code compiled
9507 without that switch.
9509 `-m96bit-long-double'
9510 `-m128bit-long-double'
9511 These switches control the size of `long double' type. The i386
9512 application binary interface specifies the size to be 96 bits, so
9513 `-m96bit-long-double' is the default in 32 bit mode.
9515 Modern architectures (Pentium and newer) would prefer `long double'
9516 to be aligned to an 8 or 16 byte boundary. In arrays or structures
9517 conforming to the ABI, this would not be possible. So specifying a
9518 `-m128bit-long-double' will align `long double' to a 16 byte
9519 boundary by padding the `long double' with an additional 32 bit
9522 In the x86-64 compiler, `-m128bit-long-double' is the default
9523 choice as its ABI specifies that `long double' is to be aligned on
9526 Notice that neither of these options enable any extra precision
9527 over the x87 standard of 80 bits for a `long double'.
9529 *Warning:* if you override the default value for your target ABI,
9530 the structures and arrays containing `long double' variables will
9531 change their size as well as function calling convention for
9532 function taking `long double' will be modified. Hence they will
9533 not be binary compatible with arrays or structures in code
9534 compiled without that switch.
9536 `-mmlarge-data-threshold=NUMBER'
9537 When `-mcmodel=medium' is specified, the data greater than
9538 THRESHOLD are placed in large data section. This value must be the
9539 same across all object linked into the binary and defaults to
9544 Control whether GCC places uninitialized local variables into the
9545 `bss' or `data' segments. `-msvr3-shlib' places them into `bss'.
9546 These options are meaningful only on System V Release 3.
9549 Use a different function-calling convention, in which functions
9550 that take a fixed number of arguments return with the `ret' NUM
9551 instruction, which pops their arguments while returning. This
9552 saves one instruction in the caller since there is no need to pop
9553 the arguments there.
9555 You can specify that an individual function is called with this
9556 calling sequence with the function attribute `stdcall'. You can
9557 also override the `-mrtd' option by using the function attribute
9558 `cdecl'. *Note Function Attributes::.
9560 *Warning:* this calling convention is incompatible with the one
9561 normally used on Unix, so you cannot use it if you need to call
9562 libraries compiled with the Unix compiler.
9564 Also, you must provide function prototypes for all functions that
9565 take variable numbers of arguments (including `printf'); otherwise
9566 incorrect code will be generated for calls to those functions.
9568 In addition, seriously incorrect code will result if you call a
9569 function with too many arguments. (Normally, extra arguments are
9570 harmlessly ignored.)
9573 Control how many registers are used to pass integer arguments. By
9574 default, no registers are used to pass arguments, and at most 3
9575 registers can be used. You can control this behavior for a
9576 specific function by using the function attribute `regparm'.
9577 *Note Function Attributes::.
9579 *Warning:* if you use this switch, and NUM is nonzero, then you
9580 must build all modules with the same value, including any
9581 libraries. This includes the system libraries and startup modules.
9584 Use SSE register passing conventions for float and double arguments
9585 and return values. You can control this behavior for a specific
9586 function by using the function attribute `sseregparm'. *Note
9587 Function Attributes::.
9589 *Warning:* if you use this switch then you must build all modules
9590 with the same value, including any libraries. This includes the
9591 system libraries and startup modules.
9594 Realign the stack at entry. On the Intel x86, the
9595 `-mstackrealign' option will generate an alternate prologue and
9596 epilogue that realigns the runtime stack. This supports mixing
9597 legacy codes that keep a 4-byte aligned stack with modern codes
9598 that keep a 16-byte stack for SSE compatibility. The alternate
9599 prologue and epilogue are slower and bigger than the regular ones,
9600 and the alternate prologue requires an extra scratch register;
9601 this lowers the number of registers available if used in
9602 conjunction with the `regparm' attribute. The `-mstackrealign'
9603 option is incompatible with the nested function prologue; this is
9604 considered a hard error. See also the attribute
9605 `force_align_arg_pointer', applicable to individual functions.
9607 `-mpreferred-stack-boundary=NUM'
9608 Attempt to keep the stack boundary aligned to a 2 raised to NUM
9609 byte boundary. If `-mpreferred-stack-boundary' is not specified,
9610 the default is 4 (16 bytes or 128 bits).
9612 On Pentium and PentiumPro, `double' and `long double' values
9613 should be aligned to an 8 byte boundary (see `-malign-double') or
9614 suffer significant run time performance penalties. On Pentium
9615 III, the Streaming SIMD Extension (SSE) data type `__m128' may not
9616 work properly if it is not 16 byte aligned.
9618 To ensure proper alignment of this values on the stack, the stack
9619 boundary must be as aligned as that required by any value stored
9620 on the stack. Further, every function must be generated such that
9621 it keeps the stack aligned. Thus calling a function compiled with
9622 a higher preferred stack boundary from a function compiled with a
9623 lower preferred stack boundary will most likely misalign the
9624 stack. It is recommended that libraries that use callbacks always
9625 use the default setting.
9627 This extra alignment does consume extra stack space, and generally
9628 increases code size. Code that is sensitive to stack space usage,
9629 such as embedded systems and operating system kernels, may want to
9630 reduce the preferred alignment to `-mpreferred-stack-boundary=2'.
9646 These switches enable or disable the use of instructions in the
9647 MMX, SSE, SSE2 or 3DNow! extended instruction sets. These
9648 extensions are also available as built-in functions: see *Note X86
9649 Built-in Functions::, for details of the functions enabled and
9650 disabled by these switches.
9652 To have SSE/SSE2 instructions generated automatically from
9653 floating-point code (as opposed to 387 instructions), see
9656 These options will enable GCC to use these extended instructions in
9657 generated code, even without `-mfpmath=sse'. Applications which
9658 perform runtime CPU detection must compile separate files for each
9659 supported architecture, using the appropriate flags. In
9660 particular, the file containing the CPU detection code should be
9661 compiled without these options.
9665 Use PUSH operations to store outgoing parameters. This method is
9666 shorter and usually equally fast as method using SUB/MOV
9667 operations and is enabled by default. In some cases disabling it
9668 may improve performance because of improved scheduling and reduced
9671 `-maccumulate-outgoing-args'
9672 If enabled, the maximum amount of space required for outgoing
9673 arguments will be computed in the function prologue. This is
9674 faster on most modern CPUs because of reduced dependencies,
9675 improved scheduling and reduced stack usage when preferred stack
9676 boundary is not equal to 2. The drawback is a notable increase in
9677 code size. This switch implies `-mno-push-args'.
9680 Support thread-safe exception handling on `Mingw32'. Code that
9681 relies on thread-safe exception handling must compile and link all
9682 code with the `-mthreads' option. When compiling, `-mthreads'
9683 defines `-D_MT'; when linking, it links in a special thread helper
9684 library `-lmingwthrd' which cleans up per thread exception
9687 `-mno-align-stringops'
9688 Do not align destination of inlined string operations. This
9689 switch reduces code size and improves performance in case the
9690 destination is already aligned, but GCC doesn't know about it.
9692 `-minline-all-stringops'
9693 By default GCC inlines string operations only when destination is
9694 known to be aligned at least to 4 byte boundary. This enables
9695 more inlining, increase code size, but may improve performance of
9696 code that depends on fast memcpy, strlen and memset for short
9699 `-momit-leaf-frame-pointer'
9700 Don't keep the frame pointer in a register for leaf functions.
9701 This avoids the instructions to save, set up and restore frame
9702 pointers and makes an extra register available in leaf functions.
9703 The option `-fomit-frame-pointer' removes the frame pointer for
9704 all functions which might make debugging harder.
9706 `-mtls-direct-seg-refs'
9707 `-mno-tls-direct-seg-refs'
9708 Controls whether TLS variables may be accessed with offsets from
9709 the TLS segment register (`%gs' for 32-bit, `%fs' for 64-bit), or
9710 whether the thread base pointer must be added. Whether or not this
9711 is legal depends on the operating system, and whether it maps the
9712 segment to cover the entire TLS area.
9714 For systems that use GNU libc, the default is on.
9716 These `-m' switches are supported in addition to the above on AMD
9717 x86-64 processors in 64-bit environments.
9721 Generate code for a 32-bit or 64-bit environment. The 32-bit
9722 environment sets int, long and pointer to 32 bits and generates
9723 code that runs on any i386 system. The 64-bit environment sets
9724 int to 32 bits and long and pointer to 64 bits and generates code
9725 for AMD's x86-64 architecture. For darwin only the -m64 option
9726 turns off the `-fno-pic' and `-mdynamic-no-pic' options.
9729 Do not use a so called red zone for x86-64 code. The red zone is
9730 mandated by the x86-64 ABI, it is a 128-byte area beyond the
9731 location of the stack pointer that will not be modified by signal
9732 or interrupt handlers and therefore can be used for temporary data
9733 without adjusting the stack pointer. The flag `-mno-red-zone'
9734 disables this red zone.
9737 Generate code for the small code model: the program and its
9738 symbols must be linked in the lower 2 GB of the address space.
9739 Pointers are 64 bits. Programs can be statically or dynamically
9740 linked. This is the default code model.
9743 Generate code for the kernel code model. The kernel runs in the
9744 negative 2 GB of the address space. This model has to be used for
9748 Generate code for the medium model: The program is linked in the
9749 lower 2 GB of the address space but symbols can be located
9750 anywhere in the address space. Programs can be statically or
9751 dynamically linked, but building of shared libraries are not
9752 supported with the medium model.
9755 Generate code for the large model: This model makes no assumptions
9756 about addresses and sizes of sections. Currently GCC does not
9757 implement this model.
9760 File: gcc.info, Node: IA-64 Options, Next: M32C Options, Prev: i386 and x86-64 Options, Up: Submodel Options
9762 3.17.15 IA-64 Options
9763 ---------------------
9765 These are the `-m' options defined for the Intel IA-64 architecture.
9768 Generate code for a big endian target. This is the default for
9772 Generate code for a little endian target. This is the default for
9777 Generate (or don't) code for the GNU assembler. This is the
9782 Generate (or don't) code for the GNU linker. This is the default.
9785 Generate code that does not use a global pointer register. The
9786 result is not position independent code, and violates the IA-64
9789 `-mvolatile-asm-stop'
9790 `-mno-volatile-asm-stop'
9791 Generate (or don't) a stop bit immediately before and after
9792 volatile asm statements.
9795 `-mno-register-names'
9796 Generate (or don't) `in', `loc', and `out' register names for the
9797 stacked registers. This may make assembler output more readable.
9801 Disable (or enable) optimizations that use the small data section.
9802 This may be useful for working around optimizer bugs.
9805 Generate code that uses a single constant global pointer value.
9806 This is useful when compiling kernel code.
9809 Generate code that is self-relocatable. This implies
9810 `-mconstant-gp'. This is useful when compiling firmware code.
9812 `-minline-float-divide-min-latency'
9813 Generate code for inline divides of floating point values using
9814 the minimum latency algorithm.
9816 `-minline-float-divide-max-throughput'
9817 Generate code for inline divides of floating point values using
9818 the maximum throughput algorithm.
9820 `-minline-int-divide-min-latency'
9821 Generate code for inline divides of integer values using the
9822 minimum latency algorithm.
9824 `-minline-int-divide-max-throughput'
9825 Generate code for inline divides of integer values using the
9826 maximum throughput algorithm.
9828 `-minline-sqrt-min-latency'
9829 Generate code for inline square roots using the minimum latency
9832 `-minline-sqrt-max-throughput'
9833 Generate code for inline square roots using the maximum throughput
9838 Don't (or do) generate assembler code for the DWARF2 line number
9839 debugging info. This may be useful when not using the GNU
9843 `-mno-early-stop-bits'
9844 Allow stop bits to be placed earlier than immediately preceding the
9845 instruction that triggered the stop bit. This can improve
9846 instruction scheduling, but does not always do so.
9848 `-mfixed-range=REGISTER-RANGE'
9849 Generate code treating the given register range as fixed registers.
9850 A fixed register is one that the register allocator can not use.
9851 This is useful when compiling kernel code. A register range is
9852 specified as two registers separated by a dash. Multiple register
9853 ranges can be specified separated by a comma.
9855 `-mtls-size=TLS-SIZE'
9856 Specify bit size of immediate TLS offsets. Valid values are 14,
9860 Tune the instruction scheduling for a particular CPU, Valid values
9861 are itanium, itanium1, merced, itanium2, and mckinley.
9865 Add support for multithreading using the POSIX threads library.
9866 This option sets flags for both the preprocessor and linker. It
9867 does not affect the thread safety of object code produced by the
9868 compiler or that of libraries supplied with it. These are HP-UX
9873 Generate code for a 32-bit or 64-bit environment. The 32-bit
9874 environment sets int, long and pointer to 32 bits. The 64-bit
9875 environment sets int to 32 bits and long and pointer to 64 bits.
9876 These are HP-UX specific flags.
9878 `-mno-sched-br-data-spec'
9879 `-msched-br-data-spec'
9880 (Dis/En)able data speculative scheduling before reload. This will
9881 result in generation of the ld.a instructions and the
9882 corresponding check instructions (ld.c / chk.a). The default is
9885 `-msched-ar-data-spec'
9886 `-mno-sched-ar-data-spec'
9887 (En/Dis)able data speculative scheduling after reload. This will
9888 result in generation of the ld.a instructions and the
9889 corresponding check instructions (ld.c / chk.a). The default is
9892 `-mno-sched-control-spec'
9893 `-msched-control-spec'
9894 (Dis/En)able control speculative scheduling. This feature is
9895 available only during region scheduling (i.e. before reload).
9896 This will result in generation of the ld.s instructions and the
9897 corresponding check instructions chk.s . The default is 'disable'.
9899 `-msched-br-in-data-spec'
9900 `-mno-sched-br-in-data-spec'
9901 (En/Dis)able speculative scheduling of the instructions that are
9902 dependent on the data speculative loads before reload. This is
9903 effective only with `-msched-br-data-spec' enabled. The default
9906 `-msched-ar-in-data-spec'
9907 `-mno-sched-ar-in-data-spec'
9908 (En/Dis)able speculative scheduling of the instructions that are
9909 dependent on the data speculative loads after reload. This is
9910 effective only with `-msched-ar-data-spec' enabled. The default
9913 `-msched-in-control-spec'
9914 `-mno-sched-in-control-spec'
9915 (En/Dis)able speculative scheduling of the instructions that are
9916 dependent on the control speculative loads. This is effective
9917 only with `-msched-control-spec' enabled. The default is 'enable'.
9921 (En/Dis)able use of simple data speculation checks ld.c . If
9922 disabled, only chk.a instructions will be emitted to check data
9923 speculative loads. The default is 'enable'.
9925 `-mno-sched-control-ldc'
9926 `-msched-control-ldc'
9927 (Dis/En)able use of ld.c instructions to check control speculative
9928 loads. If enabled, in case of control speculative load with no
9929 speculatively scheduled dependent instructions this load will be
9930 emitted as ld.sa and ld.c will be used to check it. The default
9933 `-mno-sched-spec-verbose'
9934 `-msched-spec-verbose'
9935 (Dis/En)able printing of the information about speculative motions.
9937 `-mno-sched-prefer-non-data-spec-insns'
9938 `-msched-prefer-non-data-spec-insns'
9939 If enabled, data speculative instructions will be chosen for
9940 schedule only if there are no other choices at the moment. This
9941 will make the use of the data speculation much more conservative.
9942 The default is 'disable'.
9944 `-mno-sched-prefer-non-control-spec-insns'
9945 `-msched-prefer-non-control-spec-insns'
9946 If enabled, control speculative instructions will be chosen for
9947 schedule only if there are no other choices at the moment. This
9948 will make the use of the control speculation much more
9949 conservative. The default is 'disable'.
9951 `-mno-sched-count-spec-in-critical-path'
9952 `-msched-count-spec-in-critical-path'
9953 If enabled, speculative dependencies will be considered during
9954 computation of the instructions priorities. This will make the
9955 use of the speculation a bit more conservative. The default is
9960 File: gcc.info, Node: M32C Options, Next: M32R/D Options, Prev: IA-64 Options, Up: Submodel Options
9962 3.17.16 M32C Options
9963 --------------------
9966 Select the CPU for which code is generated. NAME may be one of
9967 `r8c' for the R8C/Tiny series, `m16c' for the M16C (up to /60)
9968 series, `m32cm' for the M16C/80 series, or `m32c' for the M32C/80
9972 Specifies that the program will be run on the simulator. This
9973 causes an alternate runtime library to be linked in which
9974 supports, for example, file I/O. You must not use this option
9975 when generating programs that will run on real hardware; you must
9976 provide your own runtime library for whatever I/O functions are
9980 Specifies the number of memory-based pseudo-registers GCC will use
9981 during code generation. These pseudo-registers will be used like
9982 real registers, so there is a tradeoff between GCC's ability to
9983 fit the code into available registers, and the performance penalty
9984 of using memory instead of registers. Note that all modules in a
9985 program must be compiled with the same value for this option.
9986 Because of that, you must not use this option with the default
9987 runtime libraries gcc builds.
9991 File: gcc.info, Node: M32R/D Options, Next: M680x0 Options, Prev: M32C Options, Up: Submodel Options
9993 3.17.17 M32R/D Options
9994 ----------------------
9996 These `-m' options are defined for Renesas M32R/D architectures:
9999 Generate code for the M32R/2.
10002 Generate code for the M32R/X.
10005 Generate code for the M32R. This is the default.
10008 Assume all objects live in the lower 16MB of memory (so that their
10009 addresses can be loaded with the `ld24' instruction), and assume
10010 all subroutines are reachable with the `bl' instruction. This is
10013 The addressability of a particular object can be set with the
10017 Assume objects may be anywhere in the 32-bit address space (the
10018 compiler will generate `seth/add3' instructions to load their
10019 addresses), and assume all subroutines are reachable with the `bl'
10023 Assume objects may be anywhere in the 32-bit address space (the
10024 compiler will generate `seth/add3' instructions to load their
10025 addresses), and assume subroutines may not be reachable with the
10026 `bl' instruction (the compiler will generate the much slower
10027 `seth/add3/jl' instruction sequence).
10030 Disable use of the small data area. Variables will be put into
10031 one of `.data', `bss', or `.rodata' (unless the `section'
10032 attribute has been specified). This is the default.
10034 The small data area consists of sections `.sdata' and `.sbss'.
10035 Objects may be explicitly put in the small data area with the
10036 `section' attribute using one of these sections.
10039 Put small global and static data in the small data area, but do not
10040 generate special code to reference them.
10043 Put small global and static data in the small data area, and
10044 generate special instructions to reference them.
10047 Put global and static objects less than or equal to NUM bytes into
10048 the small data or bss sections instead of the normal data or bss
10049 sections. The default value of NUM is 8. The `-msdata' option
10050 must be set to one of `sdata' or `use' for this option to have any
10053 All modules should be compiled with the same `-G NUM' value.
10054 Compiling with different values of NUM may or may not work; if it
10055 doesn't the linker will give an error message--incorrect code will
10059 Makes the M32R specific code in the compiler display some
10060 statistics that might help in debugging programs.
10063 Align all loops to a 32-byte boundary.
10066 Do not enforce a 32-byte alignment for loops. This is the default.
10068 `-missue-rate=NUMBER'
10069 Issue NUMBER instructions per cycle. NUMBER can only be 1 or 2.
10071 `-mbranch-cost=NUMBER'
10072 NUMBER can only be 1 or 2. If it is 1 then branches will be
10073 preferred over conditional code, if it is 2, then the opposite will
10076 `-mflush-trap=NUMBER'
10077 Specifies the trap number to use to flush the cache. The default
10078 is 12. Valid numbers are between 0 and 15 inclusive.
10081 Specifies that the cache cannot be flushed by using a trap.
10083 `-mflush-func=NAME'
10084 Specifies the name of the operating system function to call to
10085 flush the cache. The default is __flush_cache_, but a function
10086 call will only be used if a trap is not available.
10089 Indicates that there is no OS function for flushing the cache.
10093 File: gcc.info, Node: M680x0 Options, Next: M68hc1x Options, Prev: M32R/D Options, Up: Submodel Options
10095 3.17.18 M680x0 Options
10096 ----------------------
10098 These are the `-m' options defined for the 68000 series. The default
10099 values for these options depends on which style of 68000 was selected
10100 when the compiler was configured; the defaults for the most common
10101 choices are given below.
10105 Generate output for a 68000. This is the default when the
10106 compiler is configured for 68000-based systems.
10108 Use this option for microcontrollers with a 68000 or EC000 core,
10109 including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356.
10113 Generate output for a 68020. This is the default when the
10114 compiler is configured for 68020-based systems.
10117 Generate output containing 68881 instructions for floating point.
10118 This is the default for most 68020 systems unless `--nfp' was
10119 specified when the compiler was configured.
10122 Generate output for a 68030. This is the default when the
10123 compiler is configured for 68030-based systems.
10126 Generate output for a 68040. This is the default when the
10127 compiler is configured for 68040-based systems.
10129 This option inhibits the use of 68881/68882 instructions that have
10130 to be emulated by software on the 68040. Use this option if your
10131 68040 does not have code to emulate those instructions.
10134 Generate output for a 68060. This is the default when the
10135 compiler is configured for 68060-based systems.
10137 This option inhibits the use of 68020 and 68881/68882 instructions
10138 that have to be emulated by software on the 68060. Use this
10139 option if your 68060 does not have code to emulate those
10143 Generate output for a CPU32. This is the default when the
10144 compiler is configured for CPU32-based systems.
10146 Use this option for microcontrollers with a CPU32 or CPU32+ core,
10147 including the 68330, 68331, 68332, 68333, 68334, 68336, 68340,
10148 68341, 68349 and 68360.
10151 Generate output for a 520X "coldfire" family cpu. This is the
10152 default when the compiler is configured for 520X-based systems.
10154 Use this option for microcontroller with a 5200 core, including
10155 the MCF5202, MCF5203, MCF5204 and MCF5202.
10158 Generate output for a ColdFire V4e family cpu (e.g. 547x/548x).
10159 This includes use of hardware floating point instructions.
10162 Generate output for a 68040, without using any of the new
10163 instructions. This results in code which can run relatively
10164 efficiently on either a 68020/68881 or a 68030 or a 68040. The
10165 generated code does use the 68881 instructions that are emulated
10169 Generate output for a 68060, without using any of the new
10170 instructions. This results in code which can run relatively
10171 efficiently on either a 68020/68881 or a 68030 or a 68040. The
10172 generated code does use the 68881 instructions that are emulated
10176 Generate output containing library calls for floating point.
10177 *Warning:* the requisite libraries are not available for all m68k
10178 targets. Normally the facilities of the machine's usual C
10179 compiler are used, but this can't be done directly in
10180 cross-compilation. You must make your own arrangements to provide
10181 suitable library functions for cross-compilation. The embedded
10182 targets `m68k-*-aout' and `m68k-*-coff' do provide software
10183 floating point support.
10186 Consider type `int' to be 16 bits wide, like `short int'.
10187 Additionally, parameters passed on the stack are also aligned to a
10188 16-bit boundary even on targets whose API mandates promotion to
10192 Do not use the bit-field instructions. The `-m68000', `-mcpu32'
10193 and `-m5200' options imply `-mnobitfield'.
10196 Do use the bit-field instructions. The `-m68020' option implies
10197 `-mbitfield'. This is the default if you use a configuration
10198 designed for a 68020.
10201 Use a different function-calling convention, in which functions
10202 that take a fixed number of arguments return with the `rtd'
10203 instruction, which pops their arguments while returning. This
10204 saves one instruction in the caller since there is no need to pop
10205 the arguments there.
10207 This calling convention is incompatible with the one normally used
10208 on Unix, so you cannot use it if you need to call libraries
10209 compiled with the Unix compiler.
10211 Also, you must provide function prototypes for all functions that
10212 take variable numbers of arguments (including `printf'); otherwise
10213 incorrect code will be generated for calls to those functions.
10215 In addition, seriously incorrect code will result if you call a
10216 function with too many arguments. (Normally, extra arguments are
10217 harmlessly ignored.)
10219 The `rtd' instruction is supported by the 68010, 68020, 68030,
10220 68040, 68060 and CPU32 processors, but not by the 68000 or 5200.
10224 Control whether GCC aligns `int', `long', `long long', `float',
10225 `double', and `long double' variables on a 32-bit boundary
10226 (`-malign-int') or a 16-bit boundary (`-mno-align-int'). Aligning
10227 variables on 32-bit boundaries produces code that runs somewhat
10228 faster on processors with 32-bit busses at the expense of more
10231 *Warning:* if you use the `-malign-int' switch, GCC will align
10232 structures containing the above types differently than most
10233 published application binary interface specifications for the m68k.
10236 Use the pc-relative addressing mode of the 68000 directly, instead
10237 of using a global offset table. At present, this option implies
10238 `-fpic', allowing at most a 16-bit offset for pc-relative
10239 addressing. `-fPIC' is not presently supported with `-mpcrel',
10240 though this could be supported for 68020 and higher processors.
10242 `-mno-strict-align'
10244 Do not (do) assume that unaligned memory references will be
10245 handled by the system.
10248 Generate code that allows the data segment to be located in a
10249 different area of memory from the text segment. This allows for
10250 execute in place in an environment without virtual memory
10251 management. This option implies `-fPIC'.
10254 Generate code that assumes that the data segment follows the text
10255 segment. This is the default.
10257 `-mid-shared-library'
10258 Generate code that supports shared libraries via the library ID
10259 method. This allows for execute in place and shared libraries in
10260 an environment without virtual memory management. This option
10263 `-mno-id-shared-library'
10264 Generate code that doesn't assume ID based shared libraries are
10265 being used. This is the default.
10267 `-mshared-library-id=n'
10268 Specified the identification number of the ID based shared library
10269 being compiled. Specifying a value of 0 will generate more
10270 compact code, specifying other values will force the allocation of
10271 that number to the current library but is no more space or time
10272 efficient than omitting this option.
10276 File: gcc.info, Node: M68hc1x Options, Next: MCore Options, Prev: M680x0 Options, Up: Submodel Options
10278 3.17.19 M68hc1x Options
10279 -----------------------
10281 These are the `-m' options defined for the 68hc11 and 68hc12
10282 microcontrollers. The default values for these options depends on
10283 which style of microcontroller was selected when the compiler was
10284 configured; the defaults for the most common choices are given below.
10288 Generate output for a 68HC11. This is the default when the
10289 compiler is configured for 68HC11-based systems.
10293 Generate output for a 68HC12. This is the default when the
10294 compiler is configured for 68HC12-based systems.
10298 Generate output for a 68HCS12.
10301 Enable the use of 68HC12 pre and post auto-increment and
10302 auto-decrement addressing modes.
10306 Enable the use of 68HC12 min and max instructions.
10310 Treat all calls as being far away (near). If calls are assumed to
10311 be far away, the compiler will use the `call' instruction to call
10312 a function and the `rtc' instruction for returning.
10315 Consider type `int' to be 16 bits wide, like `short int'.
10317 `-msoft-reg-count=COUNT'
10318 Specify the number of pseudo-soft registers which are used for the
10319 code generation. The maximum number is 32. Using more pseudo-soft
10320 register may or may not result in better code depending on the
10321 program. The default is 4 for 68HC11 and 2 for 68HC12.
10325 File: gcc.info, Node: MCore Options, Next: MIPS Options, Prev: M68hc1x Options, Up: Submodel Options
10327 3.17.20 MCore Options
10328 ---------------------
10330 These are the `-m' options defined for the Motorola M*Core processors.
10334 Inline constants into the code stream if it can be done in two
10335 instructions or less.
10339 Use the divide instruction. (Enabled by default).
10341 `-mrelax-immediate'
10342 `-mno-relax-immediate'
10343 Allow arbitrary sized immediates in bit operations.
10346 `-mno-wide-bitfields'
10347 Always treat bit-fields as int-sized.
10349 `-m4byte-functions'
10350 `-mno-4byte-functions'
10351 Force all functions to be aligned to a four byte boundary.
10354 `-mno-callgraph-data'
10355 Emit callgraph information.
10359 Prefer word access when reading byte quantities.
10363 Generate code for a little endian target.
10367 Generate code for the 210 processor.
10370 File: gcc.info, Node: MIPS Options, Next: MMIX Options, Prev: MCore Options, Up: Submodel Options
10372 3.17.21 MIPS Options
10373 --------------------
10376 Generate big-endian code.
10379 Generate little-endian code. This is the default for `mips*el-*-*'
10383 Generate code that will run on ARCH, which can be the name of a
10384 generic MIPS ISA, or the name of a particular processor. The ISA
10385 names are: `mips1', `mips2', `mips3', `mips4', `mips32',
10386 `mips32r2', and `mips64'. The processor names are: `4kc', `4km',
10387 `4kp', `5kc', `5kf', `20kc', `24k', `24kc', `24kf', `24kx', `m4k',
10388 `orion', `r2000', `r3000', `r3900', `r4000', `r4400', `r4600',
10389 `r4650', `r6000', `r8000', `rm7000', `rm9000', `sb1', `sr71000',
10390 `vr4100', `vr4111', `vr4120', `vr4130', `vr4300', `vr5000',
10391 `vr5400' and `vr5500'. The special value `from-abi' selects the
10392 most compatible architecture for the selected ABI (that is,
10393 `mips1' for 32-bit ABIs and `mips3' for 64-bit ABIs).
10395 In processor names, a final `000' can be abbreviated as `k' (for
10396 example, `-march=r2k'). Prefixes are optional, and `vr' may be
10399 GCC defines two macros based on the value of this option. The
10400 first is `_MIPS_ARCH', which gives the name of target
10401 architecture, as a string. The second has the form
10402 `_MIPS_ARCH_FOO', where FOO is the capitalized value of
10403 `_MIPS_ARCH'. For example, `-march=r2000' will set `_MIPS_ARCH'
10404 to `"r2000"' and define the macro `_MIPS_ARCH_R2000'.
10406 Note that the `_MIPS_ARCH' macro uses the processor names given
10407 above. In other words, it will have the full prefix and will not
10408 abbreviate `000' as `k'. In the case of `from-abi', the macro
10409 names the resolved architecture (either `"mips1"' or `"mips3"').
10410 It names the default architecture when no `-march' option is given.
10413 Optimize for ARCH. Among other things, this option controls the
10414 way instructions are scheduled, and the perceived cost of
10415 arithmetic operations. The list of ARCH values is the same as for
10418 When this option is not used, GCC will optimize for the processor
10419 specified by `-march'. By using `-march' and `-mtune' together,
10420 it is possible to generate code that will run on a family of
10421 processors, but optimize the code for one particular member of
10424 `-mtune' defines the macros `_MIPS_TUNE' and `_MIPS_TUNE_FOO',
10425 which work in the same way as the `-march' ones described above.
10428 Equivalent to `-march=mips1'.
10431 Equivalent to `-march=mips2'.
10434 Equivalent to `-march=mips3'.
10437 Equivalent to `-march=mips4'.
10440 Equivalent to `-march=mips32'.
10443 Equivalent to `-march=mips32r2'.
10446 Equivalent to `-march=mips64'.
10450 Generate (do not generate) MIPS16 code. If GCC is targetting a
10451 MIPS32 or MIPS64 architecture, it will make use of the MIPS16e ASE.
10458 Generate code for the given ABI.
10460 Note that the EABI has a 32-bit and a 64-bit variant. GCC normally
10461 generates 64-bit code when you select a 64-bit architecture, but
10462 you can use `-mgp32' to get 32-bit code instead.
10464 For information about the O64 ABI, see
10465 `http://gcc.gnu.org/projects/mipso64-abi.html'.
10469 Generate (do not generate) code that is suitable for SVR4-style
10470 dynamic objects. `-mabicalls' is the default for SVR4-based
10475 Generate (do not generate) code that is fully position-independent,
10476 and that can therefore be linked into shared libraries. This
10477 option only affects `-mabicalls'.
10479 All `-mabicalls' code has traditionally been position-independent,
10480 regardless of options like `-fPIC' and `-fpic'. However, as an
10481 extension, the GNU toolchain allows executables to use absolute
10482 accesses for locally-binding symbols. It can also use shorter GP
10483 initialization sequences and generate direct calls to
10484 locally-defined functions. This mode is selected by `-mno-shared'.
10486 `-mno-shared' depends on binutils 2.16 or higher and generates
10487 objects that can only be linked by the GNU linker. However, the
10488 option does not affect the ABI of the final executable; it only
10489 affects the ABI of relocatable objects. Using `-mno-shared' will
10490 generally make executables both smaller and quicker.
10492 `-mshared' is the default.
10496 Lift (do not lift) the usual restrictions on the size of the global
10499 GCC normally uses a single instruction to load values from the GOT.
10500 While this is relatively efficient, it will only work if the GOT
10501 is smaller than about 64k. Anything larger will cause the linker
10502 to report an error such as:
10504 relocation truncated to fit: R_MIPS_GOT16 foobar
10506 If this happens, you should recompile your code with `-mxgot'. It
10507 should then work with very large GOTs, although it will also be
10508 less efficient, since it will take three instructions to fetch the
10509 value of a global symbol.
10511 Note that some linkers can create multiple GOTs. If you have such
10512 a linker, you should only need to use `-mxgot' when a single object
10513 file accesses more than 64k's worth of GOT entries. Very few do.
10515 These options have no effect unless GCC is generating position
10519 Assume that general-purpose registers are 32 bits wide.
10522 Assume that general-purpose registers are 64 bits wide.
10525 Assume that floating-point registers are 32 bits wide.
10528 Assume that floating-point registers are 64 bits wide.
10531 Use floating-point coprocessor instructions.
10534 Do not use floating-point coprocessor instructions. Implement
10535 floating-point calculations using library calls instead.
10538 Assume that the floating-point coprocessor only supports
10539 single-precision operations.
10542 Assume that the floating-point coprocessor supports
10543 double-precision operations. This is the default.
10547 Use (do not use) the MIPS DSP ASE. *Note MIPS DSP Built-in
10551 `-mno-paired-single'
10552 Use (do not use) paired-single floating-point instructions. *Note
10553 MIPS Paired-Single Support::. This option can only be used when
10554 generating 64-bit code and requires hardware floating-point
10555 support to be enabled.
10559 Use (do not use) the MIPS-3D ASE. *Note MIPS-3D Built-in
10560 Functions::. The option `-mips3d' implies `-mpaired-single'.
10563 Force `long' types to be 64 bits wide. See `-mlong32' for an
10564 explanation of the default and the way that the pointer size is
10568 Force `long', `int', and pointer types to be 32 bits wide.
10570 The default size of `int's, `long's and pointers depends on the
10571 ABI. All the supported ABIs use 32-bit `int's. The n64 ABI uses
10572 64-bit `long's, as does the 64-bit EABI; the others use 32-bit
10573 `long's. Pointers are the same size as `long's, or the same size
10574 as integer registers, whichever is smaller.
10578 Assume (do not assume) that all symbols have 32-bit values,
10579 regardless of the selected ABI. This option is useful in
10580 combination with `-mabi=64' and `-mno-abicalls' because it allows
10581 GCC to generate shorter and faster references to symbolic
10585 Put global and static items less than or equal to NUM bytes into
10586 the small data or bss section instead of the normal data or bss
10587 section. This allows the data to be accessed using a single
10590 All modules should be compiled with the same `-G NUM' value.
10593 `-mno-embedded-data'
10594 Allocate variables to the read-only data section first if
10595 possible, then next in the small data section if possible,
10596 otherwise in data. This gives slightly slower code than the
10597 default, but reduces the amount of RAM required when executing,
10598 and thus may be preferred for some embedded systems.
10600 `-muninit-const-in-rodata'
10601 `-mno-uninit-const-in-rodata'
10602 Put uninitialized `const' variables in the read-only data section.
10603 This option is only meaningful in conjunction with
10606 `-msplit-addresses'
10607 `-mno-split-addresses'
10608 Enable (disable) use of the `%hi()' and `%lo()' assembler
10609 relocation operators. This option has been superseded by
10610 `-mexplicit-relocs' but is retained for backwards compatibility.
10612 `-mexplicit-relocs'
10613 `-mno-explicit-relocs'
10614 Use (do not use) assembler relocation operators when dealing with
10615 symbolic addresses. The alternative, selected by
10616 `-mno-explicit-relocs', is to use assembler macros instead.
10618 `-mexplicit-relocs' is the default if GCC was configured to use an
10619 assembler that supports relocation operators.
10621 `-mcheck-zero-division'
10622 `-mno-check-zero-division'
10623 Trap (do not trap) on integer division by zero. The default is
10624 `-mcheck-zero-division'.
10628 MIPS systems check for division by zero by generating either a
10629 conditional trap or a break instruction. Using traps results in
10630 smaller code, but is only supported on MIPS II and later. Also,
10631 some versions of the Linux kernel have a bug that prevents trap
10632 from generating the proper signal (`SIGFPE'). Use
10633 `-mdivide-traps' to allow conditional traps on architectures that
10634 support them and `-mdivide-breaks' to force the use of breaks.
10636 The default is usually `-mdivide-traps', but this can be
10637 overridden at configure time using `--with-divide=breaks'.
10638 Divide-by-zero checks can be completely disabled using
10639 `-mno-check-zero-division'.
10643 Force (do not force) the use of `memcpy()' for non-trivial block
10644 moves. The default is `-mno-memcpy', which allows GCC to inline
10645 most constant-sized copies.
10649 Disable (do not disable) use of the `jal' instruction. Calling
10650 functions using `jal' is more efficient but requires the caller
10651 and callee to be in the same 256 megabyte segment.
10653 This option has no effect on abicalls code. The default is
10658 Enable (disable) use of the `mad', `madu' and `mul' instructions,
10659 as provided by the R4650 ISA.
10663 Enable (disable) use of the floating point multiply-accumulate
10664 instructions, when they are available. The default is
10667 When multiply-accumulate instructions are used, the intermediate
10668 product is calculated to infinite precision and is not subject to
10669 the FCSR Flush to Zero bit. This may be undesirable in some
10673 Tell the MIPS assembler to not run its preprocessor over user
10674 assembler files (with a `.s' suffix) when assembling them.
10678 Work around certain R4000 CPU errata:
10679 - A double-word or a variable shift may give an incorrect
10680 result if executed immediately after starting an integer
10683 - A double-word or a variable shift may give an incorrect
10684 result if executed while an integer multiplication is in
10687 - An integer division may give an incorrect result if started
10688 in a delay slot of a taken branch or a jump.
10692 Work around certain R4400 CPU errata:
10693 - A double-word or a variable shift may give an incorrect
10694 result if executed immediately after starting an integer
10699 Work around certain VR4120 errata:
10700 - `dmultu' does not always produce the correct result.
10702 - `div' and `ddiv' do not always produce the correct result if
10703 one of the operands is negative.
10704 The workarounds for the division errata rely on special functions
10705 in `libgcc.a'. At present, these functions are only provided by
10706 the `mips64vr*-elf' configurations.
10708 Other VR4120 errata require a nop to be inserted between certain
10709 pairs of instructions. These errata are handled by the assembler,
10713 Work around the VR4130 `mflo'/`mfhi' errata. The workarounds are
10714 implemented by the assembler rather than by GCC, although GCC will
10715 avoid using `mflo' and `mfhi' if the VR4130 `macc', `macchi',
10716 `dmacc' and `dmacchi' instructions are available instead.
10720 Work around certain SB-1 CPU core errata. (This flag currently
10721 works around the SB-1 revision 2 "F1" and "F2" floating point
10724 `-mflush-func=FUNC'
10726 Specifies the function to call to flush the I and D caches, or to
10727 not call any such function. If called, the function must take the
10728 same arguments as the common `_flush_func()', that is, the address
10729 of the memory range for which the cache is being flushed, the size
10730 of the memory range, and the number 3 (to flush both caches). The
10731 default depends on the target GCC was configured for, but commonly
10732 is either `_flush_func' or `__cpu_flush'.
10735 `-mno-branch-likely'
10736 Enable or disable use of Branch Likely instructions, regardless of
10737 the default for the selected architecture. By default, Branch
10738 Likely instructions may be generated if they are supported by the
10739 selected architecture. An exception is for the MIPS32 and MIPS64
10740 architectures and processors which implement those architectures;
10741 for those, Branch Likely instructions will not be generated by
10742 default because the MIPS32 and MIPS64 architectures specifically
10743 deprecate their use.
10746 `-mno-fp-exceptions'
10747 Specifies whether FP exceptions are enabled. This affects how we
10748 schedule FP instructions for some processors. The default is that
10749 FP exceptions are enabled.
10751 For instance, on the SB-1, if FP exceptions are disabled, and we
10752 are emitting 64-bit code, then we can use both FP pipes.
10753 Otherwise, we can only use one FP pipe.
10756 `-mno-vr4130-align'
10757 The VR4130 pipeline is two-way superscalar, but can only issue two
10758 instructions together if the first one is 8-byte aligned. When
10759 this option is enabled, GCC will align pairs of instructions that
10760 it thinks should execute in parallel.
10762 This option only has an effect when optimizing for the VR4130. It
10763 normally makes code faster, but at the expense of making it bigger.
10764 It is enabled by default at optimization level `-O3'.
10767 File: gcc.info, Node: MMIX Options, Next: MN10300 Options, Prev: MIPS Options, Up: Submodel Options
10769 3.17.22 MMIX Options
10770 --------------------
10772 These options are defined for the MMIX:
10776 Specify that intrinsic library functions are being compiled,
10777 passing all values in registers, no matter the size.
10781 Generate floating-point comparison instructions that compare with
10782 respect to the `rE' epsilon register.
10786 Generate code that passes function parameters and return values
10787 that (in the called function) are seen as registers `$0' and up,
10788 as opposed to the GNU ABI which uses global registers `$231' and
10793 When reading data from memory in sizes shorter than 64 bits, use
10794 (do not use) zero-extending load instructions by default, rather
10795 than sign-extending ones.
10799 Make the result of a division yielding a remainder have the same
10800 sign as the divisor. With the default, `-mno-knuthdiv', the sign
10801 of the remainder follows the sign of the dividend. Both methods
10802 are arithmetically valid, the latter being almost exclusively used.
10804 `-mtoplevel-symbols'
10805 `-mno-toplevel-symbols'
10806 Prepend (do not prepend) a `:' to all global symbols, so the
10807 assembly code can be used with the `PREFIX' assembly directive.
10810 Generate an executable in the ELF format, rather than the default
10811 `mmo' format used by the `mmix' simulator.
10814 `-mno-branch-predict'
10815 Use (do not use) the probable-branch instructions, when static
10816 branch prediction indicates a probable branch.
10819 `-mno-base-addresses'
10820 Generate (do not generate) code that uses _base addresses_. Using
10821 a base address automatically generates a request (handled by the
10822 assembler and the linker) for a constant to be set up in a global
10823 register. The register is used for one or more base address
10824 requests within the range 0 to 255 from the value held in the
10825 register. The generally leads to short and fast code, but the
10826 number of different data items that can be addressed is limited.
10827 This means that a program that uses lots of static data may
10828 require `-mno-base-addresses'.
10832 Force (do not force) generated code to have a single exit point in
10836 File: gcc.info, Node: MN10300 Options, Next: MT Options, Prev: MMIX Options, Up: Submodel Options
10838 3.17.23 MN10300 Options
10839 -----------------------
10841 These `-m' options are defined for Matsushita MN10300 architectures:
10844 Generate code to avoid bugs in the multiply instructions for the
10845 MN10300 processors. This is the default.
10848 Do not generate code to avoid bugs in the multiply instructions
10849 for the MN10300 processors.
10852 Generate code which uses features specific to the AM33 processor.
10855 Do not generate code which uses features specific to the AM33
10856 processor. This is the default.
10858 `-mreturn-pointer-on-d0'
10859 When generating a function which returns a pointer, return the
10860 pointer in both `a0' and `d0'. Otherwise, the pointer is returned
10861 only in a0, and attempts to call such functions without a prototype
10862 would result in errors. Note that this option is on by default;
10863 use `-mno-return-pointer-on-d0' to disable it.
10866 Do not link in the C run-time initialization object file.
10869 Indicate to the linker that it should perform a relaxation
10870 optimization pass to shorten branches, calls and absolute memory
10871 addresses. This option only has an effect when used on the
10872 command line for the final link step.
10874 This option makes symbolic debugging impossible.
10877 File: gcc.info, Node: MT Options, Next: PDP-11 Options, Prev: MN10300 Options, Up: Submodel Options
10882 These `-m' options are defined for Morpho MT architectures:
10885 Generate code that will run on CPU-TYPE, which is the name of a
10886 system representing a certain processor type. Possible values for
10887 CPU-TYPE are `ms1-64-001', `ms1-16-002', `ms1-16-003' and `ms2'.
10889 When this option is not used, the default is `-march=ms1-16-002'.
10892 Use byte loads and stores when generating code.
10895 Do not use byte loads and stores when generating code.
10898 Use simulator runtime
10901 Do not link in the C run-time initialization object file `crti.o'.
10902 Other run-time initialization and termination files such as
10903 `startup.o' and `exit.o' are still included on the linker command
10908 File: gcc.info, Node: PDP-11 Options, Next: PowerPC Options, Prev: MT Options, Up: Submodel Options
10910 3.17.25 PDP-11 Options
10911 ----------------------
10913 These options are defined for the PDP-11:
10916 Use hardware FPP floating point. This is the default. (FIS
10917 floating point on the PDP-11/40 is not supported.)
10920 Do not use hardware floating point.
10923 Return floating-point results in ac0 (fr0 in Unix assembler
10927 Return floating-point results in memory. This is the default.
10930 Generate code for a PDP-11/40.
10933 Generate code for a PDP-11/45. This is the default.
10936 Generate code for a PDP-11/10.
10939 Use inline `movmemhi' patterns for copying memory. This is the
10943 Do not use inline `movmemhi' patterns for copying memory.
10947 Use 16-bit `int'. This is the default.
10955 Use 64-bit `float'. This is the default.
10959 Use 32-bit `float'.
10962 Use `abshi2' pattern. This is the default.
10965 Do not use `abshi2' pattern.
10967 `-mbranch-expensive'
10968 Pretend that branches are expensive. This is for experimenting
10969 with code generation only.
10972 Do not pretend that branches are expensive. This is the default.
10975 Generate code for a system with split I&D.
10978 Generate code for a system without split I&D. This is the default.
10981 Use Unix assembler syntax. This is the default when configured for
10985 Use DEC assembler syntax. This is the default when configured for
10986 any PDP-11 target other than `pdp11-*-bsd'.
10989 File: gcc.info, Node: PowerPC Options, Next: RS/6000 and PowerPC Options, Prev: PDP-11 Options, Up: Submodel Options
10991 3.17.26 PowerPC Options
10992 -----------------------
10994 These are listed under *Note RS/6000 and PowerPC Options::.
10997 File: gcc.info, Node: RS/6000 and PowerPC Options, Next: S/390 and zSeries Options, Prev: PowerPC Options, Up: Submodel Options
10999 3.17.27 IBM RS/6000 and PowerPC Options
11000 ---------------------------------------
11002 These `-m' options are defined for the IBM RS/6000 and PowerPC:
11010 `-mno-powerpc-gpopt'
11012 `-mno-powerpc-gfxopt'
11021 GCC supports two related instruction set architectures for the
11022 RS/6000 and PowerPC. The "POWER" instruction set are those
11023 instructions supported by the `rios' chip set used in the original
11024 RS/6000 systems and the "PowerPC" instruction set is the
11025 architecture of the Freescale MPC5xx, MPC6xx, MPC8xx
11026 microprocessors, and the IBM 4xx, 6xx, and follow-on
11029 Neither architecture is a subset of the other. However there is a
11030 large common subset of instructions supported by both. An MQ
11031 register is included in processors supporting the POWER
11034 You use these options to specify which instructions are available
11035 on the processor you are using. The default value of these
11036 options is determined when configuring GCC. Specifying the
11037 `-mcpu=CPU_TYPE' overrides the specification of these options. We
11038 recommend you use the `-mcpu=CPU_TYPE' option rather than the
11039 options listed above.
11041 The `-mpower' option allows GCC to generate instructions that are
11042 found only in the POWER architecture and to use the MQ register.
11043 Specifying `-mpower2' implies `-power' and also allows GCC to
11044 generate instructions that are present in the POWER2 architecture
11045 but not the original POWER architecture.
11047 The `-mpowerpc' option allows GCC to generate instructions that
11048 are found only in the 32-bit subset of the PowerPC architecture.
11049 Specifying `-mpowerpc-gpopt' implies `-mpowerpc' and also allows
11050 GCC to use the optional PowerPC architecture instructions in the
11051 General Purpose group, including floating-point square root.
11052 Specifying `-mpowerpc-gfxopt' implies `-mpowerpc' and also allows
11053 GCC to use the optional PowerPC architecture instructions in the
11054 Graphics group, including floating-point select.
11056 The `-mmfcrf' option allows GCC to generate the move from
11057 condition register field instruction implemented on the POWER4
11058 processor and other processors that support the PowerPC V2.01
11059 architecture. The `-mpopcntb' option allows GCC to generate the
11060 popcount and double precision FP reciprocal estimate instruction
11061 implemented on the POWER5 processor and other processors that
11062 support the PowerPC V2.02 architecture. The `-mfprnd' option
11063 allows GCC to generate the FP round to integer instructions
11064 implemented on the POWER5+ processor and other processors that
11065 support the PowerPC V2.03 architecture.
11067 The `-mpowerpc64' option allows GCC to generate the additional
11068 64-bit instructions that are found in the full PowerPC64
11069 architecture and to treat GPRs as 64-bit, doubleword quantities.
11070 GCC defaults to `-mno-powerpc64'.
11072 If you specify both `-mno-power' and `-mno-powerpc', GCC will use
11073 only the instructions in the common subset of both architectures
11074 plus some special AIX common-mode calls, and will not use the MQ
11075 register. Specifying both `-mpower' and `-mpowerpc' permits GCC
11076 to use any instruction from either architecture and to allow use
11077 of the MQ register; specify this for the Motorola MPC601.
11081 Select which mnemonics to use in the generated assembler code.
11082 With `-mnew-mnemonics', GCC uses the assembler mnemonics defined
11083 for the PowerPC architecture. With `-mold-mnemonics' it uses the
11084 assembler mnemonics defined for the POWER architecture.
11085 Instructions defined in only one architecture have only one
11086 mnemonic; GCC uses that mnemonic irrespective of which of these
11087 options is specified.
11089 GCC defaults to the mnemonics appropriate for the architecture in
11090 use. Specifying `-mcpu=CPU_TYPE' sometimes overrides the value of
11091 these option. Unless you are building a cross-compiler, you
11092 should normally not specify either `-mnew-mnemonics' or
11093 `-mold-mnemonics', but should instead accept the default.
11096 Set architecture type, register usage, choice of mnemonics, and
11097 instruction scheduling parameters for machine type CPU_TYPE.
11098 Supported values for CPU_TYPE are `401', `403', `405', `405fp',
11099 `440', `440fp', `505', `601', `602', `603', `603e', `604', `604e',
11100 `620', `630', `740', `7400', `7450', `750', `801', `821', `823',
11101 `860', `970', `8540', `ec603e', `G3', `G4', `G5', `power',
11102 `power2', `power3', `power4', `power5', `power5+', `power6',
11103 `common', `powerpc', `powerpc64', `rios', `rios1', `rios2', `rsc',
11106 `-mcpu=common' selects a completely generic processor. Code
11107 generated under this option will run on any POWER or PowerPC
11108 processor. GCC will use only the instructions in the common
11109 subset of both architectures, and will not use the MQ register.
11110 GCC assumes a generic processor model for scheduling purposes.
11112 `-mcpu=power', `-mcpu=power2', `-mcpu=powerpc', and
11113 `-mcpu=powerpc64' specify generic POWER, POWER2, pure 32-bit
11114 PowerPC (i.e., not MPC601), and 64-bit PowerPC architecture machine
11115 types, with an appropriate, generic processor model assumed for
11116 scheduling purposes.
11118 The other options specify a specific processor. Code generated
11119 under those options will run best on that processor, and may not
11120 run at all on others.
11122 The `-mcpu' options automatically enable or disable the following
11123 options: `-maltivec', `-mfprnd', `-mhard-float', `-mmfcrf',
11124 `-mmultiple', `-mnew-mnemonics', `-mpopcntb', `-mpower',
11125 `-mpower2', `-mpowerpc64', `-mpowerpc-gpopt', `-mpowerpc-gfxopt',
11126 `-mstring', `-mmulhw', `-mdlmzb'. The particular options set for
11127 any particular CPU will vary between compiler versions, depending
11128 on what setting seems to produce optimal code for that CPU; it
11129 doesn't necessarily reflect the actual hardware's capabilities. If
11130 you wish to set an individual option to a particular value, you may
11131 specify it after the `-mcpu' option, like `-mcpu=970 -mno-altivec'.
11133 On AIX, the `-maltivec' and `-mpowerpc64' options are not enabled
11134 or disabled by the `-mcpu' option at present because AIX does not
11135 have full support for these options. You may still enable or
11136 disable them individually if you're sure it'll work in your
11140 Set the instruction scheduling parameters for machine type
11141 CPU_TYPE, but do not set the architecture type, register usage, or
11142 choice of mnemonics, as `-mcpu=CPU_TYPE' would. The same values
11143 for CPU_TYPE are used for `-mtune' as for `-mcpu'. If both are
11144 specified, the code generated will use the architecture,
11145 registers, and mnemonics set by `-mcpu', but the scheduling
11146 parameters set by `-mtune'.
11150 Generate code to compute division as reciprocal estimate and
11151 iterative refinement, creating opportunities for increased
11152 throughput. This feature requires: optional PowerPC Graphics
11153 instruction set for single precision and FRE instruction for
11154 double precision, assuming divides cannot generate user-visible
11155 traps, and the domain values not include Infinities, denormals or
11160 Generate code that uses (does not use) AltiVec instructions, and
11161 also enable the use of built-in functions that allow more direct
11162 access to the AltiVec instruction set. You may also need to set
11163 `-mabi=altivec' to adjust the current ABI with AltiVec ABI
11169 Generate VRSAVE instructions when generating AltiVec code.
11172 Generate code that allows ld and ld.so to build executables and
11173 shared libraries with non-exec .plt and .got sections. This is a
11174 PowerPC 32-bit SYSV ABI option.
11177 Generate code that uses a BSS .plt section that ld.so fills in, and
11178 requires .plt and .got sections that are both writable and
11179 executable. This is a PowerPC 32-bit SYSV ABI option.
11183 This switch enables or disables the generation of ISEL
11187 This switch has been deprecated. Use `-misel' and `-mno-isel'
11192 This switch enables or disables the generation of SPE simd
11196 This option has been deprecated. Use `-mspe' and `-mno-spe'
11199 `-mfloat-gprs=YES/SINGLE/DOUBLE/NO'
11201 This switch enables or disables the generation of floating point
11202 operations on the general purpose registers for architectures that
11205 The argument YES or SINGLE enables the use of single-precision
11206 floating point operations.
11208 The argument DOUBLE enables the use of single and double-precision
11209 floating point operations.
11211 The argument NO disables floating point operations on the general
11214 This option is currently only available on the MPC854x.
11218 Generate code for 32-bit or 64-bit environments of Darwin and SVR4
11219 targets (including GNU/Linux). The 32-bit environment sets int,
11220 long and pointer to 32 bits and generates code that runs on any
11221 PowerPC variant. The 64-bit environment sets int to 32 bits and
11222 long and pointer to 64 bits, and generates code for PowerPC64, as
11229 Modify generation of the TOC (Table Of Contents), which is created
11230 for every executable file. The `-mfull-toc' option is selected by
11231 default. In that case, GCC will allocate at least one TOC entry
11232 for each unique non-automatic variable reference in your program.
11233 GCC will also place floating-point constants in the TOC. However,
11234 only 16,384 entries are available in the TOC.
11236 If you receive a linker error message that saying you have
11237 overflowed the available TOC space, you can reduce the amount of
11238 TOC space used with the `-mno-fp-in-toc' and `-mno-sum-in-toc'
11239 options. `-mno-fp-in-toc' prevents GCC from putting floating-point
11240 constants in the TOC and `-mno-sum-in-toc' forces GCC to generate
11241 code to calculate the sum of an address and a constant at run-time
11242 instead of putting that sum into the TOC. You may specify one or
11243 both of these options. Each causes GCC to produce very slightly
11244 slower and larger code at the expense of conserving TOC space.
11246 If you still run out of space in the TOC even when you specify
11247 both of these options, specify `-mminimal-toc' instead. This
11248 option causes GCC to make only one TOC entry for every file. When
11249 you specify this option, GCC will produce code that is slower and
11250 larger but which uses extremely little TOC space. You may wish to
11251 use this option only on files that contain less frequently
11256 Enable 64-bit AIX ABI and calling convention: 64-bit pointers,
11257 64-bit `long' type, and the infrastructure needed to support them.
11258 Specifying `-maix64' implies `-mpowerpc64' and `-mpowerpc', while
11259 `-maix32' disables the 64-bit ABI and implies `-mno-powerpc64'.
11260 GCC defaults to `-maix32'.
11264 Produce code that conforms more closely to IBM XL compiler
11265 semantics when using AIX-compatible ABI. Pass floating-point
11266 arguments to prototyped functions beyond the register save area
11267 (RSA) on the stack in addition to argument FPRs. Do not assume
11268 that most significant double in 128-bit long double value is
11269 properly rounded when comparing values and converting to double.
11270 Use XL symbol names for long double support routines.
11272 The AIX calling convention was extended but not initially
11273 documented to handle an obscure K&R C case of calling a function
11274 that takes the address of its arguments with fewer arguments than
11275 declared. IBM XL compilers access floating point arguments which
11276 do not fit in the RSA from the stack when a subroutine is compiled
11277 without optimization. Because always storing floating-point
11278 arguments on the stack is inefficient and rarely needed, this
11279 option is not enabled by default and only is necessary when
11280 calling subroutines compiled by IBM XL compilers without
11284 Support "IBM RS/6000 SP" "Parallel Environment" (PE). Link an
11285 application written to use message passing with special startup
11286 code to enable the application to run. The system must have PE
11287 installed in the standard location (`/usr/lpp/ppe.poe/'), or the
11288 `specs' file must be overridden with the `-specs=' option to
11289 specify the appropriate directory location. The Parallel
11290 Environment does not support threads, so the `-mpe' option and the
11291 `-pthread' option are incompatible.
11295 On AIX, 32-bit Darwin, and 64-bit PowerPC GNU/Linux, the option
11296 `-malign-natural' overrides the ABI-defined alignment of larger
11297 types, such as floating-point doubles, on their natural size-based
11298 boundary. The option `-malign-power' instructs GCC to follow the
11299 ABI-specified alignment rules. GCC defaults to the standard
11300 alignment defined in the ABI.
11302 On 64-bit Darwin, natural alignment is the default, and
11303 `-malign-power' is not supported.
11307 Generate code that does not use (uses) the floating-point register
11308 set. Software floating point emulation is provided if you use the
11309 `-msoft-float' option, and pass the option to GCC when linking.
11313 Generate code that uses (does not use) the load multiple word
11314 instructions and the store multiple word instructions. These
11315 instructions are generated by default on POWER systems, and not
11316 generated on PowerPC systems. Do not use `-mmultiple' on little
11317 endian PowerPC systems, since those instructions do not work when
11318 the processor is in little endian mode. The exceptions are PPC740
11319 and PPC750 which permit the instructions usage in little endian
11324 Generate code that uses (does not use) the load string instructions
11325 and the store string word instructions to save multiple registers
11326 and do small block moves. These instructions are generated by
11327 default on POWER systems, and not generated on PowerPC systems.
11328 Do not use `-mstring' on little endian PowerPC systems, since those
11329 instructions do not work when the processor is in little endian
11330 mode. The exceptions are PPC740 and PPC750 which permit the
11331 instructions usage in little endian mode.
11335 Generate code that uses (does not use) the load or store
11336 instructions that update the base register to the address of the
11337 calculated memory location. These instructions are generated by
11338 default. If you use `-mno-update', there is a small window
11339 between the time that the stack pointer is updated and the address
11340 of the previous frame is stored, which means code that walks the
11341 stack frame across interrupts or signals may get corrupted data.
11345 Generate code that uses (does not use) the floating point multiply
11346 and accumulate instructions. These instructions are generated by
11347 default if hardware floating is used.
11351 Generate code that uses (does not use) the half-word multiply and
11352 multiply-accumulate instructions on the IBM 405 and 440 processors.
11353 These instructions are generated by default when targetting those
11358 Generate code that uses (does not use) the string-search `dlmzb'
11359 instruction on the IBM 405 and 440 processors. This instruction is
11360 generated by default when targetting those processors.
11364 On System V.4 and embedded PowerPC systems do not (do) force
11365 structures and unions that contain bit-fields to be aligned to the
11366 base type of the bit-field.
11368 For example, by default a structure containing nothing but 8
11369 `unsigned' bit-fields of length 1 would be aligned to a 4 byte
11370 boundary and have a size of 4 bytes. By using `-mno-bit-align',
11371 the structure would be aligned to a 1 byte boundary and be one
11374 `-mno-strict-align'
11376 On System V.4 and embedded PowerPC systems do not (do) assume that
11377 unaligned memory references will be handled by the system.
11381 On embedded PowerPC systems generate code that allows (does not
11382 allow) the program to be relocated to a different address at
11383 runtime. If you use `-mrelocatable' on any module, all objects
11384 linked together must be compiled with `-mrelocatable' or
11385 `-mrelocatable-lib'.
11387 `-mrelocatable-lib'
11388 `-mno-relocatable-lib'
11389 On embedded PowerPC systems generate code that allows (does not
11390 allow) the program to be relocated to a different address at
11391 runtime. Modules compiled with `-mrelocatable-lib' can be linked
11392 with either modules compiled without `-mrelocatable' and
11393 `-mrelocatable-lib' or with modules compiled with the
11394 `-mrelocatable' options.
11398 On System V.4 and embedded PowerPC systems do not (do) assume that
11399 register 2 contains a pointer to a global area pointing to the
11400 addresses used in the program.
11404 On System V.4 and embedded PowerPC systems compile code for the
11405 processor in little endian mode. The `-mlittle-endian' option is
11406 the same as `-mlittle'.
11410 On System V.4 and embedded PowerPC systems compile code for the
11411 processor in big endian mode. The `-mbig-endian' option is the
11415 On Darwin and Mac OS X systems, compile code so that it is not
11416 relocatable, but that its external references are relocatable. The
11417 resulting code is suitable for applications, but not shared
11420 `-mprioritize-restricted-insns=PRIORITY'
11421 This option controls the priority that is assigned to
11422 dispatch-slot restricted instructions during the second scheduling
11423 pass. The argument PRIORITY takes the value 0/1/2 to assign
11424 NO/HIGHEST/SECOND-HIGHEST priority to dispatch slot restricted
11427 `-msched-costly-dep=DEPENDENCE_TYPE'
11428 This option controls which dependences are considered costly by
11429 the target during instruction scheduling. The argument
11430 DEPENDENCE_TYPE takes one of the following values: NO: no
11431 dependence is costly, ALL: all dependences are costly,
11432 TRUE_STORE_TO_LOAD: a true dependence from store to load is costly,
11433 STORE_TO_LOAD: any dependence from store to load is costly,
11434 NUMBER: any dependence which latency >= NUMBER is costly.
11436 `-minsert-sched-nops=SCHEME'
11437 This option controls which nop insertion scheme will be used during
11438 the second scheduling pass. The argument SCHEME takes one of the
11439 following values: NO: Don't insert nops. PAD: Pad with nops any
11440 dispatch group which has vacant issue slots, according to the
11441 scheduler's grouping. REGROUP_EXACT: Insert nops to force costly
11442 dependent insns into separate groups. Insert exactly as many nops
11443 as needed to force an insn to a new group, according to the
11444 estimated processor grouping. NUMBER: Insert nops to force costly
11445 dependent insns into separate groups. Insert NUMBER nops to force
11446 an insn to a new group.
11449 On System V.4 and embedded PowerPC systems compile code using
11450 calling conventions that adheres to the March 1995 draft of the
11451 System V Application Binary Interface, PowerPC processor
11452 supplement. This is the default unless you configured GCC using
11453 `powerpc-*-eabiaix'.
11456 Specify both `-mcall-sysv' and `-meabi' options.
11458 `-mcall-sysv-noeabi'
11459 Specify both `-mcall-sysv' and `-mno-eabi' options.
11462 On System V.4 and embedded PowerPC systems compile code for the
11463 Solaris operating system.
11466 On System V.4 and embedded PowerPC systems compile code for the
11467 Linux-based GNU system.
11470 On System V.4 and embedded PowerPC systems compile code for the
11471 Hurd-based GNU system.
11474 On System V.4 and embedded PowerPC systems compile code for the
11475 NetBSD operating system.
11477 `-maix-struct-return'
11478 Return all structures in memory (as specified by the AIX ABI).
11480 `-msvr4-struct-return'
11481 Return structures smaller than 8 bytes in registers (as specified
11485 Extend the current ABI with a particular extension, or remove such
11486 extension. Valid values are ALTIVEC, NO-ALTIVEC, SPE, NO-SPE,
11487 IBMLONGDOUBLE, IEEELONGDOUBLE.
11490 Extend the current ABI with SPE ABI extensions. This does not
11491 change the default ABI, instead it adds the SPE ABI extensions to
11495 Disable Booke SPE ABI extensions for the current ABI.
11497 `-mabi=ibmlongdouble'
11498 Change the current ABI to use IBM extended precision long double.
11499 This is a PowerPC 32-bit SYSV ABI option.
11501 `-mabi=ieeelongdouble'
11502 Change the current ABI to use IEEE extended precision long double.
11503 This is a PowerPC 32-bit Linux ABI option.
11507 On System V.4 and embedded PowerPC systems assume that all calls to
11508 variable argument functions are properly prototyped. Otherwise,
11509 the compiler must insert an instruction before every non
11510 prototyped call to set or clear bit 6 of the condition code
11511 register (CR) to indicate whether floating point values were
11512 passed in the floating point registers in case the function takes
11513 a variable arguments. With `-mprototype', only calls to
11514 prototyped variable argument functions will set or clear the bit.
11517 On embedded PowerPC systems, assume that the startup module is
11518 called `sim-crt0.o' and that the standard C libraries are
11519 `libsim.a' and `libc.a'. This is the default for
11520 `powerpc-*-eabisim'. configurations.
11523 On embedded PowerPC systems, assume that the startup module is
11524 called `crt0.o' and the standard C libraries are `libmvme.a' and
11528 On embedded PowerPC systems, assume that the startup module is
11529 called `crt0.o' and the standard C libraries are `libads.a' and
11533 On embedded PowerPC systems, assume that the startup module is
11534 called `crt0.o' and the standard C libraries are `libyk.a' and
11538 On System V.4 and embedded PowerPC systems, specify that you are
11539 compiling for a VxWorks system.
11542 Specify that you are compiling for the WindISS simulation
11546 On embedded PowerPC systems, set the PPC_EMB bit in the ELF flags
11547 header to indicate that `eabi' extended relocations are used.
11551 On System V.4 and embedded PowerPC systems do (do not) adhere to
11552 the Embedded Applications Binary Interface (eabi) which is a set of
11553 modifications to the System V.4 specifications. Selecting `-meabi'
11554 means that the stack is aligned to an 8 byte boundary, a function
11555 `__eabi' is called to from `main' to set up the eabi environment,
11556 and the `-msdata' option can use both `r2' and `r13' to point to
11557 two separate small data areas. Selecting `-mno-eabi' means that
11558 the stack is aligned to a 16 byte boundary, do not call an
11559 initialization function from `main', and the `-msdata' option will
11560 only use `r13' to point to a single small data area. The `-meabi'
11561 option is on by default if you configured GCC using one of the
11562 `powerpc*-*-eabi*' options.
11565 On System V.4 and embedded PowerPC systems, put small initialized
11566 `const' global and static data in the `.sdata2' section, which is
11567 pointed to by register `r2'. Put small initialized non-`const'
11568 global and static data in the `.sdata' section, which is pointed
11569 to by register `r13'. Put small uninitialized global and static
11570 data in the `.sbss' section, which is adjacent to the `.sdata'
11571 section. The `-msdata=eabi' option is incompatible with the
11572 `-mrelocatable' option. The `-msdata=eabi' option also sets the
11576 On System V.4 and embedded PowerPC systems, put small global and
11577 static data in the `.sdata' section, which is pointed to by
11578 register `r13'. Put small uninitialized global and static data in
11579 the `.sbss' section, which is adjacent to the `.sdata' section.
11580 The `-msdata=sysv' option is incompatible with the `-mrelocatable'
11585 On System V.4 and embedded PowerPC systems, if `-meabi' is used,
11586 compile code the same as `-msdata=eabi', otherwise compile code the
11587 same as `-msdata=sysv'.
11590 On System V.4 and embedded PowerPC systems, put small global data
11591 in the `.sdata' section. Put small uninitialized global data in
11592 the `.sbss' section. Do not use register `r13' to address small
11593 data however. This is the default behavior unless other `-msdata'
11598 On embedded PowerPC systems, put all initialized global and static
11599 data in the `.data' section, and all uninitialized data in the
11603 On embedded PowerPC systems, put global and static items less than
11604 or equal to NUM bytes into the small data or bss sections instead
11605 of the normal data or bss section. By default, NUM is 8. The `-G
11606 NUM' switch is also passed to the linker. All modules should be
11607 compiled with the same `-G NUM' value.
11611 On System V.4 and embedded PowerPC systems do (do not) emit
11612 register names in the assembly language output using symbolic
11617 By default assume that all calls are far away so that a longer more
11618 expensive calling sequence is required. This is required for calls
11619 further than 32 megabytes (33,554,432 bytes) from the current
11620 location. A short call will be generated if the compiler knows
11621 the call cannot be that far away. This setting can be overridden
11622 by the `shortcall' function attribute, or by `#pragma longcall(0)'.
11624 Some linkers are capable of detecting out-of-range calls and
11625 generating glue code on the fly. On these systems, long calls are
11626 unnecessary and generate slower code. As of this writing, the AIX
11627 linker can do this, as can the GNU linker for PowerPC/64. It is
11628 planned to add this feature to the GNU linker for 32-bit PowerPC
11631 On Darwin/PPC systems, `#pragma longcall' will generate "jbsr
11632 callee, L42", plus a "branch island" (glue code). The two target
11633 addresses represent the callee and the "branch island". The
11634 Darwin/PPC linker will prefer the first address and generate a "bl
11635 callee" if the PPC "bl" instruction will reach the callee directly;
11636 otherwise, the linker will generate "bl L42" to call the "branch
11637 island". The "branch island" is appended to the body of the
11638 calling function; it computes the full 32-bit address of the callee
11641 On Mach-O (Darwin) systems, this option directs the compiler emit
11642 to the glue for every direct call, and the Darwin linker decides
11643 whether to use or discard it.
11645 In the future, we may cause GCC to ignore all longcall
11646 specifications when the linker is known to generate glue.
11649 Adds support for multithreading with the "pthreads" library. This
11650 option sets flags for both the preprocessor and linker.
11654 File: gcc.info, Node: S/390 and zSeries Options, Next: Score Options, Prev: RS/6000 and PowerPC Options, Up: Submodel Options
11656 3.17.28 S/390 and zSeries Options
11657 ---------------------------------
11659 These are the `-m' options defined for the S/390 and zSeries
11664 Use (do not use) the hardware floating-point instructions and
11665 registers for floating-point operations. When `-msoft-float' is
11666 specified, functions in `libgcc.a' will be used to perform
11667 floating-point operations. When `-mhard-float' is specified, the
11668 compiler generates IEEE floating-point instructions. This is the
11672 `-mlong-double-128'
11673 These switches control the size of `long double' type. A size of
11674 64bit makes the `long double' type equivalent to the `double'
11675 type. This is the default.
11679 Store (do not store) the address of the caller's frame as
11680 backchain pointer into the callee's stack frame. A backchain may
11681 be needed to allow debugging using tools that do not understand
11682 DWARF-2 call frame information. When `-mno-packed-stack' is in
11683 effect, the backchain pointer is stored at the bottom of the stack
11684 frame; when `-mpacked-stack' is in effect, the backchain is placed
11685 into the topmost word of the 96/160 byte register save area.
11687 In general, code compiled with `-mbackchain' is call-compatible
11688 with code compiled with `-mmo-backchain'; however, use of the
11689 backchain for debugging purposes usually requires that the whole
11690 binary is built with `-mbackchain'. Note that the combination of
11691 `-mbackchain', `-mpacked-stack' and `-mhard-float' is not
11692 supported. In order to build a linux kernel use `-msoft-float'.
11694 The default is to not maintain the backchain.
11698 `-mno-packed-stack'
11699 Use (do not use) the packed stack layout. When
11700 `-mno-packed-stack' is specified, the compiler uses the all fields
11701 of the 96/160 byte register save area only for their default
11702 purpose; unused fields still take up stack space. When
11703 `-mpacked-stack' is specified, register save slots are densely
11704 packed at the top of the register save area; unused space is
11705 reused for other purposes, allowing for more efficient use of the
11706 available stack space. However, when `-mbackchain' is also in
11707 effect, the topmost word of the save area is always used to store
11708 the backchain, and the return address register is always saved two
11709 words below the backchain.
11711 As long as the stack frame backchain is not used, code generated
11712 with `-mpacked-stack' is call-compatible with code generated with
11713 `-mno-packed-stack'. Note that some non-FSF releases of GCC 2.95
11714 for S/390 or zSeries generated code that uses the stack frame
11715 backchain at run time, not just for debugging purposes. Such code
11716 is not call-compatible with code compiled with `-mpacked-stack'.
11717 Also, note that the combination of `-mbackchain', `-mpacked-stack'
11718 and `-mhard-float' is not supported. In order to build a linux
11719 kernel use `-msoft-float'.
11721 The default is to not use the packed stack layout.
11725 Generate (or do not generate) code using the `bras' instruction to
11726 do subroutine calls. This only works reliably if the total
11727 executable size does not exceed 64k. The default is to use the
11728 `basr' instruction instead, which does not have this limitation.
11732 When `-m31' is specified, generate code compliant to the GNU/Linux
11733 for S/390 ABI. When `-m64' is specified, generate code compliant
11734 to the GNU/Linux for zSeries ABI. This allows GCC in particular
11735 to generate 64-bit instructions. For the `s390' targets, the
11736 default is `-m31', while the `s390x' targets default to `-m64'.
11740 When `-mzarch' is specified, generate code using the instructions
11741 available on z/Architecture. When `-mesa' is specified, generate
11742 code using the instructions available on ESA/390. Note that
11743 `-mesa' is not possible with `-m64'. When generating code
11744 compliant to the GNU/Linux for S/390 ABI, the default is `-mesa'.
11745 When generating code compliant to the GNU/Linux for zSeries ABI,
11746 the default is `-mzarch'.
11750 Generate (or do not generate) code using the `mvcle' instruction
11751 to perform block moves. When `-mno-mvcle' is specified, use a
11752 `mvc' loop instead. This is the default unless optimizing for
11757 Print (or do not print) additional debug information when
11758 compiling. The default is to not print debug information.
11761 Generate code that will run on CPU-TYPE, which is the name of a
11762 system representing a certain processor type. Possible values for
11763 CPU-TYPE are `g5', `g6', `z900', and `z990'. When generating code
11764 using the instructions available on z/Architecture, the default is
11765 `-march=z900'. Otherwise, the default is `-march=g5'.
11768 Tune to CPU-TYPE everything applicable about the generated code,
11769 except for the ABI and the set of available instructions. The
11770 list of CPU-TYPE values is the same as for `-march'. The default
11771 is the value used for `-march'.
11775 Generate code that adds (does not add) in TPF OS specific branches
11776 to trace routines in the operating system. This option is off by
11777 default, even when compiling for the TPF OS.
11781 Generate code that uses (does not use) the floating point multiply
11782 and accumulate instructions. These instructions are generated by
11783 default if hardware floating point is used.
11785 `-mwarn-framesize=FRAMESIZE'
11786 Emit a warning if the current function exceeds the given frame
11787 size. Because this is a compile time check it doesn't need to be
11788 a real problem when the program runs. It is intended to identify
11789 functions which most probably cause a stack overflow. It is
11790 useful to be used in an environment with limited stack size e.g.
11793 `-mwarn-dynamicstack'
11794 Emit a warning if the function calls alloca or uses dynamically
11795 sized arrays. This is generally a bad idea with a limited stack
11798 `-mstack-guard=STACK-GUARD'
11800 `-mstack-size=STACK-SIZE'
11801 These arguments always have to be used in conjunction. If they
11802 are present the s390 back end emits additional instructions in the
11803 function prologue which trigger a trap if the stack size is
11804 STACK-GUARD bytes above the STACK-SIZE (remember that the stack on
11805 s390 grows downward). These options are intended to be used to
11806 help debugging stack overflow problems. The additionally emitted
11807 code causes only little overhead and hence can also be used in
11808 production like systems without greater performance degradation.
11809 The given values have to be exact powers of 2 and STACK-SIZE has
11810 to be greater than STACK-GUARD without exceeding 64k. In order to
11811 be efficient the extra code makes the assumption that the stack
11812 starts at an address aligned to the value given by STACK-SIZE.
11815 File: gcc.info, Node: Score Options, Next: SH Options, Prev: S/390 and zSeries Options, Up: Submodel Options
11817 3.17.29 Score Options
11818 ---------------------
11820 These options are defined for Score implementations:
11823 Compile code for big endian mode. This is the default.
11826 Compile code for little endian mode.
11829 Disable generate bcnz instruction.
11832 Enable generate unaligned load and store instruction.
11835 Enable the use of multiply-accumulate instructions. Disabled by
11839 Specify the SCORE5 as the target architecture.
11842 Specify the SCORE5U of the target architecture.
11845 Specify the SCORE7 as the target architecture. This is the default.
11848 Specify the SCORE7D as the target architecture.
11851 File: gcc.info, Node: SH Options, Next: SPARC Options, Prev: Score Options, Up: Submodel Options
11856 These `-m' options are defined for the SH implementations:
11859 Generate code for the SH1.
11862 Generate code for the SH2.
11865 Generate code for the SH2e.
11868 Generate code for the SH3.
11871 Generate code for the SH3e.
11874 Generate code for the SH4 without a floating-point unit.
11877 Generate code for the SH4 with a floating-point unit that only
11878 supports single-precision arithmetic.
11881 Generate code for the SH4 assuming the floating-point unit is in
11882 single-precision mode by default.
11885 Generate code for the SH4.
11888 Generate code for the SH4al-dsp, or for a SH4a in such a way that
11889 the floating-point unit is not used.
11892 Generate code for the SH4a, in such a way that no double-precision
11893 floating point operations are used.
11896 Generate code for the SH4a assuming the floating-point unit is in
11897 single-precision mode by default.
11900 Generate code for the SH4a.
11903 Same as `-m4a-nofpu', except that it implicitly passes `-dsp' to
11904 the assembler. GCC doesn't generate any DSP instructions at the
11908 Compile code for the processor in big endian mode.
11911 Compile code for the processor in little endian mode.
11914 Align doubles at 64-bit boundaries. Note that this changes the
11915 calling conventions, and thus some functions from the standard C
11916 library will not work unless you recompile it first with
11920 Shorten some address references at link time, when possible; uses
11921 the linker option `-relax'.
11924 Use 32-bit offsets in `switch' tables. The default is to use
11928 Enable the use of the instruction `fmovd'.
11931 Comply with the calling conventions defined by Renesas.
11934 Comply with the calling conventions defined by Renesas.
11937 Comply with the calling conventions defined for GCC before the
11938 Renesas conventions were available. This option is the default
11939 for all targets of the SH toolchain except for `sh-symbianelf'.
11942 Mark the `MAC' register as call-clobbered, even if `-mhitachi' is
11946 Increase IEEE-compliance of floating-point code. At the moment,
11947 this is equivalent to `-fno-finite-math-only'. When generating 16
11948 bit SH opcodes, getting IEEE-conforming results for comparisons of
11949 NANs / infinities incurs extra overhead in every floating point
11950 comparison, therefore the default is set to `-ffinite-math-only'.
11953 Dump instruction size and location in the assembly code.
11956 This option is deprecated. It pads structures to multiple of 4
11957 bytes, which is incompatible with the SH ABI.
11960 Optimize for space instead of speed. Implied by `-Os'.
11963 When generating position-independent code, emit function calls
11964 using the Global Offset Table instead of the Procedure Linkage
11968 Generate a library function call to invalidate instruction cache
11969 entries, after fixing up a trampoline. This library function call
11970 doesn't assume it can write to the whole memory address space.
11971 This is the default when the target is `sh-*-linux*'.
11974 Set the cost to assume for a multiply insn.
11977 Set the division strategy to use for SHmedia code. STRATEGY must
11978 be one of: call, call2, fp, inv, inv:minlat, inv20u, inv20l,
11979 inv:call, inv:call2, inv:fp . "fp" performs the operation in
11980 floating point. This has a very high latency, but needs only a
11981 few instructions, so it might be a good choice if your code has
11982 enough easily exploitable ILP to allow the compiler to schedule
11983 the floating point instructions together with other instructions.
11984 Division by zero causes a floating point exception. "inv" uses
11985 integer operations to calculate the inverse of the divisor, and
11986 then multiplies the dividend with the inverse. This strategy
11987 allows cse and hoisting of the inverse calculation. Division by
11988 zero calculates an unspecified result, but does not trap.
11989 "inv:minlat" is a variant of "inv" where if no cse / hoisting
11990 opportunities have been found, or if the entire operation has been
11991 hoisted to the same place, the last stages of the inverse
11992 calculation are intertwined with the final multiply to reduce the
11993 overall latency, at the expense of using a few more instructions,
11994 and thus offering fewer scheduling opportunities with other code.
11995 "call" calls a library function that usually implements the
11996 inv:minlat strategy. This gives high code density for
11997 m5-*media-nofpu compilations. "call2" uses a different entry
11998 point of the same library function, where it assumes that a
11999 pointer to a lookup table has already been set up, which exposes
12000 the pointer load to cse / code hoisting optimizations.
12001 "inv:call", "inv:call2" and "inv:fp" all use the "inv" algorithm
12002 for initial code generation, but if the code stays unoptimized,
12003 revert to the "call", "call2", or "fp" strategies, respectively.
12004 Note that the potentially-trapping side effect of division by zero
12005 is carried by a separate instruction, so it is possible that all
12006 the integer instructions are hoisted out, but the marker for the
12007 side effect stays where it is. A recombination to fp operations
12008 or a call is not possible in that case. "inv20u" and "inv20l" are
12009 variants of the "inv:minlat" strategy. In the case that the
12010 inverse calculation was nor separated from the multiply, they speed
12011 up division where the dividend fits into 20 bits (plus sign where
12012 applicable), by inserting a test to skip a number of operations in
12013 this case; this test slows down the case of larger dividends.
12014 inv20u assumes the case of a such a small dividend to be unlikely,
12015 and inv20l assumes it to be likely.
12017 `-mdivsi3_libfunc=NAME'
12018 Set the name of the library function used for 32 bit signed
12019 division to NAME. This only affect the name used in the call and
12020 inv:call division strategies, and the compiler will still expect
12021 the same sets of input/output/clobbered registers as if this
12022 option was not present.
12025 Throttle unrolling to avoid thrashing target registers. This
12026 option only has an effect if the gcc code base supports the
12027 TARGET_ADJUST_UNROLL_MAX target hook.
12029 `-mindexed-addressing'
12030 Enable the use of the indexed addressing mode for
12031 SHmedia32/SHcompact. This is only safe if the hardware and/or OS
12032 implement 32 bit wrap-around semantics for the indexed addressing
12033 mode. The architecture allows the implementation of processors
12034 with 64 bit MMU, which the OS could use to get 32 bit addressing,
12035 but since no current hardware implementation supports this or any
12036 other way to make the indexed addressing mode safe to use in the
12037 32 bit ABI, the default is -mno-indexed-addressing.
12039 `-mgettrcost=NUMBER'
12040 Set the cost assumed for the gettr instruction to NUMBER. The
12041 default is 2 if `-mpt-fixed' is in effect, 100 otherwise.
12044 Assume pt* instructions won't trap. This will generally generate
12045 better scheduled code, but is unsafe on current hardware. The
12046 current architecture definition says that ptabs and ptrel trap
12047 when the target anded with 3 is 3. This has the unintentional
12048 effect of making it unsafe to schedule ptabs / ptrel before a
12049 branch, or hoist it out of a loop. For example,
12050 __do_global_ctors, a part of libgcc that runs constructors at
12051 program startup, calls functions in a list which is delimited by
12052 -1. With the -mpt-fixed option, the ptabs will be done before
12053 testing against -1. That means that all the constructors will be
12054 run a bit quicker, but when the loop comes to the end of the list,
12055 the program crashes because ptabs loads -1 into a target register.
12056 Since this option is unsafe for any hardware implementing the
12057 current architecture specification, the default is -mno-pt-fixed.
12058 Unless the user specifies a specific cost with `-mgettrcost',
12059 -mno-pt-fixed also implies `-mgettrcost=100'; this deters register
12060 allocation using target registers for storing ordinary integers.
12062 `-minvalid-symbols'
12063 Assume symbols might be invalid. Ordinary function symbols
12064 generated by the compiler will always be valid to load with
12065 movi/shori/ptabs or movi/shori/ptrel, but with assembler and/or
12066 linker tricks it is possible to generate symbols that will cause
12067 ptabs / ptrel to trap. This option is only meaningful when
12068 `-mno-pt-fixed' is in effect. It will then prevent
12069 cross-basic-block cse, hoisting and most scheduling of symbol
12070 loads. The default is `-mno-invalid-symbols'.
12073 File: gcc.info, Node: SPARC Options, Next: System V Options, Prev: SH Options, Up: Submodel Options
12075 3.17.31 SPARC Options
12076 ---------------------
12078 These `-m' options are supported on the SPARC:
12082 Specify `-mapp-regs' to generate output using the global registers
12083 2 through 4, which the SPARC SVR4 ABI reserves for applications.
12084 This is the default.
12086 To be fully SVR4 ABI compliant at the cost of some performance
12087 loss, specify `-mno-app-regs'. You should compile libraries and
12088 system software with this option.
12092 Generate output containing floating point instructions. This is
12097 Generate output containing library calls for floating point.
12098 *Warning:* the requisite libraries are not available for all SPARC
12099 targets. Normally the facilities of the machine's usual C
12100 compiler are used, but this cannot be done directly in
12101 cross-compilation. You must make your own arrangements to provide
12102 suitable library functions for cross-compilation. The embedded
12103 targets `sparc-*-aout' and `sparclite-*-*' do provide software
12104 floating point support.
12106 `-msoft-float' changes the calling convention in the output file;
12107 therefore, it is only useful if you compile _all_ of a program with
12108 this option. In particular, you need to compile `libgcc.a', the
12109 library that comes with GCC, with `-msoft-float' in order for this
12112 `-mhard-quad-float'
12113 Generate output containing quad-word (long double) floating point
12116 `-msoft-quad-float'
12117 Generate output containing library calls for quad-word (long
12118 double) floating point instructions. The functions called are
12119 those specified in the SPARC ABI. This is the default.
12121 As of this writing, there are no SPARC implementations that have
12122 hardware support for the quad-word floating point instructions.
12123 They all invoke a trap handler for one of these instructions, and
12124 then the trap handler emulates the effect of the instruction.
12125 Because of the trap handler overhead, this is much slower than
12126 calling the ABI library routines. Thus the `-msoft-quad-float'
12127 option is the default.
12129 `-mno-unaligned-doubles'
12130 `-munaligned-doubles'
12131 Assume that doubles have 8 byte alignment. This is the default.
12133 With `-munaligned-doubles', GCC assumes that doubles have 8 byte
12134 alignment only if they are contained in another type, or if they
12135 have an absolute address. Otherwise, it assumes they have 4 byte
12136 alignment. Specifying this option avoids some rare compatibility
12137 problems with code generated by other compilers. It is not the
12138 default because it results in a performance loss, especially for
12139 floating point code.
12141 `-mno-faster-structs'
12143 With `-mfaster-structs', the compiler assumes that structures
12144 should have 8 byte alignment. This enables the use of pairs of
12145 `ldd' and `std' instructions for copies in structure assignment,
12146 in place of twice as many `ld' and `st' pairs. However, the use
12147 of this changed alignment directly violates the SPARC ABI. Thus,
12148 it's intended only for use on targets where the developer
12149 acknowledges that their resulting code will not be directly in
12150 line with the rules of the ABI.
12153 `-mimpure-text', used in addition to `-shared', tells the compiler
12154 to not pass `-z text' to the linker when linking a shared object.
12155 Using this option, you can link position-dependent code into a
12158 `-mimpure-text' suppresses the "relocations remain against
12159 allocatable but non-writable sections" linker error message.
12160 However, the necessary relocations will trigger copy-on-write, and
12161 the shared object is not actually shared across processes.
12162 Instead of using `-mimpure-text', you should compile all source
12163 code with `-fpic' or `-fPIC'.
12165 This option is only available on SunOS and Solaris.
12168 Set the instruction set, register set, and instruction scheduling
12169 parameters for machine type CPU_TYPE. Supported values for
12170 CPU_TYPE are `v7', `cypress', `v8', `supersparc', `sparclite',
12171 `f930', `f934', `hypersparc', `sparclite86x', `sparclet',
12172 `tsc701', `v9', `ultrasparc', `ultrasparc3', and `niagara'.
12174 Default instruction scheduling parameters are used for values that
12175 select an architecture and not an implementation. These are `v7',
12176 `v8', `sparclite', `sparclet', `v9'.
12178 Here is a list of each supported architecture and their supported
12182 v8: supersparc, hypersparc
12183 sparclite: f930, f934, sparclite86x
12185 v9: ultrasparc, ultrasparc3, niagara
12187 By default (unless configured otherwise), GCC generates code for
12188 the V7 variant of the SPARC architecture. With `-mcpu=cypress',
12189 the compiler additionally optimizes it for the Cypress CY7C602
12190 chip, as used in the SPARCStation/SPARCServer 3xx series. This is
12191 also appropriate for the older SPARCStation 1, 2, IPX etc.
12193 With `-mcpu=v8', GCC generates code for the V8 variant of the SPARC
12194 architecture. The only difference from V7 code is that the
12195 compiler emits the integer multiply and integer divide
12196 instructions which exist in SPARC-V8 but not in SPARC-V7. With
12197 `-mcpu=supersparc', the compiler additionally optimizes it for the
12198 SuperSPARC chip, as used in the SPARCStation 10, 1000 and 2000
12201 With `-mcpu=sparclite', GCC generates code for the SPARClite
12202 variant of the SPARC architecture. This adds the integer
12203 multiply, integer divide step and scan (`ffs') instructions which
12204 exist in SPARClite but not in SPARC-V7. With `-mcpu=f930', the
12205 compiler additionally optimizes it for the Fujitsu MB86930 chip,
12206 which is the original SPARClite, with no FPU. With `-mcpu=f934',
12207 the compiler additionally optimizes it for the Fujitsu MB86934
12208 chip, which is the more recent SPARClite with FPU.
12210 With `-mcpu=sparclet', GCC generates code for the SPARClet variant
12211 of the SPARC architecture. This adds the integer multiply,
12212 multiply/accumulate, integer divide step and scan (`ffs')
12213 instructions which exist in SPARClet but not in SPARC-V7. With
12214 `-mcpu=tsc701', the compiler additionally optimizes it for the
12215 TEMIC SPARClet chip.
12217 With `-mcpu=v9', GCC generates code for the V9 variant of the SPARC
12218 architecture. This adds 64-bit integer and floating-point move
12219 instructions, 3 additional floating-point condition code registers
12220 and conditional move instructions. With `-mcpu=ultrasparc', the
12221 compiler additionally optimizes it for the Sun UltraSPARC I/II/IIi
12222 chips. With `-mcpu=ultrasparc3', the compiler additionally
12223 optimizes it for the Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+
12224 chips. With `-mcpu=niagara', the compiler additionally optimizes
12225 it for Sun UltraSPARC T1 chips.
12228 Set the instruction scheduling parameters for machine type
12229 CPU_TYPE, but do not set the instruction set or register set that
12230 the option `-mcpu=CPU_TYPE' would.
12232 The same values for `-mcpu=CPU_TYPE' can be used for
12233 `-mtune=CPU_TYPE', but the only useful values are those that
12234 select a particular cpu implementation. Those are `cypress',
12235 `supersparc', `hypersparc', `f930', `f934', `sparclite86x',
12236 `tsc701', `ultrasparc', `ultrasparc3', and `niagara'.
12240 With `-mv8plus', GCC generates code for the SPARC-V8+ ABI. The
12241 difference from the V8 ABI is that the global and out registers are
12242 considered 64-bit wide. This is enabled by default on Solaris in
12243 32-bit mode for all SPARC-V9 processors.
12247 With `-mvis', GCC generates code that takes advantage of the
12248 UltraSPARC Visual Instruction Set extensions. The default is
12251 These `-m' options are supported in addition to the above on SPARC-V9
12252 processors in 64-bit environments:
12255 Generate code for a processor running in little-endian mode. It
12256 is only available for a few configurations and most notably not on
12261 Generate code for a 32-bit or 64-bit environment. The 32-bit
12262 environment sets int, long and pointer to 32 bits. The 64-bit
12263 environment sets int to 32 bits and long and pointer to 64 bits.
12266 Generate code for the Medium/Low code model: 64-bit addresses,
12267 programs must be linked in the low 32 bits of memory. Programs
12268 can be statically or dynamically linked.
12271 Generate code for the Medium/Middle code model: 64-bit addresses,
12272 programs must be linked in the low 44 bits of memory, the text and
12273 data segments must be less than 2GB in size and the data segment
12274 must be located within 2GB of the text segment.
12277 Generate code for the Medium/Anywhere code model: 64-bit
12278 addresses, programs may be linked anywhere in memory, the text and
12279 data segments must be less than 2GB in size and the data segment
12280 must be located within 2GB of the text segment.
12282 `-mcmodel=embmedany'
12283 Generate code for the Medium/Anywhere code model for embedded
12284 systems: 64-bit addresses, the text and data segments must be less
12285 than 2GB in size, both starting anywhere in memory (determined at
12286 link time). The global register %g4 points to the base of the
12287 data segment. Programs are statically linked and PIC is not
12292 With `-mstack-bias', GCC assumes that the stack pointer, and frame
12293 pointer if present, are offset by -2047 which must be added back
12294 when making stack frame references. This is the default in 64-bit
12295 mode. Otherwise, assume no such offset is present.
12297 These switches are supported in addition to the above on Solaris:
12300 Add support for multithreading using the Solaris threads library.
12301 This option sets flags for both the preprocessor and linker. This
12302 option does not affect the thread safety of object code produced
12303 by the compiler or that of libraries supplied with it.
12306 Add support for multithreading using the POSIX threads library.
12307 This option sets flags for both the preprocessor and linker. This
12308 option does not affect the thread safety of object code produced
12309 by the compiler or that of libraries supplied with it.
12312 This is a synonym for `-pthreads'.
12315 File: gcc.info, Node: System V Options, Next: TMS320C3x/C4x Options, Prev: SPARC Options, Up: Submodel Options
12317 3.17.32 Options for System V
12318 ----------------------------
12320 These additional options are available on System V Release 4 for
12321 compatibility with other compilers on those systems:
12324 Create a shared object. It is recommended that `-symbolic' or
12325 `-shared' be used instead.
12328 Identify the versions of each tool used by the compiler, in a
12329 `.ident' assembler directive in the output.
12332 Refrain from adding `.ident' directives to the output file (this is
12336 Search the directories DIRS, and no others, for libraries
12337 specified with `-l'.
12340 Look in the directory DIR to find the M4 preprocessor. The
12341 assembler uses this option.
12344 File: gcc.info, Node: TMS320C3x/C4x Options, Next: V850 Options, Prev: System V Options, Up: Submodel Options
12346 3.17.33 TMS320C3x/C4x Options
12347 -----------------------------
12349 These `-m' options are defined for TMS320C3x/C4x implementations:
12352 Set the instruction set, register set, and instruction scheduling
12353 parameters for machine type CPU_TYPE. Supported values for
12354 CPU_TYPE are `c30', `c31', `c32', `c40', and `c44'. The default
12355 is `c40' to generate code for the TMS320C40.
12361 Generates code for the big or small memory model. The small memory
12362 model assumed that all data fits into one 64K word page. At
12363 run-time the data page (DP) register must be set to point to the
12364 64K page containing the .bss and .data program sections. The big
12365 memory model is the default and requires reloading of the DP
12366 register for every direct memory access.
12370 Allow (disallow) allocation of general integer operands into the
12371 block count register BK.
12375 Enable (disable) generation of code using decrement and branch,
12376 DBcond(D), instructions. This is enabled by default for the C4x.
12377 To be on the safe side, this is disabled for the C3x, since the
12378 maximum iteration count on the C3x is 2^23 + 1 (but who iterates
12379 loops more than 2^23 times on the C3x?). Note that GCC will try
12380 to reverse a loop so that it can utilize the decrement and branch
12381 instruction, but will give up if there is more than one memory
12382 reference in the loop. Thus a loop where the loop counter is
12383 decremented can generate slightly more efficient code, in cases
12384 where the RPTB instruction cannot be utilized.
12388 Force the DP register to be saved on entry to an interrupt service
12389 routine (ISR), reloaded to point to the data section, and restored
12390 on exit from the ISR. This should not be required unless someone
12391 has violated the small memory model by modifying the DP register,
12392 say within an object library.
12396 For the C3x use the 24-bit MPYI instruction for integer multiplies
12397 instead of a library call to guarantee 32-bit results. Note that
12398 if one of the operands is a constant, then the multiplication will
12399 be performed using shifts and adds. If the `-mmpyi' option is not
12400 specified for the C3x, then squaring operations are performed
12401 inline instead of a library call.
12405 The C3x/C4x FIX instruction to convert a floating point value to an
12406 integer value chooses the nearest integer less than or equal to the
12407 floating point value rather than to the nearest integer. Thus if
12408 the floating point number is negative, the result will be
12409 incorrectly truncated an additional code is necessary to detect
12410 and correct this case. This option can be used to disable
12411 generation of the additional code required to correct the result.
12415 Enable (disable) generation of repeat block sequences using the
12416 RPTB instruction for zero overhead looping. The RPTB construct is
12417 only used for innermost loops that do not call functions or jump
12418 across the loop boundaries. There is no advantage having nested
12419 RPTB loops due to the overhead required to save and restore the
12420 RC, RS, and RE registers. This is enabled by default with `-O2'.
12424 Enable (disable) the use of the single instruction repeat
12425 instruction RPTS. If a repeat block contains a single
12426 instruction, and the loop count can be guaranteed to be less than
12427 the value COUNT, GCC will emit a RPTS instruction instead of a
12428 RPTB. If no value is specified, then a RPTS will be emitted even
12429 if the loop count cannot be determined at compile time. Note that
12430 the repeated instruction following RPTS does not have to be
12431 reloaded from memory each iteration, thus freeing up the CPU buses
12432 for operands. However, since interrupts are blocked by this
12433 instruction, it is disabled by default.
12436 `-mno-loop-unsigned'
12437 The maximum iteration count when using RPTS and RPTB (and DB on
12438 the C40) is 2^31 + 1 since these instructions test if the
12439 iteration count is negative to terminate the loop. If the
12440 iteration count is unsigned there is a possibility than the 2^31 +
12441 1 maximum iteration count may be exceeded. This switch allows an
12442 unsigned iteration count.
12445 Try to emit an assembler syntax that the TI assembler (asm30) is
12446 happy with. This also enforces compatibility with the API
12447 employed by the TI C3x C compiler. For example, long doubles are
12448 passed as structures rather than in floating point registers.
12452 Generate code that uses registers (stack) for passing arguments to
12453 functions. By default, arguments are passed in registers where
12454 possible rather than by pushing arguments on to the stack.
12457 `-mno-parallel-insns'
12458 Allow the generation of parallel instructions. This is enabled by
12459 default with `-O2'.
12462 `-mno-parallel-mpy'
12463 Allow the generation of MPY||ADD and MPY||SUB parallel
12464 instructions, provided `-mparallel-insns' is also specified.
12465 These instructions have tight register constraints which can
12466 pessimize the code generation of large functions.
12470 File: gcc.info, Node: V850 Options, Next: VAX Options, Prev: TMS320C3x/C4x Options, Up: Submodel Options
12472 3.17.34 V850 Options
12473 --------------------
12475 These `-m' options are defined for V850 implementations:
12479 Treat all calls as being far away (near). If calls are assumed to
12480 be far away, the compiler will always load the functions address
12481 up into a register, and call indirect through the pointer.
12485 Do not optimize (do optimize) basic blocks that use the same index
12486 pointer 4 or more times to copy pointer into the `ep' register, and
12487 use the shorter `sld' and `sst' instructions. The `-mep' option
12488 is on by default if you optimize.
12490 `-mno-prolog-function'
12491 `-mprolog-function'
12492 Do not use (do use) external functions to save and restore
12493 registers at the prologue and epilogue of a function. The
12494 external functions are slower, but use less code space if more
12495 than one function saves the same number of registers. The
12496 `-mprolog-function' option is on by default if you optimize.
12499 Try to make the code as small as possible. At present, this just
12500 turns on the `-mep' and `-mprolog-function' options.
12503 Put static or global variables whose size is N bytes or less into
12504 the tiny data area that register `ep' points to. The tiny data
12505 area can hold up to 256 bytes in total (128 bytes for byte
12509 Put static or global variables whose size is N bytes or less into
12510 the small data area that register `gp' points to. The small data
12511 area can hold up to 64 kilobytes.
12514 Put static or global variables whose size is N bytes or less into
12515 the first 32 kilobytes of memory.
12518 Specify that the target processor is the V850.
12521 Generate code suitable for big switch tables. Use this option
12522 only if the assembler/linker complain about out of range branches
12523 within a switch table.
12526 This option will cause r2 and r5 to be used in the code generated
12527 by the compiler. This setting is the default.
12530 This option will cause r2 and r5 to be treated as fixed registers.
12533 Specify that the target processor is the V850E1. The preprocessor
12534 constants `__v850e1__' and `__v850e__' will be defined if this
12538 Specify that the target processor is the V850E. The preprocessor
12539 constant `__v850e__' will be defined if this option is used.
12541 If neither `-mv850' nor `-mv850e' nor `-mv850e1' are defined then
12542 a default target processor will be chosen and the relevant
12543 `__v850*__' preprocessor constant will be defined.
12545 The preprocessor constants `__v850' and `__v851__' are always
12546 defined, regardless of which processor variant is the target.
12549 This option will suppress generation of the CALLT instruction for
12550 the v850e and v850e1 flavors of the v850 architecture. The
12551 default is `-mno-disable-callt' which allows the CALLT instruction
12556 File: gcc.info, Node: VAX Options, Next: x86-64 Options, Prev: V850 Options, Up: Submodel Options
12558 3.17.35 VAX Options
12559 -------------------
12561 These `-m' options are defined for the VAX:
12564 Do not output certain jump instructions (`aobleq' and so on) that
12565 the Unix assembler for the VAX cannot handle across long ranges.
12568 Do output those jump instructions, on the assumption that you will
12569 assemble with the GNU assembler.
12572 Output code for g-format floating point numbers instead of
12576 File: gcc.info, Node: x86-64 Options, Next: Xstormy16 Options, Prev: VAX Options, Up: Submodel Options
12578 3.17.36 x86-64 Options
12579 ----------------------
12581 These are listed under *Note i386 and x86-64 Options::.
12584 File: gcc.info, Node: Xstormy16 Options, Next: Xtensa Options, Prev: x86-64 Options, Up: Submodel Options
12586 3.17.37 Xstormy16 Options
12587 -------------------------
12589 These options are defined for Xstormy16:
12592 Choose startup files and linker script suitable for the simulator.
12595 File: gcc.info, Node: Xtensa Options, Next: zSeries Options, Prev: Xstormy16 Options, Up: Submodel Options
12597 3.17.38 Xtensa Options
12598 ----------------------
12600 These options are supported for Xtensa targets:
12604 Enable or disable use of `CONST16' instructions for loading
12605 constant values. The `CONST16' instruction is currently not a
12606 standard option from Tensilica. When enabled, `CONST16'
12607 instructions are always used in place of the standard `L32R'
12608 instructions. The use of `CONST16' is enabled by default only if
12609 the `L32R' instruction is not available.
12613 Enable or disable use of fused multiply/add and multiply/subtract
12614 instructions in the floating-point option. This has no effect if
12615 the floating-point option is not also enabled. Disabling fused
12616 multiply/add and multiply/subtract instructions forces the
12617 compiler to use separate instructions for the multiply and
12618 add/subtract operations. This may be desirable in some cases
12619 where strict IEEE 754-compliant results are required: the fused
12620 multiply add/subtract instructions do not round the intermediate
12621 result, thereby producing results with _more_ bits of precision
12622 than specified by the IEEE standard. Disabling fused multiply
12623 add/subtract instructions also ensures that the program output is
12624 not sensitive to the compiler's ability to combine multiply and
12625 add/subtract operations.
12627 `-mtext-section-literals'
12628 `-mno-text-section-literals'
12629 Control the treatment of literal pools. The default is
12630 `-mno-text-section-literals', which places literals in a separate
12631 section in the output file. This allows the literal pool to be
12632 placed in a data RAM/ROM, and it also allows the linker to combine
12633 literal pools from separate object files to remove redundant
12634 literals and improve code size. With `-mtext-section-literals',
12635 the literals are interspersed in the text section in order to keep
12636 them as close as possible to their references. This may be
12637 necessary for large assembly files.
12640 `-mno-target-align'
12641 When this option is enabled, GCC instructs the assembler to
12642 automatically align instructions to reduce branch penalties at the
12643 expense of some code density. The assembler attempts to widen
12644 density instructions to align branch targets and the instructions
12645 following call instructions. If there are not enough preceding
12646 safe density instructions to align a target, no widening will be
12647 performed. The default is `-mtarget-align'. These options do not
12648 affect the treatment of auto-aligned instructions like `LOOP',
12649 which the assembler will always align, either by widening density
12650 instructions or by inserting no-op instructions.
12654 When this option is enabled, GCC instructs the assembler to
12655 translate direct calls to indirect calls unless it can determine
12656 that the target of a direct call is in the range allowed by the
12657 call instruction. This translation typically occurs for calls to
12658 functions in other source files. Specifically, the assembler
12659 translates a direct `CALL' instruction into an `L32R' followed by
12660 a `CALLX' instruction. The default is `-mno-longcalls'. This
12661 option should be used in programs where the call target can
12662 potentially be out of range. This option is implemented in the
12663 assembler, not the compiler, so the assembly code generated by GCC
12664 will still show direct call instructions--look at the disassembled
12665 object code to see the actual instructions. Note that the
12666 assembler will use an indirect call for every cross-file call, not
12667 just those that really will be out of range.
12670 File: gcc.info, Node: zSeries Options, Prev: Xtensa Options, Up: Submodel Options
12672 3.17.39 zSeries Options
12673 -----------------------
12675 These are listed under *Note S/390 and zSeries Options::.
12678 File: gcc.info, Node: Code Gen Options, Next: Environment Variables, Prev: Submodel Options, Up: Invoking GCC
12680 3.18 Options for Code Generation Conventions
12681 ============================================
12683 These machine-independent options control the interface conventions
12684 used in code generation.
12686 Most of them have both positive and negative forms; the negative form
12687 of `-ffoo' would be `-fno-foo'. In the table below, only one of the
12688 forms is listed--the one which is not the default. You can figure out
12689 the other form by either removing `no-' or adding it.
12692 For front-ends that support it, generate additional code to check
12693 that indices used to access arrays are within the declared range.
12694 This is currently only supported by the Java and Fortran
12695 front-ends, where this option defaults to true and false
12699 This option generates traps for signed overflow on addition,
12700 subtraction, multiplication operations.
12703 This option instructs the compiler to assume that signed arithmetic
12704 overflow of addition, subtraction and multiplication wraps around
12705 using twos-complement representation. This flag enables some
12706 optimizations and disables others. This option is enabled by
12707 default for the Java front-end, as required by the Java language
12711 Enable exception handling. Generates extra code needed to
12712 propagate exceptions. For some targets, this implies GCC will
12713 generate frame unwind information for all functions, which can
12714 produce significant data size overhead, although it does not
12715 affect execution. If you do not specify this option, GCC will
12716 enable it by default for languages like C++ which normally require
12717 exception handling, and disable it for languages like C that do
12718 not normally require it. However, you may need to enable this
12719 option when compiling C code that needs to interoperate properly
12720 with exception handlers written in C++. You may also wish to
12721 disable this option if you are compiling older C++ programs that
12722 don't use exception handling.
12724 `-fnon-call-exceptions'
12725 Generate code that allows trapping instructions to throw
12726 exceptions. Note that this requires platform-specific runtime
12727 support that does not exist everywhere. Moreover, it only allows
12728 _trapping_ instructions to throw exceptions, i.e. memory
12729 references or floating point instructions. It does not allow
12730 exceptions to be thrown from arbitrary signal handlers such as
12734 Similar to `-fexceptions', except that it will just generate any
12735 needed static data, but will not affect the generated code in any
12736 other way. You will normally not enable this option; instead, a
12737 language processor that needs this handling would enable it on
12740 `-fasynchronous-unwind-tables'
12741 Generate unwind table in dwarf2 format, if supported by target
12742 machine. The table is exact at each instruction boundary, so it
12743 can be used for stack unwinding from asynchronous events (such as
12744 debugger or garbage collector).
12746 `-fpcc-struct-return'
12747 Return "short" `struct' and `union' values in memory like longer
12748 ones, rather than in registers. This convention is less
12749 efficient, but it has the advantage of allowing intercallability
12750 between GCC-compiled files and files compiled with other
12751 compilers, particularly the Portable C Compiler (pcc).
12753 The precise convention for returning structures in memory depends
12754 on the target configuration macros.
12756 Short structures and unions are those whose size and alignment
12757 match that of some integer type.
12759 *Warning:* code compiled with the `-fpcc-struct-return' switch is
12760 not binary compatible with code compiled with the
12761 `-freg-struct-return' switch. Use it to conform to a non-default
12762 application binary interface.
12764 `-freg-struct-return'
12765 Return `struct' and `union' values in registers when possible.
12766 This is more efficient for small structures than
12767 `-fpcc-struct-return'.
12769 If you specify neither `-fpcc-struct-return' nor
12770 `-freg-struct-return', GCC defaults to whichever convention is
12771 standard for the target. If there is no standard convention, GCC
12772 defaults to `-fpcc-struct-return', except on targets where GCC is
12773 the principal compiler. In those cases, we can choose the
12774 standard, and we chose the more efficient register return
12777 *Warning:* code compiled with the `-freg-struct-return' switch is
12778 not binary compatible with code compiled with the
12779 `-fpcc-struct-return' switch. Use it to conform to a non-default
12780 application binary interface.
12783 Allocate to an `enum' type only as many bytes as it needs for the
12784 declared range of possible values. Specifically, the `enum' type
12785 will be equivalent to the smallest integer type which has enough
12788 *Warning:* the `-fshort-enums' switch causes GCC to generate code
12789 that is not binary compatible with code generated without that
12790 switch. Use it to conform to a non-default application binary
12794 Use the same size for `double' as for `float'.
12796 *Warning:* the `-fshort-double' switch causes GCC to generate code
12797 that is not binary compatible with code generated without that
12798 switch. Use it to conform to a non-default application binary
12802 Override the underlying type for `wchar_t' to be `short unsigned
12803 int' instead of the default for the target. This option is useful
12804 for building programs to run under WINE.
12806 *Warning:* the `-fshort-wchar' switch causes GCC to generate code
12807 that is not binary compatible with code generated without that
12808 switch. Use it to conform to a non-default application binary
12812 In C, allocate even uninitialized global variables in the data
12813 section of the object file, rather than generating them as common
12814 blocks. This has the effect that if the same variable is declared
12815 (without `extern') in two different compilations, you will get an
12816 error when you link them. The only reason this might be useful is
12817 if you wish to verify that the program will work on other systems
12818 which always work this way.
12821 Ignore the `#ident' directive.
12823 `-finhibit-size-directive'
12824 Don't output a `.size' assembler directive, or anything else that
12825 would cause trouble if the function is split in the middle, and the
12826 two halves are placed at locations far apart in memory. This
12827 option is used when compiling `crtstuff.c'; you should not need to
12828 use it for anything else.
12831 Put extra commentary information in the generated assembly code to
12832 make it more readable. This option is generally only of use to
12833 those who actually need to read the generated assembly code
12834 (perhaps while debugging the compiler itself).
12836 `-fno-verbose-asm', the default, causes the extra information to
12837 be omitted and is useful when comparing two assembler files.
12840 Generate position-independent code (PIC) suitable for use in a
12841 shared library, if supported for the target machine. Such code
12842 accesses all constant addresses through a global offset table
12843 (GOT). The dynamic loader resolves the GOT entries when the
12844 program starts (the dynamic loader is not part of GCC; it is part
12845 of the operating system). If the GOT size for the linked
12846 executable exceeds a machine-specific maximum size, you get an
12847 error message from the linker indicating that `-fpic' does not
12848 work; in that case, recompile with `-fPIC' instead. (These
12849 maximums are 8k on the SPARC and 32k on the m68k and RS/6000. The
12850 386 has no such limit.)
12852 Position-independent code requires special support, and therefore
12853 works only on certain machines. For the 386, GCC supports PIC for
12854 System V but not for the Sun 386i. Code generated for the IBM
12855 RS/6000 is always position-independent.
12857 When this flag is set, the macros `__pic__' and `__PIC__' are
12861 If supported for the target machine, emit position-independent
12862 code, suitable for dynamic linking and avoiding any limit on the
12863 size of the global offset table. This option makes a difference
12864 on the m68k, PowerPC and SPARC.
12866 Position-independent code requires special support, and therefore
12867 works only on certain machines.
12869 When this flag is set, the macros `__pic__' and `__PIC__' are
12874 These options are similar to `-fpic' and `-fPIC', but generated
12875 position independent code can be only linked into executables.
12876 Usually these options are used when `-pie' GCC option will be used
12880 Do not use jump tables for switch statements even where it would be
12881 more efficient than other code generation strategies. This option
12882 is of use in conjunction with `-fpic' or `-fPIC' for building code
12883 which forms part of a dynamic linker and cannot reference the
12884 address of a jump table. On some targets, jump tables do not
12885 require a GOT and this option is not needed.
12888 Treat the register named REG as a fixed register; generated code
12889 should never refer to it (except perhaps as a stack pointer, frame
12890 pointer or in some other fixed role).
12892 REG must be the name of a register. The register names accepted
12893 are machine-specific and are defined in the `REGISTER_NAMES' macro
12894 in the machine description macro file.
12896 This flag does not have a negative form, because it specifies a
12900 Treat the register named REG as an allocable register that is
12901 clobbered by function calls. It may be allocated for temporaries
12902 or variables that do not live across a call. Functions compiled
12903 this way will not save and restore the register REG.
12905 It is an error to used this flag with the frame pointer or stack
12906 pointer. Use of this flag for other registers that have fixed
12907 pervasive roles in the machine's execution model will produce
12908 disastrous results.
12910 This flag does not have a negative form, because it specifies a
12914 Treat the register named REG as an allocable register saved by
12915 functions. It may be allocated even for temporaries or variables
12916 that live across a call. Functions compiled this way will save
12917 and restore the register REG if they use it.
12919 It is an error to used this flag with the frame pointer or stack
12920 pointer. Use of this flag for other registers that have fixed
12921 pervasive roles in the machine's execution model will produce
12922 disastrous results.
12924 A different sort of disaster will result from the use of this flag
12925 for a register in which function values may be returned.
12927 This flag does not have a negative form, because it specifies a
12930 `-fpack-struct[=N]'
12931 Without a value specified, pack all structure members together
12932 without holes. When a value is specified (which must be a small
12933 power of two), pack structure members according to this value,
12934 representing the maximum alignment (that is, objects with default
12935 alignment requirements larger than this will be output potentially
12936 unaligned at the next fitting location.
12938 *Warning:* the `-fpack-struct' switch causes GCC to generate code
12939 that is not binary compatible with code generated without that
12940 switch. Additionally, it makes the code suboptimal. Use it to
12941 conform to a non-default application binary interface.
12943 `-finstrument-functions'
12944 Generate instrumentation calls for entry and exit to functions.
12945 Just after function entry and just before function exit, the
12946 following profiling functions will be called with the address of
12947 the current function and its call site. (On some platforms,
12948 `__builtin_return_address' does not work beyond the current
12949 function, so the call site information may not be available to the
12950 profiling functions otherwise.)
12952 void __cyg_profile_func_enter (void *this_fn,
12954 void __cyg_profile_func_exit (void *this_fn,
12957 The first argument is the address of the start of the current
12958 function, which may be looked up exactly in the symbol table.
12960 This instrumentation is also done for functions expanded inline in
12961 other functions. The profiling calls will indicate where,
12962 conceptually, the inline function is entered and exited. This
12963 means that addressable versions of such functions must be
12964 available. If all your uses of a function are expanded inline,
12965 this may mean an additional expansion of code size. If you use
12966 `extern inline' in your C code, an addressable version of such
12967 functions must be provided. (This is normally the case anyways,
12968 but if you get lucky and the optimizer always expands the
12969 functions inline, you might have gotten away without providing
12972 A function may be given the attribute `no_instrument_function', in
12973 which case this instrumentation will not be done. This can be
12974 used, for example, for the profiling functions listed above,
12975 high-priority interrupt routines, and any functions from which the
12976 profiling functions cannot safely be called (perhaps signal
12977 handlers, if the profiling routines generate output or allocate
12980 `-finstrument-functions-exclude-file-list=FILE,FILE,...'
12981 Set the list of functions that are excluded from instrumentation
12982 (see the description of `-finstrument-functions'). If the file
12983 that contains a function definition matches with one of FILE, then
12984 that function is not instrumented. The match is done on
12985 substrings: if the FILE parameter is a substring of the file name,
12986 it is considered to be a match.
12989 `-finstrument-functions-exclude-file-list=/bits/stl,include/sys'
12990 will exclude any inline function defined in files whose pathnames
12991 contain `/bits/stl' or `include/sys'.
12993 If, for some reason, you want to include letter `','' in one of
12994 SYM, write `'\,''. For example,
12995 `-finstrument-functions-exclude-file-list='\,\,tmp'' (note the
12996 single quote surrounding the option).
12998 `-finstrument-functions-exclude-function-list=SYM,SYM,...'
12999 This is similar to `-finstrument-functions-exclude-file-list', but
13000 this option sets the list of function names to be excluded from
13001 instrumentation. The function name to be matched is its
13002 user-visible name, such as `vector<int> blah(const vector<int>
13003 &)', not the internal mangled name (e.g.,
13004 `_Z4blahRSt6vectorIiSaIiEE'). The match is done on substrings: if
13005 the SYM parameter is a substring of the function name, it is
13006 considered to be a match.
13009 Generate code to verify that you do not go beyond the boundary of
13010 the stack. You should specify this flag if you are running in an
13011 environment with multiple threads, but only rarely need to specify
13012 it in a single-threaded environment since stack overflow is
13013 automatically detected on nearly all systems if there is only one
13016 Note that this switch does not actually cause checking to be done;
13017 the operating system must do that. The switch causes generation
13018 of code to ensure that the operating system sees the stack being
13021 `-fstack-limit-register=REG'
13022 `-fstack-limit-symbol=SYM'
13024 Generate code to ensure that the stack does not grow beyond a
13025 certain value, either the value of a register or the address of a
13026 symbol. If the stack would grow beyond the value, a signal is
13027 raised. For most targets, the signal is raised before the stack
13028 overruns the boundary, so it is possible to catch the signal
13029 without taking special precautions.
13031 For instance, if the stack starts at absolute address `0x80000000'
13032 and grows downwards, you can use the flags
13033 `-fstack-limit-symbol=__stack_limit' and
13034 `-Wl,--defsym,__stack_limit=0x7ffe0000' to enforce a stack limit
13035 of 128KB. Note that this may only work with the GNU linker.
13038 `-fargument-noalias'
13039 `-fargument-noalias-global'
13040 `-fargument-noalias-anything'
13041 Specify the possible relationships among parameters and between
13042 parameters and global data.
13044 `-fargument-alias' specifies that arguments (parameters) may alias
13045 each other and may alias global storage.
13046 `-fargument-noalias' specifies that arguments do not alias each
13047 other, but may alias global storage.
13048 `-fargument-noalias-global' specifies that arguments do not alias
13049 each other and do not alias global storage.
13050 `-fargument-noalias-anything' specifies that arguments do not
13051 alias any other storage.
13053 Each language will automatically use whatever option is required by
13054 the language standard. You should not need to use these options
13057 `-fleading-underscore'
13058 This option and its counterpart, `-fno-leading-underscore',
13059 forcibly change the way C symbols are represented in the object
13060 file. One use is to help link with legacy assembly code.
13062 *Warning:* the `-fleading-underscore' switch causes GCC to
13063 generate code that is not binary compatible with code generated
13064 without that switch. Use it to conform to a non-default
13065 application binary interface. Not all targets provide complete
13066 support for this switch.
13068 `-ftls-model=MODEL'
13069 Alter the thread-local storage model to be used (*note
13070 Thread-Local::). The MODEL argument should be one of
13071 `global-dynamic', `local-dynamic', `initial-exec' or `local-exec'.
13073 The default without `-fpic' is `initial-exec'; with `-fpic' the
13074 default is `global-dynamic'.
13076 `-fvisibility=DEFAULT|INTERNAL|HIDDEN|PROTECTED'
13077 Set the default ELF image symbol visibility to the specified
13078 option--all symbols will be marked with this unless overridden
13079 within the code. Using this feature can very substantially
13080 improve linking and load times of shared object libraries, produce
13081 more optimized code, provide near-perfect API export and prevent
13082 symbol clashes. It is *strongly* recommended that you use this in
13083 any shared objects you distribute.
13085 Despite the nomenclature, `default' always means public ie;
13086 available to be linked against from outside the shared object.
13087 `protected' and `internal' are pretty useless in real-world usage
13088 so the only other commonly used option will be `hidden'. The
13089 default if `-fvisibility' isn't specified is `default', i.e., make
13090 every symbol public--this causes the same behavior as previous
13093 A good explanation of the benefits offered by ensuring ELF symbols
13094 have the correct visibility is given by "How To Write Shared
13095 Libraries" by Ulrich Drepper (which can be found at
13096 `http://people.redhat.com/~drepper/')--however a superior solution
13097 made possible by this option to marking things hidden when the
13098 default is public is to make the default hidden and mark things
13099 public. This is the norm with DLL's on Windows and with
13100 `-fvisibility=hidden' and `__attribute__
13101 ((visibility("default")))' instead of `__declspec(dllexport)' you
13102 get almost identical semantics with identical syntax. This is a
13103 great boon to those working with cross-platform projects.
13105 For those adding visibility support to existing code, you may find
13106 `#pragma GCC visibility' of use. This works by you enclosing the
13107 declarations you wish to set visibility for with (for example)
13108 `#pragma GCC visibility push(hidden)' and `#pragma GCC visibility
13109 pop'. Bear in mind that symbol visibility should be viewed *as
13110 part of the API interface contract* and thus all new code should
13111 always specify visibility when it is not the default ie;
13112 declarations only for use within the local DSO should *always* be
13113 marked explicitly as hidden as so to avoid PLT indirection
13114 overheads--making this abundantly clear also aids readability and
13115 self-documentation of the code. Note that due to ISO C++
13116 specification requirements, operator new and operator delete must
13117 always be of default visibility.
13119 Be aware that headers from outside your project, in particular
13120 system headers and headers from any other library you use, may not
13121 be expecting to be compiled with visibility other than the
13122 default. You may need to explicitly say `#pragma GCC visibility
13123 push(default)' before including any such headers.
13125 `extern' declarations are not affected by `-fvisibility', so a lot
13126 of code can be recompiled with `-fvisibility=hidden' with no
13127 modifications. However, this means that calls to `extern'
13128 functions with no explicit visibility will use the PLT, so it is
13129 more effective to use `__attribute ((visibility))' and/or `#pragma
13130 GCC visibility' to tell the compiler which `extern' declarations
13131 should be treated as hidden.
13133 Note that `-fvisibility' does affect C++ vague linkage entities.
13134 This means that, for instance, an exception class that will be
13135 thrown between DSOs must be explicitly marked with default
13136 visibility so that the `type_info' nodes will be unified between
13139 An overview of these techniques, their benefits and how to use them
13140 is at `http://gcc.gnu.org/wiki/Visibility'.
13144 File: gcc.info, Node: Environment Variables, Next: Precompiled Headers, Prev: Code Gen Options, Up: Invoking GCC
13146 3.19 Environment Variables Affecting GCC
13147 ========================================
13149 This section describes several environment variables that affect how GCC
13150 operates. Some of them work by specifying directories or prefixes to
13151 use when searching for various kinds of files. Some are used to
13152 specify other aspects of the compilation environment.
13154 Note that you can also specify places to search using options such as
13155 `-B', `-I' and `-L' (*note Directory Options::). These take precedence
13156 over places specified using environment variables, which in turn take
13157 precedence over those specified by the configuration of GCC. *Note
13158 Controlling the Compilation Driver `gcc': (gccint)Driver.
13164 These environment variables control the way that GCC uses
13165 localization information that allow GCC to work with different
13166 national conventions. GCC inspects the locale categories
13167 `LC_CTYPE' and `LC_MESSAGES' if it has been configured to do so.
13168 These locale categories can be set to any value supported by your
13169 installation. A typical value is `en_GB.UTF-8' for English in the
13170 United Kingdom encoded in UTF-8.
13172 The `LC_CTYPE' environment variable specifies character
13173 classification. GCC uses it to determine the character boundaries
13174 in a string; this is needed for some multibyte encodings that
13175 contain quote and escape characters that would otherwise be
13176 interpreted as a string end or escape.
13178 The `LC_MESSAGES' environment variable specifies the language to
13179 use in diagnostic messages.
13181 If the `LC_ALL' environment variable is set, it overrides the value
13182 of `LC_CTYPE' and `LC_MESSAGES'; otherwise, `LC_CTYPE' and
13183 `LC_MESSAGES' default to the value of the `LANG' environment
13184 variable. If none of these variables are set, GCC defaults to
13185 traditional C English behavior.
13188 If `TMPDIR' is set, it specifies the directory to use for temporary
13189 files. GCC uses temporary files to hold the output of one stage of
13190 compilation which is to be used as input to the next stage: for
13191 example, the output of the preprocessor, which is the input to the
13195 If `GCC_EXEC_PREFIX' is set, it specifies a prefix to use in the
13196 names of the subprograms executed by the compiler. No slash is
13197 added when this prefix is combined with the name of a subprogram,
13198 but you can specify a prefix that ends with a slash if you wish.
13200 If `GCC_EXEC_PREFIX' is not set, GCC will attempt to figure out an
13201 appropriate prefix to use based on the pathname it was invoked
13204 If GCC cannot find the subprogram using the specified prefix, it
13205 tries looking in the usual places for the subprogram.
13207 The default value of `GCC_EXEC_PREFIX' is `PREFIX/lib/gcc/' where
13208 PREFIX is the value of `prefix' when you ran the `configure'
13211 Other prefixes specified with `-B' take precedence over this
13214 This prefix is also used for finding files such as `crt0.o' that
13215 are used for linking.
13217 In addition, the prefix is used in an unusual way in finding the
13218 directories to search for header files. For each of the standard
13219 directories whose name normally begins with `/usr/local/lib/gcc'
13220 (more precisely, with the value of `GCC_INCLUDE_DIR'), GCC tries
13221 replacing that beginning with the specified prefix to produce an
13222 alternate directory name. Thus, with `-Bfoo/', GCC will search
13223 `foo/bar' where it would normally search `/usr/local/lib/bar'.
13224 These alternate directories are searched first; the standard
13225 directories come next.
13228 The value of `COMPILER_PATH' is a colon-separated list of
13229 directories, much like `PATH'. GCC tries the directories thus
13230 specified when searching for subprograms, if it can't find the
13231 subprograms using `GCC_EXEC_PREFIX'.
13234 The value of `LIBRARY_PATH' is a colon-separated list of
13235 directories, much like `PATH'. When configured as a native
13236 compiler, GCC tries the directories thus specified when searching
13237 for special linker files, if it can't find them using
13238 `GCC_EXEC_PREFIX'. Linking using GCC also uses these directories
13239 when searching for ordinary libraries for the `-l' option (but
13240 directories specified with `-L' come first).
13243 This variable is used to pass locale information to the compiler.
13244 One way in which this information is used is to determine the
13245 character set to be used when character literals, string literals
13246 and comments are parsed in C and C++. When the compiler is
13247 configured to allow multibyte characters, the following values for
13248 `LANG' are recognized:
13251 Recognize JIS characters.
13254 Recognize SJIS characters.
13257 Recognize EUCJP characters.
13259 If `LANG' is not defined, or if it has some other value, then the
13260 compiler will use mblen and mbtowc as defined by the default
13261 locale to recognize and translate multibyte characters.
13263 Some additional environments variables affect the behavior of the
13268 `CPLUS_INCLUDE_PATH'
13269 `OBJC_INCLUDE_PATH'
13270 Each variable's value is a list of directories separated by a
13271 special character, much like `PATH', in which to look for header
13272 files. The special character, `PATH_SEPARATOR', is
13273 target-dependent and determined at GCC build time. For Microsoft
13274 Windows-based targets it is a semicolon, and for almost all other
13275 targets it is a colon.
13277 `CPATH' specifies a list of directories to be searched as if
13278 specified with `-I', but after any paths given with `-I' options
13279 on the command line. This environment variable is used regardless
13280 of which language is being preprocessed.
13282 The remaining environment variables apply only when preprocessing
13283 the particular language indicated. Each specifies a list of
13284 directories to be searched as if specified with `-isystem', but
13285 after any paths given with `-isystem' options on the command line.
13287 In all these variables, an empty element instructs the compiler to
13288 search its current working directory. Empty elements can appear
13289 at the beginning or end of a path. For instance, if the value of
13290 `CPATH' is `:/special/include', that has the same effect as
13291 `-I. -I/special/include'.
13293 `DEPENDENCIES_OUTPUT'
13294 If this variable is set, its value specifies how to output
13295 dependencies for Make based on the non-system header files
13296 processed by the compiler. System header files are ignored in the
13299 The value of `DEPENDENCIES_OUTPUT' can be just a file name, in
13300 which case the Make rules are written to that file, guessing the
13301 target name from the source file name. Or the value can have the
13302 form `FILE TARGET', in which case the rules are written to file
13303 FILE using TARGET as the target name.
13305 In other words, this environment variable is equivalent to
13306 combining the options `-MM' and `-MF' (*note Preprocessor
13307 Options::), with an optional `-MT' switch too.
13309 `SUNPRO_DEPENDENCIES'
13310 This variable is the same as `DEPENDENCIES_OUTPUT' (see above),
13311 except that system header files are not ignored, so it implies
13312 `-M' rather than `-MM'. However, the dependence on the main input
13313 file is omitted. *Note Preprocessor Options::.
13316 File: gcc.info, Node: Precompiled Headers, Next: Running Protoize, Prev: Environment Variables, Up: Invoking GCC
13318 3.20 Using Precompiled Headers
13319 ==============================
13321 Often large projects have many header files that are included in every
13322 source file. The time the compiler takes to process these header files
13323 over and over again can account for nearly all of the time required to
13324 build the project. To make builds faster, GCC allows users to
13325 `precompile' a header file; then, if builds can use the precompiled
13326 header file they will be much faster.
13328 To create a precompiled header file, simply compile it as you would any
13329 other file, if necessary using the `-x' option to make the driver treat
13330 it as a C or C++ header file. You will probably want to use a tool
13331 like `make' to keep the precompiled header up-to-date when the headers
13332 it contains change.
13334 A precompiled header file will be searched for when `#include' is seen
13335 in the compilation. As it searches for the included file (*note Search
13336 Path: (cpp)Search Path.) the compiler looks for a precompiled header in
13337 each directory just before it looks for the include file in that
13338 directory. The name searched for is the name specified in the
13339 `#include' with `.gch' appended. If the precompiled header file can't
13340 be used, it is ignored.
13342 For instance, if you have `#include "all.h"', and you have `all.h.gch'
13343 in the same directory as `all.h', then the precompiled header file will
13344 be used if possible, and the original header will be used otherwise.
13346 Alternatively, you might decide to put the precompiled header file in a
13347 directory and use `-I' to ensure that directory is searched before (or
13348 instead of) the directory containing the original header. Then, if you
13349 want to check that the precompiled header file is always used, you can
13350 put a file of the same name as the original header in this directory
13351 containing an `#error' command.
13353 This also works with `-include'. So yet another way to use
13354 precompiled headers, good for projects not designed with precompiled
13355 header files in mind, is to simply take most of the header files used by
13356 a project, include them from another header file, precompile that header
13357 file, and `-include' the precompiled header. If the header files have
13358 guards against multiple inclusion, they will be skipped because they've
13359 already been included (in the precompiled header).
13361 If you need to precompile the same header file for different
13362 languages, targets, or compiler options, you can instead make a
13363 _directory_ named like `all.h.gch', and put each precompiled header in
13364 the directory, perhaps using `-o'. It doesn't matter what you call the
13365 files in the directory, every precompiled header in the directory will
13366 be considered. The first precompiled header encountered in the
13367 directory that is valid for this compilation will be used; they're
13368 searched in no particular order.
13370 There are many other possibilities, limited only by your imagination,
13371 good sense, and the constraints of your build system.
13373 A precompiled header file can be used only when these conditions apply:
13375 * Only one precompiled header can be used in a particular
13378 * A precompiled header can't be used once the first C token is seen.
13379 You can have preprocessor directives before a precompiled header;
13380 you can even include a precompiled header from inside another
13381 header, so long as there are no C tokens before the `#include'.
13383 * The precompiled header file must be produced for the same language
13384 as the current compilation. You can't use a C precompiled header
13385 for a C++ compilation.
13387 * The precompiled header file must have been produced by the same
13388 compiler binary as the current compilation is using.
13390 * Any macros defined before the precompiled header is included must
13391 either be defined in the same way as when the precompiled header
13392 was generated, or must not affect the precompiled header, which
13393 usually means that they don't appear in the precompiled header at
13396 The `-D' option is one way to define a macro before a precompiled
13397 header is included; using a `#define' can also do it. There are
13398 also some options that define macros implicitly, like `-O' and
13399 `-Wdeprecated'; the same rule applies to macros defined this way.
13401 * If debugging information is output when using the precompiled
13402 header, using `-g' or similar, the same kind of debugging
13403 information must have been output when building the precompiled
13404 header. However, a precompiled header built using `-g' can be
13405 used in a compilation when no debugging information is being
13408 * The same `-m' options must generally be used when building and
13409 using the precompiled header. *Note Submodel Options::, for any
13410 cases where this rule is relaxed.
13412 * Each of the following options must be the same when building and
13413 using the precompiled header:
13415 -fexceptions -funit-at-a-time
13417 * Some other command-line options starting with `-f', `-p', or `-O'
13418 must be defined in the same way as when the precompiled header was
13419 generated. At present, it's not clear which options are safe to
13420 change and which are not; the safest choice is to use exactly the
13421 same options when generating and using the precompiled header.
13422 The following are known to be safe:
13424 -fmessage-length= -fpreprocessed
13425 -fsched-interblock -fsched-spec -fsched-spec-load -fsched-spec-load-dangerous
13426 -fsched-verbose=<number> -fschedule-insns -fvisibility=
13430 For all of these except the last, the compiler will automatically
13431 ignore the precompiled header if the conditions aren't met. If you
13432 find an option combination that doesn't work and doesn't cause the
13433 precompiled header to be ignored, please consider filing a bug report,
13436 If you do use differing options when generating and using the
13437 precompiled header, the actual behavior will be a mixture of the
13438 behavior for the options. For instance, if you use `-g' to generate
13439 the precompiled header but not when using it, you may or may not get
13440 debugging information for routines in the precompiled header.
13443 File: gcc.info, Node: Running Protoize, Prev: Precompiled Headers, Up: Invoking GCC
13445 3.21 Running Protoize
13446 =====================
13448 The program `protoize' is an optional part of GCC. You can use it to
13449 add prototypes to a program, thus converting the program to ISO C in
13450 one respect. The companion program `unprotoize' does the reverse: it
13451 removes argument types from any prototypes that are found.
13453 When you run these programs, you must specify a set of source files as
13454 command line arguments. The conversion programs start out by compiling
13455 these files to see what functions they define. The information gathered
13456 about a file FOO is saved in a file named `FOO.X'.
13458 After scanning comes actual conversion. The specified files are all
13459 eligible to be converted; any files they include (whether sources or
13460 just headers) are eligible as well.
13462 But not all the eligible files are converted. By default, `protoize'
13463 and `unprotoize' convert only source and header files in the current
13464 directory. You can specify additional directories whose files should
13465 be converted with the `-d DIRECTORY' option. You can also specify
13466 particular files to exclude with the `-x FILE' option. A file is
13467 converted if it is eligible, its directory name matches one of the
13468 specified directory names, and its name within the directory has not
13471 Basic conversion with `protoize' consists of rewriting most function
13472 definitions and function declarations to specify the types of the
13473 arguments. The only ones not rewritten are those for varargs functions.
13475 `protoize' optionally inserts prototype declarations at the beginning
13476 of the source file, to make them available for any calls that precede
13477 the function's definition. Or it can insert prototype declarations
13478 with block scope in the blocks where undeclared functions are called.
13480 Basic conversion with `unprotoize' consists of rewriting most function
13481 declarations to remove any argument types, and rewriting function
13482 definitions to the old-style pre-ISO form.
13484 Both conversion programs print a warning for any function declaration
13485 or definition that they can't convert. You can suppress these warnings
13488 The output from `protoize' or `unprotoize' replaces the original
13489 source file. The original file is renamed to a name ending with
13490 `.save' (for DOS, the saved filename ends in `.sav' without the
13491 original `.c' suffix). If the `.save' (`.sav' for DOS) file already
13492 exists, then the source file is simply discarded.
13494 `protoize' and `unprotoize' both depend on GCC itself to scan the
13495 program and collect information about the functions it uses. So
13496 neither of these programs will work until GCC is installed.
13498 Here is a table of the options you can use with `protoize' and
13499 `unprotoize'. Each option works with both programs unless otherwise
13503 Look for the file `SYSCALLS.c.X' in DIRECTORY, instead of the
13504 usual directory (normally `/usr/local/lib'). This file contains
13505 prototype information about standard system functions. This option
13506 applies only to `protoize'.
13508 `-c COMPILATION-OPTIONS'
13509 Use COMPILATION-OPTIONS as the options when running `gcc' to
13510 produce the `.X' files. The special option `-aux-info' is always
13511 passed in addition, to tell `gcc' to write a `.X' file.
13513 Note that the compilation options must be given as a single
13514 argument to `protoize' or `unprotoize'. If you want to specify
13515 several `gcc' options, you must quote the entire set of
13516 compilation options to make them a single word in the shell.
13518 There are certain `gcc' arguments that you cannot use, because they
13519 would produce the wrong kind of output. These include `-g', `-O',
13520 `-c', `-S', and `-o' If you include these in the
13521 COMPILATION-OPTIONS, they are ignored.
13524 Rename files to end in `.C' (`.cc' for DOS-based file systems)
13525 instead of `.c'. This is convenient if you are converting a C
13526 program to C++. This option applies only to `protoize'.
13529 Add explicit global declarations. This means inserting explicit
13530 declarations at the beginning of each source file for each function
13531 that is called in the file and was not declared. These
13532 declarations precede the first function definition that contains a
13533 call to an undeclared function. This option applies only to
13537 Indent old-style parameter declarations with the string STRING.
13538 This option applies only to `protoize'.
13540 `unprotoize' converts prototyped function definitions to old-style
13541 function definitions, where the arguments are declared between the
13542 argument list and the initial `{'. By default, `unprotoize' uses
13543 five spaces as the indentation. If you want to indent with just
13544 one space instead, use `-i " "'.
13547 Keep the `.X' files. Normally, they are deleted after conversion
13551 Add explicit local declarations. `protoize' with `-l' inserts a
13552 prototype declaration for each function in each block which calls
13553 the function without any declaration. This option applies only to
13557 Make no real changes. This mode just prints information about the
13558 conversions that would have been done without `-n'.
13561 Make no `.save' files. The original files are simply deleted.
13562 Use this option with caution.
13565 Use the program PROGRAM as the compiler. Normally, the name `gcc'
13569 Work quietly. Most warnings are suppressed.
13572 Print the version number, just like `-v' for `gcc'.
13574 If you need special compiler options to compile one of your program's
13575 source files, then you should generate that file's `.X' file specially,
13576 by running `gcc' on that source file with the appropriate options and
13577 the option `-aux-info'. Then run `protoize' on the entire set of
13578 files. `protoize' will use the existing `.X' file because it is newer
13579 than the source file. For example:
13581 gcc -Dfoo=bar file1.c -aux-info file1.X
13584 You need to include the special files along with the rest in the
13585 `protoize' command, even though their `.X' files already exist, because
13586 otherwise they won't get converted.
13588 *Note Protoize Caveats::, for more information on how to use
13589 `protoize' successfully.
13592 File: gcc.info, Node: C Implementation, Next: C Extensions, Prev: Invoking GCC, Up: Top
13594 4 C Implementation-defined behavior
13595 ***********************************
13597 A conforming implementation of ISO C is required to document its choice
13598 of behavior in each of the areas that are designated "implementation
13599 defined". The following lists all such areas, along with the section
13600 numbers from the ISO/IEC 9899:1990 and ISO/IEC 9899:1999 standards.
13601 Some areas are only implementation-defined in one version of the
13604 Some choices depend on the externally determined ABI for the platform
13605 (including standard character encodings) which GCC follows; these are
13606 listed as "determined by ABI" below. *Note Binary Compatibility:
13607 Compatibility, and `http://gcc.gnu.org/readings.html'. Some choices
13608 are documented in the preprocessor manual. *Note
13609 Implementation-defined behavior: (cpp)Implementation-defined behavior.
13610 Some choices are made by the library and operating system (or other
13611 environment when compiling for a freestanding environment); refer to
13612 their documentation for details.
13616 * Translation implementation::
13617 * Environment implementation::
13618 * Identifiers implementation::
13619 * Characters implementation::
13620 * Integers implementation::
13621 * Floating point implementation::
13622 * Arrays and pointers implementation::
13623 * Hints implementation::
13624 * Structures unions enumerations and bit-fields implementation::
13625 * Qualifiers implementation::
13626 * Declarators implementation::
13627 * Statements implementation::
13628 * Preprocessing directives implementation::
13629 * Library functions implementation::
13630 * Architecture implementation::
13631 * Locale-specific behavior implementation::
13634 File: gcc.info, Node: Translation implementation, Next: Environment implementation, Up: C Implementation
13639 * `How a diagnostic is identified (C90 3.7, C99 3.10, C90 and C99
13642 Diagnostics consist of all the output sent to stderr by GCC.
13644 * `Whether each nonempty sequence of white-space characters other
13645 than new-line is retained or replaced by one space character in
13646 translation phase 3 (C90 and C99 5.1.1.2).'
13648 *Note Implementation-defined behavior: (cpp)Implementation-defined
13653 File: gcc.info, Node: Environment implementation, Next: Identifiers implementation, Prev: Translation implementation, Up: C Implementation
13658 The behavior of most of these points are dependent on the implementation
13659 of the C library, and are not defined by GCC itself.
13661 * `The mapping between physical source file multibyte characters and
13662 the source character set in translation phase 1 (C90 and C99
13665 *Note Implementation-defined behavior: (cpp)Implementation-defined
13670 File: gcc.info, Node: Identifiers implementation, Next: Characters implementation, Prev: Environment implementation, Up: C Implementation
13675 * `Which additional multibyte characters may appear in identifiers
13676 and their correspondence to universal character names (C99 6.4.2).'
13678 *Note Implementation-defined behavior: (cpp)Implementation-defined
13681 * `The number of significant initial characters in an identifier
13682 (C90 6.1.2, C90 and C99 5.2.4.1, C99 6.4.2).'
13684 For internal names, all characters are significant. For external
13685 names, the number of significant characters are defined by the
13686 linker; for almost all targets, all characters are significant.
13688 * `Whether case distinctions are significant in an identifier with
13689 external linkage (C90 6.1.2).'
13691 This is a property of the linker. C99 requires that case
13692 distinctions are always significant in identifiers with external
13693 linkage and systems without this property are not supported by GCC.
13697 File: gcc.info, Node: Characters implementation, Next: Integers implementation, Prev: Identifiers implementation, Up: C Implementation
13702 * `The number of bits in a byte (C90 3.4, C99 3.6).'
13706 * `The values of the members of the execution character set (C90 and
13711 * `The unique value of the member of the execution character set
13712 produced for each of the standard alphabetic escape sequences (C90
13717 * `The value of a `char' object into which has been stored any
13718 character other than a member of the basic execution character set
13719 (C90 6.1.2.5, C99 6.2.5).'
13723 * `Which of `signed char' or `unsigned char' has the same range,
13724 representation, and behavior as "plain" `char' (C90 6.1.2.5, C90
13725 6.2.1.1, C99 6.2.5, C99 6.3.1.1).'
13727 Determined by ABI. The options `-funsigned-char' and
13728 `-fsigned-char' change the default. *Note Options Controlling C
13729 Dialect: C Dialect Options.
13731 * `The mapping of members of the source character set (in character
13732 constants and string literals) to members of the execution
13733 character set (C90 6.1.3.4, C99 6.4.4.4, C90 and C99 5.1.1.2).'
13737 * `The value of an integer character constant containing more than
13738 one character or containing a character or escape sequence that
13739 does not map to a single-byte execution character (C90 6.1.3.4,
13742 *Note Implementation-defined behavior: (cpp)Implementation-defined
13745 * `The value of a wide character constant containing more than one
13746 multibyte character, or containing a multibyte character or escape
13747 sequence not represented in the extended execution character set
13748 (C90 6.1.3.4, C99 6.4.4.4).'
13750 *Note Implementation-defined behavior: (cpp)Implementation-defined
13753 * `The current locale used to convert a wide character constant
13754 consisting of a single multibyte character that maps to a member
13755 of the extended execution character set into a corresponding wide
13756 character code (C90 6.1.3.4, C99 6.4.4.4).'
13758 *Note Implementation-defined behavior: (cpp)Implementation-defined
13761 * `The current locale used to convert a wide string literal into
13762 corresponding wide character codes (C90 6.1.4, C99 6.4.5).'
13764 *Note Implementation-defined behavior: (cpp)Implementation-defined
13767 * `The value of a string literal containing a multibyte character or
13768 escape sequence not represented in the execution character set
13769 (C90 6.1.4, C99 6.4.5).'
13771 *Note Implementation-defined behavior: (cpp)Implementation-defined
13775 File: gcc.info, Node: Integers implementation, Next: Floating point implementation, Prev: Characters implementation, Up: C Implementation
13780 * `Any extended integer types that exist in the implementation (C99
13783 GCC does not support any extended integer types.
13785 * `Whether signed integer types are represented using sign and
13786 magnitude, two's complement, or one's complement, and whether the
13787 extraordinary value is a trap representation or an ordinary value
13790 GCC supports only two's complement integer types, and all bit
13791 patterns are ordinary values.
13793 * `The rank of any extended integer type relative to another extended
13794 integer type with the same precision (C99 6.3.1.1).'
13796 GCC does not support any extended integer types.
13798 * `The result of, or the signal raised by, converting an integer to a
13799 signed integer type when the value cannot be represented in an
13800 object of that type (C90 6.2.1.2, C99 6.3.1.3).'
13802 For conversion to a type of width N, the value is reduced modulo
13803 2^N to be within range of the type; no signal is raised.
13805 * `The results of some bitwise operations on signed integers (C90
13808 Bitwise operators act on the representation of the value including
13809 both the sign and value bits, where the sign bit is considered
13810 immediately above the highest-value value bit. Signed `>>' acts
13811 on negative numbers by sign extension.
13813 GCC does not use the latitude given in C99 only to treat certain
13814 aspects of signed `<<' as undefined, but this is subject to change.
13816 * `The sign of the remainder on integer division (C90 6.3.5).'
13818 GCC always follows the C99 requirement that the result of division
13819 is truncated towards zero.
13823 File: gcc.info, Node: Floating point implementation, Next: Arrays and pointers implementation, Prev: Integers implementation, Up: C Implementation
13828 * `The accuracy of the floating-point operations and of the library
13829 functions in `<math.h>' and `<complex.h>' that return
13830 floating-point results (C90 and C99 5.2.4.2.2).'
13832 The accuracy is unknown.
13834 * `The rounding behaviors characterized by non-standard values of
13835 `FLT_ROUNDS' (C90 and C99 5.2.4.2.2).'
13837 GCC does not use such values.
13839 * `The evaluation methods characterized by non-standard negative
13840 values of `FLT_EVAL_METHOD' (C99 5.2.4.2.2).'
13842 GCC does not use such values.
13844 * `The direction of rounding when an integer is converted to a
13845 floating-point number that cannot exactly represent the original
13846 value (C90 6.2.1.3, C99 6.3.1.4).'
13848 C99 Annex F is followed.
13850 * `The direction of rounding when a floating-point number is
13851 converted to a narrower floating-point number (C90 6.2.1.4, C99
13854 C99 Annex F is followed.
13856 * `How the nearest representable value or the larger or smaller
13857 representable value immediately adjacent to the nearest
13858 representable value is chosen for certain floating constants (C90
13859 6.1.3.1, C99 6.4.4.2).'
13861 C99 Annex F is followed.
13863 * `Whether and how floating expressions are contracted when not
13864 disallowed by the `FP_CONTRACT' pragma (C99 6.5).'
13866 Expressions are currently only contracted if
13867 `-funsafe-math-optimizations' or `-ffast-math' are used. This is
13870 * `The default state for the `FENV_ACCESS' pragma (C99 7.6.1).'
13872 This pragma is not implemented, but the default is to "off" unless
13873 `-frounding-math' is used in which case it is "on".
13875 * `Additional floating-point exceptions, rounding modes,
13876 environments, and classifications, and their macro names (C99 7.6,
13879 This is dependent on the implementation of the C library, and is
13880 not defined by GCC itself.
13882 * `The default state for the `FP_CONTRACT' pragma (C99 7.12.2).'
13884 This pragma is not implemented. Expressions are currently only
13885 contracted if `-funsafe-math-optimizations' or `-ffast-math' are
13886 used. This is subject to change.
13888 * `Whether the "inexact" floating-point exception can be raised when
13889 the rounded result actually does equal the mathematical result in
13890 an IEC 60559 conformant implementation (C99 F.9).'
13892 This is dependent on the implementation of the C library, and is
13893 not defined by GCC itself.
13895 * `Whether the "underflow" (and "inexact") floating-point exception
13896 can be raised when a result is tiny but not inexact in an IEC
13897 60559 conformant implementation (C99 F.9).'
13899 This is dependent on the implementation of the C library, and is
13900 not defined by GCC itself.
13904 File: gcc.info, Node: Arrays and pointers implementation, Next: Hints implementation, Prev: Floating point implementation, Up: C Implementation
13906 4.7 Arrays and pointers
13907 =======================
13909 * `The result of converting a pointer to an integer or vice versa
13910 (C90 6.3.4, C99 6.3.2.3).'
13912 A cast from pointer to integer discards most-significant bits if
13913 the pointer representation is larger than the integer type,
13914 sign-extends(1) if the pointer representation is smaller than the
13915 integer type, otherwise the bits are unchanged.
13917 A cast from integer to pointer discards most-significant bits if
13918 the pointer representation is smaller than the integer type,
13919 extends according to the signedness of the integer type if the
13920 pointer representation is larger than the integer type, otherwise
13921 the bits are unchanged.
13923 When casting from pointer to integer and back again, the resulting
13924 pointer must reference the same object as the original pointer,
13925 otherwise the behavior is undefined. That is, one may not use
13926 integer arithmetic to avoid the undefined behavior of pointer
13927 arithmetic as proscribed in C99 6.5.6/8.
13929 * `The size of the result of subtracting two pointers to elements of
13930 the same array (C90 6.3.6, C99 6.5.6).'
13932 The value is as specified in the standard and the type is
13933 determined by the ABI.
13936 ---------- Footnotes ----------
13938 (1) Future versions of GCC may zero-extend, or use a target-defined
13939 `ptr_extend' pattern. Do not rely on sign extension.
13942 File: gcc.info, Node: Hints implementation, Next: Structures unions enumerations and bit-fields implementation, Prev: Arrays and pointers implementation, Up: C Implementation
13947 * `The extent to which suggestions made by using the `register'
13948 storage-class specifier are effective (C90 6.5.1, C99 6.7.1).'
13950 The `register' specifier affects code generation only in these
13953 * When used as part of the register variable extension, see
13954 *Note Explicit Reg Vars::.
13956 * When `-O0' is in use, the compiler allocates distinct stack
13957 memory for all variables that do not have the `register'
13958 storage-class specifier; if `register' is specified, the
13959 variable may have a shorter lifespan than the code would
13960 indicate and may never be placed in memory.
13962 * On some rare x86 targets, `setjmp' doesn't save the registers
13963 in all circumstances. In those cases, GCC doesn't allocate
13964 any variables in registers unless they are marked `register'.
13967 * `The extent to which suggestions made by using the inline function
13968 specifier are effective (C99 6.7.4).'
13970 GCC will not inline any functions if the `-fno-inline' option is
13971 used or if `-O0' is used. Otherwise, GCC may still be unable to
13972 inline a function for many reasons; the `-Winline' option may be
13973 used to determine if a function has not been inlined and why not.
13977 File: gcc.info, Node: Structures unions enumerations and bit-fields implementation, Next: Qualifiers implementation, Prev: Hints implementation, Up: C Implementation
13979 4.9 Structures, unions, enumerations, and bit-fields
13980 ====================================================
13982 * `A member of a union object is accessed using a member of a
13983 different type (C90 6.3.2.3).'
13985 The relevant bytes of the representation of the object are treated
13986 as an object of the type used for the access. This may be a trap
13989 * `Whether a "plain" `int' bit-field is treated as a `signed int'
13990 bit-field or as an `unsigned int' bit-field (C90 6.5.2, C90
13991 6.5.2.1, C99 6.7.2, C99 6.7.2.1).'
13993 By default it is treated as `signed int' but this may be changed
13994 by the `-funsigned-bitfields' option.
13996 * `Allowable bit-field types other than `_Bool', `signed int', and
13997 `unsigned int' (C99 6.7.2.1).'
13999 No other types are permitted in strictly conforming mode.
14001 * `Whether a bit-field can straddle a storage-unit boundary (C90
14002 6.5.2.1, C99 6.7.2.1).'
14006 * `The order of allocation of bit-fields within a unit (C90 6.5.2.1,
14011 * `The alignment of non-bit-field members of structures (C90
14012 6.5.2.1, C99 6.7.2.1).'
14016 * `The integer type compatible with each enumerated type (C90
14017 6.5.2.2, C99 6.7.2.2).'
14019 Normally, the type is `unsigned int' if there are no negative
14020 values in the enumeration, otherwise `int'. If `-fshort-enums' is
14021 specified, then if there are negative values it is the first of
14022 `signed char', `short' and `int' that can represent all the
14023 values, otherwise it is the first of `unsigned char', `unsigned
14024 short' and `unsigned int' that can represent all the values.
14026 On some targets, `-fshort-enums' is the default; this is
14027 determined by the ABI.
14031 File: gcc.info, Node: Qualifiers implementation, Next: Declarators implementation, Prev: Structures unions enumerations and bit-fields implementation, Up: C Implementation
14036 * `What constitutes an access to an object that has
14037 volatile-qualified type (C90 6.5.3, C99 6.7.3).'
14039 Such an object is normally accessed by pointers and used for
14040 accessing hardware. In most expressions, it is intuitively
14041 obvious what is a read and what is a write. For example
14043 volatile int *dst = SOMEVALUE;
14044 volatile int *src = SOMEOTHERVALUE;
14047 will cause a read of the volatile object pointed to by SRC and
14048 store the value into the volatile object pointed to by DST. There
14049 is no guarantee that these reads and writes are atomic, especially
14050 for objects larger than `int'.
14052 However, if the volatile storage is not being modified, and the
14053 value of the volatile storage is not used, then the situation is
14054 less obvious. For example
14056 volatile int *src = SOMEVALUE;
14059 According to the C standard, such an expression is an rvalue whose
14060 type is the unqualified version of its original type, i.e. `int'.
14061 Whether GCC interprets this as a read of the volatile object being
14062 pointed to or only as a request to evaluate the expression for its
14063 side-effects depends on this type.
14065 If it is a scalar type, or on most targets an aggregate type whose
14066 only member object is of a scalar type, or a union type whose
14067 member objects are of scalar types, the expression is interpreted
14068 by GCC as a read of the volatile object; in the other cases, the
14069 expression is only evaluated for its side-effects.
14073 File: gcc.info, Node: Declarators implementation, Next: Statements implementation, Prev: Qualifiers implementation, Up: C Implementation
14078 * `The maximum number of declarators that may modify an arithmetic,
14079 structure or union type (C90 6.5.4).'
14081 GCC is only limited by available memory.
14085 File: gcc.info, Node: Statements implementation, Next: Preprocessing directives implementation, Prev: Declarators implementation, Up: C Implementation
14090 * `The maximum number of `case' values in a `switch' statement (C90
14093 GCC is only limited by available memory.
14097 File: gcc.info, Node: Preprocessing directives implementation, Next: Library functions implementation, Prev: Statements implementation, Up: C Implementation
14099 4.13 Preprocessing directives
14100 =============================
14102 *Note Implementation-defined behavior: (cpp)Implementation-defined
14103 behavior, for details of these aspects of implementation-defined
14106 * `How sequences in both forms of header names are mapped to headers
14107 or external source file names (C90 6.1.7, C99 6.4.7).'
14109 * `Whether the value of a character constant in a constant expression
14110 that controls conditional inclusion matches the value of the same
14111 character constant in the execution character set (C90 6.8.1, C99
14114 * `Whether the value of a single-character character constant in a
14115 constant expression that controls conditional inclusion may have a
14116 negative value (C90 6.8.1, C99 6.10.1).'
14118 * `The places that are searched for an included `<>' delimited
14119 header, and how the places are specified or the header is
14120 identified (C90 6.8.2, C99 6.10.2).'
14122 * `How the named source file is searched for in an included `""'
14123 delimited header (C90 6.8.2, C99 6.10.2).'
14125 * `The method by which preprocessing tokens (possibly resulting from
14126 macro expansion) in a `#include' directive are combined into a
14127 header name (C90 6.8.2, C99 6.10.2).'
14129 * `The nesting limit for `#include' processing (C90 6.8.2, C99
14132 * `Whether the `#' operator inserts a `\' character before the `\'
14133 character that begins a universal character name in a character
14134 constant or string literal (C99 6.10.3.2).'
14136 * `The behavior on each recognized non-`STDC #pragma' directive (C90
14137 6.8.6, C99 6.10.6).'
14139 *Note Pragmas: (cpp)Pragmas, for details of pragmas accepted by
14140 GCC on all targets. *Note Pragmas Accepted by GCC: Pragmas, for
14141 details of target-specific pragmas.
14143 * `The definitions for `__DATE__' and `__TIME__' when respectively,
14144 the date and time of translation are not available (C90 6.8.8, C99
14149 File: gcc.info, Node: Library functions implementation, Next: Architecture implementation, Prev: Preprocessing directives implementation, Up: C Implementation
14151 4.14 Library functions
14152 ======================
14154 The behavior of most of these points are dependent on the implementation
14155 of the C library, and are not defined by GCC itself.
14157 * `The null pointer constant to which the macro `NULL' expands (C90
14160 In `<stddef.h>', `NULL' expands to `((void *)0)'. GCC does not
14161 provide the other headers which define `NULL' and some library
14162 implementations may use other definitions in those headers.
14166 File: gcc.info, Node: Architecture implementation, Next: Locale-specific behavior implementation, Prev: Library functions implementation, Up: C Implementation
14171 * `The values or expressions assigned to the macros specified in the
14172 headers `<float.h>', `<limits.h>', and `<stdint.h>' (C90 and C99
14173 5.2.4.2, C99 7.18.2, C99 7.18.3).'
14177 * `The number, order, and encoding of bytes in any object (when not
14178 explicitly specified in this International Standard) (C99
14183 * `The value of the result of the `sizeof' operator (C90 6.3.3.4,
14190 File: gcc.info, Node: Locale-specific behavior implementation, Prev: Architecture implementation, Up: C Implementation
14192 4.16 Locale-specific behavior
14193 =============================
14195 The behavior of these points are dependent on the implementation of the
14196 C library, and are not defined by GCC itself.
14199 File: gcc.info, Node: C Extensions, Next: C++ Extensions, Prev: C Implementation, Up: Top
14201 5 Extensions to the C Language Family
14202 *************************************
14204 GNU C provides several language features not found in ISO standard C.
14205 (The `-pedantic' option directs GCC to print a warning message if any
14206 of these features is used.) To test for the availability of these
14207 features in conditional compilation, check for a predefined macro
14208 `__GNUC__', which is always defined under GCC.
14210 These extensions are available in C and Objective-C. Most of them are
14211 also available in C++. *Note Extensions to the C++ Language: C++
14212 Extensions, for extensions that apply _only_ to C++.
14214 Some features that are in ISO C99 but not C89 or C++ are also, as
14215 extensions, accepted by GCC in C89 mode and in C++.
14219 * Statement Exprs:: Putting statements and declarations inside expressions.
14220 * Local Labels:: Labels local to a block.
14221 * Labels as Values:: Getting pointers to labels, and computed gotos.
14222 * Nested Functions:: As in Algol and Pascal, lexical scoping of functions.
14223 * Constructing Calls:: Dispatching a call to another function.
14224 * Typeof:: `typeof': referring to the type of an expression.
14225 * Conditionals:: Omitting the middle operand of a `?:' expression.
14226 * Long Long:: Double-word integers---`long long int'.
14227 * Complex:: Data types for complex numbers.
14228 * Decimal Float:: Decimal Floating Types.
14229 * Hex Floats:: Hexadecimal floating-point constants.
14230 * Zero Length:: Zero-length arrays.
14231 * Variable Length:: Arrays whose length is computed at run time.
14232 * Empty Structures:: Structures with no members.
14233 * Variadic Macros:: Macros with a variable number of arguments.
14234 * Escaped Newlines:: Slightly looser rules for escaped newlines.
14235 * Subscripting:: Any array can be subscripted, even if not an lvalue.
14236 * Pointer Arith:: Arithmetic on `void'-pointers and function pointers.
14237 * Initializers:: Non-constant initializers.
14238 * Compound Literals:: Compound literals give structures, unions
14239 or arrays as values.
14240 * Designated Inits:: Labeling elements of initializers.
14241 * Cast to Union:: Casting to union type from any member of the union.
14242 * Case Ranges:: `case 1 ... 9' and such.
14243 * Mixed Declarations:: Mixing declarations and code.
14244 * Function Attributes:: Declaring that functions have no side effects,
14245 or that they can never return.
14246 * Attribute Syntax:: Formal syntax for attributes.
14247 * Function Prototypes:: Prototype declarations and old-style definitions.
14248 * C++ Comments:: C++ comments are recognized.
14249 * Dollar Signs:: Dollar sign is allowed in identifiers.
14250 * Character Escapes:: `\e' stands for the character <ESC>.
14251 * Variable Attributes:: Specifying attributes of variables.
14252 * Type Attributes:: Specifying attributes of types.
14253 * Alignment:: Inquiring about the alignment of a type or variable.
14254 * Inline:: Defining inline functions (as fast as macros).
14255 * Extended Asm:: Assembler instructions with C expressions as operands.
14256 (With them you can define ``built-in'' functions.)
14257 * Constraints:: Constraints for asm operands
14258 * Asm Labels:: Specifying the assembler name to use for a C symbol.
14259 * Explicit Reg Vars:: Defining variables residing in specified registers.
14260 * Alternate Keywords:: `__const__', `__asm__', etc., for header files.
14261 * Incomplete Enums:: `enum foo;', with details to follow.
14262 * Function Names:: Printable strings which are the name of the current
14264 * Return Address:: Getting the return or frame address of a function.
14265 * Vector Extensions:: Using vector instructions through built-in functions.
14266 * Offsetof:: Special syntax for implementing `offsetof'.
14267 * Atomic Builtins:: Built-in functions for atomic memory access.
14268 * Object Size Checking:: Built-in functions for limited buffer overflow
14270 * Other Builtins:: Other built-in functions.
14271 * Target Builtins:: Built-in functions specific to particular targets.
14272 * Target Format Checks:: Format checks specific to particular targets.
14273 * Pragmas:: Pragmas accepted by GCC.
14274 * Unnamed Fields:: Unnamed struct/union fields within structs/unions.
14275 * Thread-Local:: Per-thread variables.
14278 File: gcc.info, Node: Statement Exprs, Next: Local Labels, Up: C Extensions
14280 5.1 Statements and Declarations in Expressions
14281 ==============================================
14283 A compound statement enclosed in parentheses may appear as an expression
14284 in GNU C. This allows you to use loops, switches, and local variables
14285 within an expression.
14287 Recall that a compound statement is a sequence of statements surrounded
14288 by braces; in this construct, parentheses go around the braces. For
14291 ({ int y = foo (); int z;
14296 is a valid (though slightly more complex than necessary) expression for
14297 the absolute value of `foo ()'.
14299 The last thing in the compound statement should be an expression
14300 followed by a semicolon; the value of this subexpression serves as the
14301 value of the entire construct. (If you use some other kind of statement
14302 last within the braces, the construct has type `void', and thus
14303 effectively no value.)
14305 This feature is especially useful in making macro definitions "safe"
14306 (so that they evaluate each operand exactly once). For example, the
14307 "maximum" function is commonly defined as a macro in standard C as
14310 #define max(a,b) ((a) > (b) ? (a) : (b))
14312 But this definition computes either A or B twice, with bad results if
14313 the operand has side effects. In GNU C, if you know the type of the
14314 operands (here taken as `int'), you can define the macro safely as
14317 #define maxint(a,b) \
14318 ({int _a = (a), _b = (b); _a > _b ? _a : _b; })
14320 Embedded statements are not allowed in constant expressions, such as
14321 the value of an enumeration constant, the width of a bit-field, or the
14322 initial value of a static variable.
14324 If you don't know the type of the operand, you can still do this, but
14325 you must use `typeof' (*note Typeof::).
14327 In G++, the result value of a statement expression undergoes array and
14328 function pointer decay, and is returned by value to the enclosing
14329 expression. For instance, if `A' is a class, then
14335 will construct a temporary `A' object to hold the result of the
14336 statement expression, and that will be used to invoke `Foo'. Therefore
14337 the `this' pointer observed by `Foo' will not be the address of `a'.
14339 Any temporaries created within a statement within a statement
14340 expression will be destroyed at the statement's end. This makes
14341 statement expressions inside macros slightly different from function
14342 calls. In the latter case temporaries introduced during argument
14343 evaluation will be destroyed at the end of the statement that includes
14344 the function call. In the statement expression case they will be
14345 destroyed during the statement expression. For instance,
14347 #define macro(a) ({__typeof__(a) b = (a); b + 3; })
14348 template<typename T> T function(T a) { T b = a; return b + 3; }
14356 will have different places where temporaries are destroyed. For the
14357 `macro' case, the temporary `X' will be destroyed just after the
14358 initialization of `b'. In the `function' case that temporary will be
14359 destroyed when the function returns.
14361 These considerations mean that it is probably a bad idea to use
14362 statement-expressions of this form in header files that are designed to
14363 work with C++. (Note that some versions of the GNU C Library contained
14364 header files using statement-expression that lead to precisely this
14367 Jumping into a statement expression with `goto' or using a `switch'
14368 statement outside the statement expression with a `case' or `default'
14369 label inside the statement expression is not permitted. Jumping into a
14370 statement expression with a computed `goto' (*note Labels as Values::)
14371 yields undefined behavior. Jumping out of a statement expression is
14372 permitted, but if the statement expression is part of a larger
14373 expression then it is unspecified which other subexpressions of that
14374 expression have been evaluated except where the language definition
14375 requires certain subexpressions to be evaluated before or after the
14376 statement expression. In any case, as with a function call the
14377 evaluation of a statement expression is not interleaved with the
14378 evaluation of other parts of the containing expression. For example,
14380 foo (), (({ bar1 (); goto a; 0; }) + bar2 ()), baz();
14382 will call `foo' and `bar1' and will not call `baz' but may or may not
14383 call `bar2'. If `bar2' is called, it will be called after `foo' and
14387 File: gcc.info, Node: Local Labels, Next: Labels as Values, Prev: Statement Exprs, Up: C Extensions
14389 5.2 Locally Declared Labels
14390 ===========================
14392 GCC allows you to declare "local labels" in any nested block scope. A
14393 local label is just like an ordinary label, but you can only reference
14394 it (with a `goto' statement, or by taking its address) within the block
14395 in which it was declared.
14397 A local label declaration looks like this:
14403 __label__ LABEL1, LABEL2, /* ... */;
14405 Local label declarations must come at the beginning of the block,
14406 before any ordinary declarations or statements.
14408 The label declaration defines the label _name_, but does not define
14409 the label itself. You must do this in the usual way, with `LABEL:',
14410 within the statements of the statement expression.
14412 The local label feature is useful for complex macros. If a macro
14413 contains nested loops, a `goto' can be useful for breaking out of them.
14414 However, an ordinary label whose scope is the whole function cannot be
14415 used: if the macro can be expanded several times in one function, the
14416 label will be multiply defined in that function. A local label avoids
14417 this problem. For example:
14419 #define SEARCH(value, array, target) \
14422 typeof (target) _SEARCH_target = (target); \
14423 typeof (*(array)) *_SEARCH_array = (array); \
14426 for (i = 0; i < max; i++) \
14427 for (j = 0; j < max; j++) \
14428 if (_SEARCH_array[i][j] == _SEARCH_target) \
14429 { (value) = i; goto found; } \
14434 This could also be written using a statement-expression:
14436 #define SEARCH(array, target) \
14439 typeof (target) _SEARCH_target = (target); \
14440 typeof (*(array)) *_SEARCH_array = (array); \
14443 for (i = 0; i < max; i++) \
14444 for (j = 0; j < max; j++) \
14445 if (_SEARCH_array[i][j] == _SEARCH_target) \
14446 { value = i; goto found; } \
14452 Local label declarations also make the labels they declare visible to
14453 nested functions, if there are any. *Note Nested Functions::, for
14457 File: gcc.info, Node: Labels as Values, Next: Nested Functions, Prev: Local Labels, Up: C Extensions
14459 5.3 Labels as Values
14460 ====================
14462 You can get the address of a label defined in the current function (or
14463 a containing function) with the unary operator `&&'. The value has
14464 type `void *'. This value is a constant and can be used wherever a
14465 constant of that type is valid. For example:
14471 To use these values, you need to be able to jump to one. This is done
14472 with the computed goto statement(1), `goto *EXP;'. For example,
14476 Any expression of type `void *' is allowed.
14478 One way of using these constants is in initializing a static array that
14479 will serve as a jump table:
14481 static void *array[] = { &&foo, &&bar, &&hack };
14483 Then you can select a label with indexing, like this:
14487 Note that this does not check whether the subscript is in bounds--array
14488 indexing in C never does that.
14490 Such an array of label values serves a purpose much like that of the
14491 `switch' statement. The `switch' statement is cleaner, so use that
14492 rather than an array unless the problem does not fit a `switch'
14493 statement very well.
14495 Another use of label values is in an interpreter for threaded code.
14496 The labels within the interpreter function can be stored in the
14497 threaded code for super-fast dispatching.
14499 You may not use this mechanism to jump to code in a different function.
14500 If you do that, totally unpredictable things will happen. The best way
14501 to avoid this is to store the label address only in automatic variables
14502 and never pass it as an argument.
14504 An alternate way to write the above example is
14506 static const int array[] = { &&foo - &&foo, &&bar - &&foo,
14508 goto *(&&foo + array[i]);
14510 This is more friendly to code living in shared libraries, as it reduces
14511 the number of dynamic relocations that are needed, and by consequence,
14512 allows the data to be read-only.
14514 ---------- Footnotes ----------
14516 (1) The analogous feature in Fortran is called an assigned goto, but
14517 that name seems inappropriate in C, where one can do more than simply
14518 store label addresses in label variables.
14521 File: gcc.info, Node: Nested Functions, Next: Constructing Calls, Prev: Labels as Values, Up: C Extensions
14523 5.4 Nested Functions
14524 ====================
14526 A "nested function" is a function defined inside another function.
14527 (Nested functions are not supported for GNU C++.) The nested function's
14528 name is local to the block where it is defined. For example, here we
14529 define a nested function named `square', and call it twice:
14531 foo (double a, double b)
14533 double square (double z) { return z * z; }
14535 return square (a) + square (b);
14538 The nested function can access all the variables of the containing
14539 function that are visible at the point of its definition. This is
14540 called "lexical scoping". For example, here we show a nested function
14541 which uses an inherited variable named `offset':
14543 bar (int *array, int offset, int size)
14545 int access (int *array, int index)
14546 { return array[index + offset]; }
14549 for (i = 0; i < size; i++)
14550 /* ... */ access (array, i) /* ... */
14553 Nested function definitions are permitted within functions in the
14554 places where variable definitions are allowed; that is, in any block,
14555 mixed with the other declarations and statements in the block.
14557 It is possible to call the nested function from outside the scope of
14558 its name by storing its address or passing the address to another
14561 hack (int *array, int size)
14563 void store (int index, int value)
14564 { array[index] = value; }
14566 intermediate (store, size);
14569 Here, the function `intermediate' receives the address of `store' as
14570 an argument. If `intermediate' calls `store', the arguments given to
14571 `store' are used to store into `array'. But this technique works only
14572 so long as the containing function (`hack', in this example) does not
14575 If you try to call the nested function through its address after the
14576 containing function has exited, all hell will break loose. If you try
14577 to call it after a containing scope level has exited, and if it refers
14578 to some of the variables that are no longer in scope, you may be lucky,
14579 but it's not wise to take the risk. If, however, the nested function
14580 does not refer to anything that has gone out of scope, you should be
14583 GCC implements taking the address of a nested function using a
14584 technique called "trampolines". A paper describing them is available as
14586 `http://people.debian.org/~aaronl/Usenix88-lexic.pdf'.
14588 A nested function can jump to a label inherited from a containing
14589 function, provided the label was explicitly declared in the containing
14590 function (*note Local Labels::). Such a jump returns instantly to the
14591 containing function, exiting the nested function which did the `goto'
14592 and any intermediate functions as well. Here is an example:
14594 bar (int *array, int offset, int size)
14597 int access (int *array, int index)
14601 return array[index + offset];
14605 for (i = 0; i < size; i++)
14606 /* ... */ access (array, i) /* ... */
14610 /* Control comes here from `access'
14611 if it detects an error. */
14616 A nested function always has no linkage. Declaring one with `extern'
14617 or `static' is erroneous. If you need to declare the nested function
14618 before its definition, use `auto' (which is otherwise meaningless for
14619 function declarations).
14621 bar (int *array, int offset, int size)
14624 auto int access (int *, int);
14626 int access (int *array, int index)
14630 return array[index + offset];
14636 File: gcc.info, Node: Constructing Calls, Next: Typeof, Prev: Nested Functions, Up: C Extensions
14638 5.5 Constructing Function Calls
14639 ===============================
14641 Using the built-in functions described below, you can record the
14642 arguments a function received, and call another function with the same
14643 arguments, without knowing the number or types of the arguments.
14645 You can also record the return value of that function call, and later
14646 return that value, without knowing what data type the function tried to
14647 return (as long as your caller expects that data type).
14649 However, these built-in functions may interact badly with some
14650 sophisticated features or other extensions of the language. It is,
14651 therefore, not recommended to use them outside very simple functions
14652 acting as mere forwarders for their arguments.
14654 -- Built-in Function: void * __builtin_apply_args ()
14655 This built-in function returns a pointer to data describing how to
14656 perform a call with the same arguments as were passed to the
14659 The function saves the arg pointer register, structure value
14660 address, and all registers that might be used to pass arguments to
14661 a function into a block of memory allocated on the stack. Then it
14662 returns the address of that block.
14664 -- Built-in Function: void * __builtin_apply (void (*FUNCTION)(), void
14665 *ARGUMENTS, size_t SIZE)
14666 This built-in function invokes FUNCTION with a copy of the
14667 parameters described by ARGUMENTS and SIZE.
14669 The value of ARGUMENTS should be the value returned by
14670 `__builtin_apply_args'. The argument SIZE specifies the size of
14671 the stack argument data, in bytes.
14673 This function returns a pointer to data describing how to return
14674 whatever value was returned by FUNCTION. The data is saved in a
14675 block of memory allocated on the stack.
14677 It is not always simple to compute the proper value for SIZE. The
14678 value is used by `__builtin_apply' to compute the amount of data
14679 that should be pushed on the stack and copied from the incoming
14682 -- Built-in Function: void __builtin_return (void *RESULT)
14683 This built-in function returns the value described by RESULT from
14684 the containing function. You should specify, for RESULT, a value
14685 returned by `__builtin_apply'.
14688 File: gcc.info, Node: Typeof, Next: Conditionals, Prev: Constructing Calls, Up: C Extensions
14690 5.6 Referring to a Type with `typeof'
14691 =====================================
14693 Another way to refer to the type of an expression is with `typeof'.
14694 The syntax of using of this keyword looks like `sizeof', but the
14695 construct acts semantically like a type name defined with `typedef'.
14697 There are two ways of writing the argument to `typeof': with an
14698 expression or with a type. Here is an example with an expression:
14702 This assumes that `x' is an array of pointers to functions; the type
14703 described is that of the values of the functions.
14705 Here is an example with a typename as the argument:
14709 Here the type described is that of pointers to `int'.
14711 If you are writing a header file that must work when included in ISO C
14712 programs, write `__typeof__' instead of `typeof'. *Note Alternate
14715 A `typeof'-construct can be used anywhere a typedef name could be
14716 used. For example, you can use it in a declaration, in a cast, or
14717 inside of `sizeof' or `typeof'.
14719 `typeof' is often useful in conjunction with the
14720 statements-within-expressions feature. Here is how the two together can
14721 be used to define a safe "maximum" macro that operates on any
14722 arithmetic type and evaluates each of its arguments exactly once:
14725 ({ typeof (a) _a = (a); \
14726 typeof (b) _b = (b); \
14727 _a > _b ? _a : _b; })
14729 The reason for using names that start with underscores for the local
14730 variables is to avoid conflicts with variable names that occur within
14731 the expressions that are substituted for `a' and `b'. Eventually we
14732 hope to design a new form of declaration syntax that allows you to
14733 declare variables whose scopes start only after their initializers;
14734 this will be a more reliable way to prevent such conflicts.
14736 Some more examples of the use of `typeof':
14738 * This declares `y' with the type of what `x' points to.
14742 * This declares `y' as an array of such values.
14746 * This declares `y' as an array of pointers to characters:
14748 typeof (typeof (char *)[4]) y;
14750 It is equivalent to the following traditional C declaration:
14754 To see the meaning of the declaration using `typeof', and why it
14755 might be a useful way to write, rewrite it with these macros:
14757 #define pointer(T) typeof(T *)
14758 #define array(T, N) typeof(T [N])
14760 Now the declaration can be rewritten this way:
14762 array (pointer (char), 4) y;
14764 Thus, `array (pointer (char), 4)' is the type of arrays of 4
14765 pointers to `char'.
14767 _Compatibility Note:_ In addition to `typeof', GCC 2 supported a more
14768 limited extension which permitted one to write
14772 with the effect of declaring T to have the type of the expression EXPR.
14773 This extension does not work with GCC 3 (versions between 3.0 and 3.2
14774 will crash; 3.2.1 and later give an error). Code which relies on it
14775 should be rewritten to use `typeof':
14777 typedef typeof(EXPR) T;
14779 This will work with all versions of GCC.
14782 File: gcc.info, Node: Conditionals, Next: Long Long, Prev: Typeof, Up: C Extensions
14784 5.7 Conditionals with Omitted Operands
14785 ======================================
14787 The middle operand in a conditional expression may be omitted. Then if
14788 the first operand is nonzero, its value is the value of the conditional
14791 Therefore, the expression
14795 has the value of `x' if that is nonzero; otherwise, the value of `y'.
14797 This example is perfectly equivalent to
14801 In this simple case, the ability to omit the middle operand is not
14802 especially useful. When it becomes useful is when the first operand
14803 does, or may (if it is a macro argument), contain a side effect. Then
14804 repeating the operand in the middle would perform the side effect
14805 twice. Omitting the middle operand uses the value already computed
14806 without the undesirable effects of recomputing it.
14809 File: gcc.info, Node: Long Long, Next: Complex, Prev: Conditionals, Up: C Extensions
14811 5.8 Double-Word Integers
14812 ========================
14814 ISO C99 supports data types for integers that are at least 64 bits wide,
14815 and as an extension GCC supports them in C89 mode and in C++. Simply
14816 write `long long int' for a signed integer, or `unsigned long long int'
14817 for an unsigned integer. To make an integer constant of type `long
14818 long int', add the suffix `LL' to the integer. To make an integer
14819 constant of type `unsigned long long int', add the suffix `ULL' to the
14822 You can use these types in arithmetic like any other integer types.
14823 Addition, subtraction, and bitwise boolean operations on these types
14824 are open-coded on all types of machines. Multiplication is open-coded
14825 if the machine supports fullword-to-doubleword a widening multiply
14826 instruction. Division and shifts are open-coded only on machines that
14827 provide special support. The operations that are not open-coded use
14828 special library routines that come with GCC.
14830 There may be pitfalls when you use `long long' types for function
14831 arguments, unless you declare function prototypes. If a function
14832 expects type `int' for its argument, and you pass a value of type `long
14833 long int', confusion will result because the caller and the subroutine
14834 will disagree about the number of bytes for the argument. Likewise, if
14835 the function expects `long long int' and you pass `int'. The best way
14836 to avoid such problems is to use prototypes.
14839 File: gcc.info, Node: Complex, Next: Decimal Float, Prev: Long Long, Up: C Extensions
14841 5.9 Complex Numbers
14842 ===================
14844 ISO C99 supports complex floating data types, and as an extension GCC
14845 supports them in C89 mode and in C++, and supports complex integer data
14846 types which are not part of ISO C99. You can declare complex types
14847 using the keyword `_Complex'. As an extension, the older GNU keyword
14848 `__complex__' is also supported.
14850 For example, `_Complex double x;' declares `x' as a variable whose
14851 real part and imaginary part are both of type `double'. `_Complex
14852 short int y;' declares `y' to have real and imaginary parts of type
14853 `short int'; this is not likely to be useful, but it shows that the set
14854 of complex types is complete.
14856 To write a constant with a complex data type, use the suffix `i' or
14857 `j' (either one; they are equivalent). For example, `2.5fi' has type
14858 `_Complex float' and `3i' has type `_Complex int'. Such a constant
14859 always has a pure imaginary value, but you can form any complex value
14860 you like by adding one to a real constant. This is a GNU extension; if
14861 you have an ISO C99 conforming C library (such as GNU libc), and want
14862 to construct complex constants of floating type, you should include
14863 `<complex.h>' and use the macros `I' or `_Complex_I' instead.
14865 To extract the real part of a complex-valued expression EXP, write
14866 `__real__ EXP'. Likewise, use `__imag__' to extract the imaginary
14867 part. This is a GNU extension; for values of floating type, you should
14868 use the ISO C99 functions `crealf', `creal', `creall', `cimagf',
14869 `cimag' and `cimagl', declared in `<complex.h>' and also provided as
14870 built-in functions by GCC.
14872 The operator `~' performs complex conjugation when used on a value
14873 with a complex type. This is a GNU extension; for values of floating
14874 type, you should use the ISO C99 functions `conjf', `conj' and `conjl',
14875 declared in `<complex.h>' and also provided as built-in functions by
14878 GCC can allocate complex automatic variables in a noncontiguous
14879 fashion; it's even possible for the real part to be in a register while
14880 the imaginary part is on the stack (or vice-versa). Only the DWARF2
14881 debug info format can represent this, so use of DWARF2 is recommended.
14882 If you are using the stabs debug info format, GCC describes a
14883 noncontiguous complex variable as if it were two separate variables of
14884 noncomplex type. If the variable's actual name is `foo', the two
14885 fictitious variables are named `foo$real' and `foo$imag'. You can
14886 examine and set these two fictitious variables with your debugger.
14889 File: gcc.info, Node: Decimal Float, Next: Hex Floats, Prev: Complex, Up: C Extensions
14891 5.10 Decimal Floating Types
14892 ===========================
14894 As an extension, the GNU C compiler supports decimal floating types as
14895 defined in the N1176 draft of ISO/IEC WDTR24732. Support for decimal
14896 floating types in GCC will evolve as the draft technical report changes.
14897 Calling conventions for any target might also change. Not all targets
14898 support decimal floating types.
14900 The decimal floating types are `_Decimal32', `_Decimal64', and
14901 `_Decimal128'. They use a radix of ten, unlike the floating types
14902 `float', `double', and `long double' whose radix is not specified by
14903 the C standard but is usually two.
14905 Support for decimal floating types includes the arithmetic operators
14906 add, subtract, multiply, divide; unary arithmetic operators; relational
14907 operators; equality operators; and conversions to and from integer and
14908 other floating types. Use a suffix `df' or `DF' in a literal constant
14909 of type `_Decimal32', `dd' or `DD' for `_Decimal64', and `dl' or `DL'
14912 GCC support of decimal float as specified by the draft technical report
14915 * Translation time data type (TTDT) is not supported.
14917 * Characteristics of decimal floating types are defined in header
14918 file `decfloat.h' rather than `float.h'.
14920 * When the value of a decimal floating type cannot be represented in
14921 the integer type to which it is being converted, the result is
14922 undefined rather than the result value specified by the draft
14925 Types `_Decimal32', `_Decimal64', and `_Decimal128' are supported by
14926 the DWARF2 debug information format.
14929 File: gcc.info, Node: Hex Floats, Next: Zero Length, Prev: Decimal Float, Up: C Extensions
14934 ISO C99 supports floating-point numbers written not only in the usual
14935 decimal notation, such as `1.55e1', but also numbers such as `0x1.fp3'
14936 written in hexadecimal format. As a GNU extension, GCC supports this
14937 in C89 mode (except in some cases when strictly conforming) and in C++.
14938 In that format the `0x' hex introducer and the `p' or `P' exponent
14939 field are mandatory. The exponent is a decimal number that indicates
14940 the power of 2 by which the significant part will be multiplied. Thus
14941 `0x1.f' is 1 15/16, `p3' multiplies it by 8, and the value of `0x1.fp3'
14942 is the same as `1.55e1'.
14944 Unlike for floating-point numbers in the decimal notation the exponent
14945 is always required in the hexadecimal notation. Otherwise the compiler
14946 would not be able to resolve the ambiguity of, e.g., `0x1.f'. This
14947 could mean `1.0f' or `1.9375' since `f' is also the extension for
14948 floating-point constants of type `float'.
14951 File: gcc.info, Node: Zero Length, Next: Variable Length, Prev: Hex Floats, Up: C Extensions
14953 5.12 Arrays of Length Zero
14954 ==========================
14956 Zero-length arrays are allowed in GNU C. They are very useful as the
14957 last element of a structure which is really a header for a
14958 variable-length object:
14965 struct line *thisline = (struct line *)
14966 malloc (sizeof (struct line) + this_length);
14967 thisline->length = this_length;
14969 In ISO C90, you would have to give `contents' a length of 1, which
14970 means either you waste space or complicate the argument to `malloc'.
14972 In ISO C99, you would use a "flexible array member", which is slightly
14973 different in syntax and semantics:
14975 * Flexible array members are written as `contents[]' without the `0'.
14977 * Flexible array members have incomplete type, and so the `sizeof'
14978 operator may not be applied. As a quirk of the original
14979 implementation of zero-length arrays, `sizeof' evaluates to zero.
14981 * Flexible array members may only appear as the last member of a
14982 `struct' that is otherwise non-empty.
14984 * A structure containing a flexible array member, or a union
14985 containing such a structure (possibly recursively), may not be a
14986 member of a structure or an element of an array. (However, these
14987 uses are permitted by GCC as extensions.)
14989 GCC versions before 3.0 allowed zero-length arrays to be statically
14990 initialized, as if they were flexible arrays. In addition to those
14991 cases that were useful, it also allowed initializations in situations
14992 that would corrupt later data. Non-empty initialization of zero-length
14993 arrays is now treated like any case where there are more initializer
14994 elements than the array holds, in that a suitable warning about "excess
14995 elements in array" is given, and the excess elements (all of them, in
14996 this case) are ignored.
14998 Instead GCC allows static initialization of flexible array members.
14999 This is equivalent to defining a new structure containing the original
15000 structure followed by an array of sufficient size to contain the data.
15001 I.e. in the following, `f1' is constructed as if it were declared like
15006 } f1 = { 1, { 2, 3, 4 } };
15009 struct f1 f1; int data[3];
15010 } f2 = { { 1 }, { 2, 3, 4 } };
15012 The convenience of this extension is that `f1' has the desired type,
15013 eliminating the need to consistently refer to `f2.f1'.
15015 This has symmetry with normal static arrays, in that an array of
15016 unknown size is also written with `[]'.
15018 Of course, this extension only makes sense if the extra data comes at
15019 the end of a top-level object, as otherwise we would be overwriting
15020 data at subsequent offsets. To avoid undue complication and confusion
15021 with initialization of deeply nested arrays, we simply disallow any
15022 non-empty initialization except when the structure is the top-level
15023 object. For example:
15025 struct foo { int x; int y[]; };
15026 struct bar { struct foo z; };
15028 struct foo a = { 1, { 2, 3, 4 } }; // Valid.
15029 struct bar b = { { 1, { 2, 3, 4 } } }; // Invalid.
15030 struct bar c = { { 1, { } } }; // Valid.
15031 struct foo d[1] = { { 1 { 2, 3, 4 } } }; // Invalid.
15034 File: gcc.info, Node: Empty Structures, Next: Variadic Macros, Prev: Variable Length, Up: C Extensions
15036 5.13 Structures With No Members
15037 ===============================
15039 GCC permits a C structure to have no members:
15044 The structure will have size zero. In C++, empty structures are part
15045 of the language. G++ treats empty structures as if they had a single
15046 member of type `char'.
15049 File: gcc.info, Node: Variable Length, Next: Empty Structures, Prev: Zero Length, Up: C Extensions
15051 5.14 Arrays of Variable Length
15052 ==============================
15054 Variable-length automatic arrays are allowed in ISO C99, and as an
15055 extension GCC accepts them in C89 mode and in C++. (However, GCC's
15056 implementation of variable-length arrays does not yet conform in detail
15057 to the ISO C99 standard.) These arrays are declared like any other
15058 automatic arrays, but with a length that is not a constant expression.
15059 The storage is allocated at the point of declaration and deallocated
15060 when the brace-level is exited. For example:
15063 concat_fopen (char *s1, char *s2, char *mode)
15065 char str[strlen (s1) + strlen (s2) + 1];
15068 return fopen (str, mode);
15071 Jumping or breaking out of the scope of the array name deallocates the
15072 storage. Jumping into the scope is not allowed; you get an error
15075 You can use the function `alloca' to get an effect much like
15076 variable-length arrays. The function `alloca' is available in many
15077 other C implementations (but not in all). On the other hand,
15078 variable-length arrays are more elegant.
15080 There are other differences between these two methods. Space allocated
15081 with `alloca' exists until the containing _function_ returns. The
15082 space for a variable-length array is deallocated as soon as the array
15083 name's scope ends. (If you use both variable-length arrays and
15084 `alloca' in the same function, deallocation of a variable-length array
15085 will also deallocate anything more recently allocated with `alloca'.)
15087 You can also use variable-length arrays as arguments to functions:
15090 tester (int len, char data[len][len])
15095 The length of an array is computed once when the storage is allocated
15096 and is remembered for the scope of the array in case you access it with
15099 If you want to pass the array first and the length afterward, you can
15100 use a forward declaration in the parameter list--another GNU extension.
15103 tester (int len; char data[len][len], int len)
15108 The `int len' before the semicolon is a "parameter forward
15109 declaration", and it serves the purpose of making the name `len' known
15110 when the declaration of `data' is parsed.
15112 You can write any number of such parameter forward declarations in the
15113 parameter list. They can be separated by commas or semicolons, but the
15114 last one must end with a semicolon, which is followed by the "real"
15115 parameter declarations. Each forward declaration must match a "real"
15116 declaration in parameter name and data type. ISO C99 does not support
15117 parameter forward declarations.
15120 File: gcc.info, Node: Variadic Macros, Next: Escaped Newlines, Prev: Empty Structures, Up: C Extensions
15122 5.15 Macros with a Variable Number of Arguments.
15123 ================================================
15125 In the ISO C standard of 1999, a macro can be declared to accept a
15126 variable number of arguments much as a function can. The syntax for
15127 defining the macro is similar to that of a function. Here is an
15130 #define debug(format, ...) fprintf (stderr, format, __VA_ARGS__)
15132 Here `...' is a "variable argument". In the invocation of such a
15133 macro, it represents the zero or more tokens until the closing
15134 parenthesis that ends the invocation, including any commas. This set of
15135 tokens replaces the identifier `__VA_ARGS__' in the macro body wherever
15136 it appears. See the CPP manual for more information.
15138 GCC has long supported variadic macros, and used a different syntax
15139 that allowed you to give a name to the variable arguments just like any
15140 other argument. Here is an example:
15142 #define debug(format, args...) fprintf (stderr, format, args)
15144 This is in all ways equivalent to the ISO C example above, but arguably
15145 more readable and descriptive.
15147 GNU CPP has two further variadic macro extensions, and permits them to
15148 be used with either of the above forms of macro definition.
15150 In standard C, you are not allowed to leave the variable argument out
15151 entirely; but you are allowed to pass an empty argument. For example,
15152 this invocation is invalid in ISO C, because there is no comma after
15155 debug ("A message")
15157 GNU CPP permits you to completely omit the variable arguments in this
15158 way. In the above examples, the compiler would complain, though since
15159 the expansion of the macro still has the extra comma after the format
15162 To help solve this problem, CPP behaves specially for variable
15163 arguments used with the token paste operator, `##'. If instead you
15166 #define debug(format, ...) fprintf (stderr, format, ## __VA_ARGS__)
15168 and if the variable arguments are omitted or empty, the `##' operator
15169 causes the preprocessor to remove the comma before it. If you do
15170 provide some variable arguments in your macro invocation, GNU CPP does
15171 not complain about the paste operation and instead places the variable
15172 arguments after the comma. Just like any other pasted macro argument,
15173 these arguments are not macro expanded.
15176 File: gcc.info, Node: Escaped Newlines, Next: Subscripting, Prev: Variadic Macros, Up: C Extensions
15178 5.16 Slightly Looser Rules for Escaped Newlines
15179 ===============================================
15181 Recently, the preprocessor has relaxed its treatment of escaped
15182 newlines. Previously, the newline had to immediately follow a
15183 backslash. The current implementation allows whitespace in the form of
15184 spaces, horizontal and vertical tabs, and form feeds between the
15185 backslash and the subsequent newline. The preprocessor issues a
15186 warning, but treats it as a valid escaped newline and combines the two
15187 lines to form a single logical line. This works within comments and
15188 tokens, as well as between tokens. Comments are _not_ treated as
15189 whitespace for the purposes of this relaxation, since they have not yet
15190 been replaced with spaces.
15193 File: gcc.info, Node: Subscripting, Next: Pointer Arith, Prev: Escaped Newlines, Up: C Extensions
15195 5.17 Non-Lvalue Arrays May Have Subscripts
15196 ==========================================
15198 In ISO C99, arrays that are not lvalues still decay to pointers, and
15199 may be subscripted, although they may not be modified or used after the
15200 next sequence point and the unary `&' operator may not be applied to
15201 them. As an extension, GCC allows such arrays to be subscripted in C89
15202 mode, though otherwise they do not decay to pointers outside C99 mode.
15203 For example, this is valid in GNU C though not valid in C89:
15205 struct foo {int a[4];};
15211 return f().a[index];
15215 File: gcc.info, Node: Pointer Arith, Next: Initializers, Prev: Subscripting, Up: C Extensions
15217 5.18 Arithmetic on `void'- and Function-Pointers
15218 ================================================
15220 In GNU C, addition and subtraction operations are supported on pointers
15221 to `void' and on pointers to functions. This is done by treating the
15222 size of a `void' or of a function as 1.
15224 A consequence of this is that `sizeof' is also allowed on `void' and
15225 on function types, and returns 1.
15227 The option `-Wpointer-arith' requests a warning if these extensions
15231 File: gcc.info, Node: Initializers, Next: Compound Literals, Prev: Pointer Arith, Up: C Extensions
15233 5.19 Non-Constant Initializers
15234 ==============================
15236 As in standard C++ and ISO C99, the elements of an aggregate
15237 initializer for an automatic variable are not required to be constant
15238 expressions in GNU C. Here is an example of an initializer with
15239 run-time varying elements:
15241 foo (float f, float g)
15243 float beat_freqs[2] = { f-g, f+g };
15248 File: gcc.info, Node: Compound Literals, Next: Designated Inits, Prev: Initializers, Up: C Extensions
15250 5.20 Compound Literals
15251 ======================
15253 ISO C99 supports compound literals. A compound literal looks like a
15254 cast containing an initializer. Its value is an object of the type
15255 specified in the cast, containing the elements specified in the
15256 initializer; it is an lvalue. As an extension, GCC supports compound
15257 literals in C89 mode and in C++.
15259 Usually, the specified type is a structure. Assume that `struct foo'
15260 and `structure' are declared as shown:
15262 struct foo {int a; char b[2];} structure;
15264 Here is an example of constructing a `struct foo' with a compound
15267 structure = ((struct foo) {x + y, 'a', 0});
15269 This is equivalent to writing the following:
15272 struct foo temp = {x + y, 'a', 0};
15276 You can also construct an array. If all the elements of the compound
15277 literal are (made up of) simple constant expressions, suitable for use
15278 in initializers of objects of static storage duration, then the compound
15279 literal can be coerced to a pointer to its first element and used in
15280 such an initializer, as shown here:
15282 char **foo = (char *[]) { "x", "y", "z" };
15284 Compound literals for scalar types and union types are is also
15285 allowed, but then the compound literal is equivalent to a cast.
15287 As a GNU extension, GCC allows initialization of objects with static
15288 storage duration by compound literals (which is not possible in ISO
15289 C99, because the initializer is not a constant). It is handled as if
15290 the object was initialized only with the bracket enclosed list if the
15291 types of the compound literal and the object match. The initializer
15292 list of the compound literal must be constant. If the object being
15293 initialized has array type of unknown size, the size is determined by
15294 compound literal size.
15296 static struct foo x = (struct foo) {1, 'a', 'b'};
15297 static int y[] = (int []) {1, 2, 3};
15298 static int z[] = (int [3]) {1};
15300 The above lines are equivalent to the following:
15301 static struct foo x = {1, 'a', 'b'};
15302 static int y[] = {1, 2, 3};
15303 static int z[] = {1, 0, 0};
15306 File: gcc.info, Node: Designated Inits, Next: Cast to Union, Prev: Compound Literals, Up: C Extensions
15308 5.21 Designated Initializers
15309 ============================
15311 Standard C89 requires the elements of an initializer to appear in a
15312 fixed order, the same as the order of the elements in the array or
15313 structure being initialized.
15315 In ISO C99 you can give the elements in any order, specifying the array
15316 indices or structure field names they apply to, and GNU C allows this as
15317 an extension in C89 mode as well. This extension is not implemented in
15320 To specify an array index, write `[INDEX] =' before the element value.
15323 int a[6] = { [4] = 29, [2] = 15 };
15327 int a[6] = { 0, 0, 15, 0, 29, 0 };
15329 The index values must be constant expressions, even if the array being
15330 initialized is automatic.
15332 An alternative syntax for this which has been obsolete since GCC 2.5
15333 but GCC still accepts is to write `[INDEX]' before the element value,
15336 To initialize a range of elements to the same value, write `[FIRST ...
15337 LAST] = VALUE'. This is a GNU extension. For example,
15339 int widths[] = { [0 ... 9] = 1, [10 ... 99] = 2, [100] = 3 };
15341 If the value in it has side-effects, the side-effects will happen only
15342 once, not for each initialized field by the range initializer.
15344 Note that the length of the array is the highest value specified plus
15347 In a structure initializer, specify the name of a field to initialize
15348 with `.FIELDNAME =' before the element value. For example, given the
15349 following structure,
15351 struct point { int x, y; };
15353 the following initialization
15355 struct point p = { .y = yvalue, .x = xvalue };
15359 struct point p = { xvalue, yvalue };
15361 Another syntax which has the same meaning, obsolete since GCC 2.5, is
15362 `FIELDNAME:', as shown here:
15364 struct point p = { y: yvalue, x: xvalue };
15366 The `[INDEX]' or `.FIELDNAME' is known as a "designator". You can
15367 also use a designator (or the obsolete colon syntax) when initializing
15368 a union, to specify which element of the union should be used. For
15371 union foo { int i; double d; };
15373 union foo f = { .d = 4 };
15375 will convert 4 to a `double' to store it in the union using the second
15376 element. By contrast, casting 4 to type `union foo' would store it
15377 into the union as the integer `i', since it is an integer. (*Note Cast
15380 You can combine this technique of naming elements with ordinary C
15381 initialization of successive elements. Each initializer element that
15382 does not have a designator applies to the next consecutive element of
15383 the array or structure. For example,
15385 int a[6] = { [1] = v1, v2, [4] = v4 };
15389 int a[6] = { 0, v1, v2, 0, v4, 0 };
15391 Labeling the elements of an array initializer is especially useful
15392 when the indices are characters or belong to an `enum' type. For
15395 int whitespace[256]
15396 = { [' '] = 1, ['\t'] = 1, ['\h'] = 1,
15397 ['\f'] = 1, ['\n'] = 1, ['\r'] = 1 };
15399 You can also write a series of `.FIELDNAME' and `[INDEX]' designators
15400 before an `=' to specify a nested subobject to initialize; the list is
15401 taken relative to the subobject corresponding to the closest
15402 surrounding brace pair. For example, with the `struct point'
15405 struct point ptarray[10] = { [2].y = yv2, [2].x = xv2, [0].x = xv0 };
15407 If the same field is initialized multiple times, it will have value from
15408 the last initialization. If any such overridden initialization has
15409 side-effect, it is unspecified whether the side-effect happens or not.
15410 Currently, GCC will discard them and issue a warning.
15413 File: gcc.info, Node: Case Ranges, Next: Mixed Declarations, Prev: Cast to Union, Up: C Extensions
15418 You can specify a range of consecutive values in a single `case' label,
15423 This has the same effect as the proper number of individual `case'
15424 labels, one for each integer value from LOW to HIGH, inclusive.
15426 This feature is especially useful for ranges of ASCII character codes:
15430 *Be careful:* Write spaces around the `...', for otherwise it may be
15431 parsed wrong when you use it with integer values. For example, write
15441 File: gcc.info, Node: Cast to Union, Next: Case Ranges, Prev: Designated Inits, Up: C Extensions
15443 5.23 Cast to a Union Type
15444 =========================
15446 A cast to union type is similar to other casts, except that the type
15447 specified is a union type. You can specify the type either with `union
15448 TAG' or with a typedef name. A cast to union is actually a constructor
15449 though, not a cast, and hence does not yield an lvalue like normal
15450 casts. (*Note Compound Literals::.)
15452 The types that may be cast to the union type are those of the members
15453 of the union. Thus, given the following union and variables:
15455 union foo { int i; double d; };
15459 both `x' and `y' can be cast to type `union foo'.
15461 Using the cast as the right-hand side of an assignment to a variable of
15462 union type is equivalent to storing in a member of the union:
15466 u = (union foo) x == u.i = x
15467 u = (union foo) y == u.d = y
15469 You can also use the union cast as a function argument:
15471 void hack (union foo);
15473 hack ((union foo) x);
15476 File: gcc.info, Node: Mixed Declarations, Next: Function Attributes, Prev: Case Ranges, Up: C Extensions
15478 5.24 Mixed Declarations and Code
15479 ================================
15481 ISO C99 and ISO C++ allow declarations and code to be freely mixed
15482 within compound statements. As an extension, GCC also allows this in
15483 C89 mode. For example, you could do:
15490 Each identifier is visible from where it is declared until the end of
15491 the enclosing block.
15494 File: gcc.info, Node: Function Attributes, Next: Attribute Syntax, Prev: Mixed Declarations, Up: C Extensions
15496 5.25 Declaring Attributes of Functions
15497 ======================================
15499 In GNU C, you declare certain things about functions called in your
15500 program which help the compiler optimize function calls and check your
15501 code more carefully.
15503 The keyword `__attribute__' allows you to specify special attributes
15504 when making a declaration. This keyword is followed by an attribute
15505 specification inside double parentheses. The following attributes are
15506 currently defined for functions on all targets: `noreturn',
15507 `returns_twice', `noinline', `always_inline', `flatten', `pure',
15508 `const', `nothrow', `sentinel', `format', `format_arg',
15509 `no_instrument_function', `section', `constructor', `destructor',
15510 `used', `unused', `deprecated', `weak', `malloc', `alias',
15511 `warn_unused_result', `nonnull', `gnu_inline' and `externally_visible'.
15512 Several other attributes are defined for functions on particular
15513 target systems. Other attributes, including `section' are supported
15514 for variables declarations (*note Variable Attributes::) and for types
15515 (*note Type Attributes::).
15517 You may also specify attributes with `__' preceding and following each
15518 keyword. This allows you to use them in header files without being
15519 concerned about a possible macro of the same name. For example, you
15520 may use `__noreturn__' instead of `noreturn'.
15522 *Note Attribute Syntax::, for details of the exact syntax for using
15526 The `alias' attribute causes the declaration to be emitted as an
15527 alias for another symbol, which must be specified. For instance,
15529 void __f () { /* Do something. */; }
15530 void f () __attribute__ ((weak, alias ("__f")));
15532 defines `f' to be a weak alias for `__f'. In C++, the mangled
15533 name for the target must be used. It is an error if `__f' is not
15534 defined in the same translation unit.
15536 Not all target machines support this attribute.
15539 Generally, functions are not inlined unless optimization is
15540 specified. For functions declared inline, this attribute inlines
15541 the function even if no optimization level was specified.
15544 This attribute should be used with a function which is also
15545 declared with the `inline' keyword. It directs GCC to treat the
15546 function as if it were defined in gnu89 mode even when compiling
15547 in C99 or gnu99 mode.
15549 If the function is declared `extern', then this definition of the
15550 function is used only for inlining. In no case is the function
15551 compiled as a standalone function, not even if you take its address
15552 explicitly. Such an address becomes an external reference, as if
15553 you had only declared the function, and had not defined it. This
15554 has almost the effect of a macro. The way to use this is to put a
15555 function definition in a header file with this attribute, and put
15556 another copy of the function, without `extern', in a library file.
15557 The definition in the header file will cause most calls to the
15558 function to be inlined. If any uses of the function remain, they
15559 will refer to the single copy in the library. Note that the two
15560 definitions of the functions need not be precisely the same,
15561 although if they do not have the same effect your program may
15564 If the function is neither `extern' nor `static', then the
15565 function is compiled as a standalone function, as well as being
15566 inlined where possible.
15568 This is how GCC traditionally handled functions declared `inline'.
15569 Since ISO C99 specifies a different semantics for `inline', this
15570 function attribute is provided as a transition measure and as a
15571 useful feature in its own right. This attribute is available in
15572 GCC 4.1.3 and later. It is available if either of the
15573 preprocessor macros `__GNUC_GNU_INLINE__' or
15574 `__GNUC_STDC_INLINE__' are defined. *Note An Inline Function is
15575 As Fast As a Macro: Inline.
15577 Note that since the first version of GCC to support C99 inline
15578 semantics is 4.3, earlier versions of GCC which accept this
15579 attribute effectively assume that it is always present, whether or
15580 not it is given explicitly. In versions prior to 4.3, the only
15581 effect of explicitly including it is to disable warnings about
15582 using inline functions in C99 mode.
15585 Generally, inlining into a function is limited. For a function
15586 marked with this attribute, every call inside this function will
15587 be inlined, if possible. Whether the function itself is
15588 considered for inlining depends on its size and the current
15589 inlining parameters. The `flatten' attribute only works reliably
15590 in unit-at-a-time mode.
15593 On the Intel 386, the `cdecl' attribute causes the compiler to
15594 assume that the calling function will pop off the stack space used
15595 to pass arguments. This is useful to override the effects of the
15599 Many functions do not examine any values except their arguments,
15600 and have no effects except the return value. Basically this is
15601 just slightly more strict class than the `pure' attribute below,
15602 since function is not allowed to read global memory.
15604 Note that a function that has pointer arguments and examines the
15605 data pointed to must _not_ be declared `const'. Likewise, a
15606 function that calls a non-`const' function usually must not be
15607 `const'. It does not make sense for a `const' function to return
15610 The attribute `const' is not implemented in GCC versions earlier
15611 than 2.5. An alternative way to declare that a function has no
15612 side effects, which works in the current version and in some older
15613 versions, is as follows:
15615 typedef int intfn ();
15617 extern const intfn square;
15619 This approach does not work in GNU C++ from 2.6.0 on, since the
15620 language specifies that the `const' must be attached to the return
15625 The `constructor' attribute causes the function to be called
15626 automatically before execution enters `main ()'. Similarly, the
15627 `destructor' attribute causes the function to be called
15628 automatically after `main ()' has completed or `exit ()' has been
15629 called. Functions with these attributes are useful for
15630 initializing data that will be used implicitly during the
15631 execution of the program.
15633 These attributes are not currently implemented for Objective-C.
15636 The `deprecated' attribute results in a warning if the function is
15637 used anywhere in the source file. This is useful when identifying
15638 functions that are expected to be removed in a future version of a
15639 program. The warning also includes the location of the declaration
15640 of the deprecated function, to enable users to easily find further
15641 information about why the function is deprecated, or what they
15642 should do instead. Note that the warnings only occurs for uses:
15644 int old_fn () __attribute__ ((deprecated));
15646 int (*fn_ptr)() = old_fn;
15648 results in a warning on line 3 but not line 2.
15650 The `deprecated' attribute can also be used for variables and
15651 types (*note Variable Attributes::, *note Type Attributes::.)
15654 On Microsoft Windows targets and Symbian OS targets the
15655 `dllexport' attribute causes the compiler to provide a global
15656 pointer to a pointer in a DLL, so that it can be referenced with
15657 the `dllimport' attribute. On Microsoft Windows targets, the
15658 pointer name is formed by combining `_imp__' and the function or
15661 You can use `__declspec(dllexport)' as a synonym for
15662 `__attribute__ ((dllexport))' for compatibility with other
15665 On systems that support the `visibility' attribute, this attribute
15666 also implies "default" visibility, unless a `visibility' attribute
15667 is explicitly specified. You should avoid the use of `dllexport'
15668 with "hidden" or "internal" visibility; in the future GCC may
15669 issue an error for those cases.
15671 Currently, the `dllexport' attribute is ignored for inlined
15672 functions, unless the `-fkeep-inline-functions' flag has been
15673 used. The attribute is also ignored for undefined symbols.
15675 When applied to C++ classes, the attribute marks defined
15676 non-inlined member functions and static data members as exports.
15677 Static consts initialized in-class are not marked unless they are
15678 also defined out-of-class.
15680 For Microsoft Windows targets there are alternative methods for
15681 including the symbol in the DLL's export table such as using a
15682 `.def' file with an `EXPORTS' section or, with GNU ld, using the
15683 `--export-all' linker flag.
15686 On Microsoft Windows and Symbian OS targets, the `dllimport'
15687 attribute causes the compiler to reference a function or variable
15688 via a global pointer to a pointer that is set up by the DLL
15689 exporting the symbol. The attribute implies `extern' storage. On
15690 Microsoft Windows targets, the pointer name is formed by combining
15691 `_imp__' and the function or variable name.
15693 You can use `__declspec(dllimport)' as a synonym for
15694 `__attribute__ ((dllimport))' for compatibility with other
15697 Currently, the attribute is ignored for inlined functions. If the
15698 attribute is applied to a symbol _definition_, an error is
15699 reported. If a symbol previously declared `dllimport' is later
15700 defined, the attribute is ignored in subsequent references, and a
15701 warning is emitted. The attribute is also overridden by a
15702 subsequent declaration as `dllexport'.
15704 When applied to C++ classes, the attribute marks non-inlined
15705 member functions and static data members as imports. However, the
15706 attribute is ignored for virtual methods to allow creation of
15707 vtables using thunks.
15709 On the SH Symbian OS target the `dllimport' attribute also has
15710 another affect--it can cause the vtable and run-time type
15711 information for a class to be exported. This happens when the
15712 class has a dllimport'ed constructor or a non-inline, non-pure
15713 virtual function and, for either of those two conditions, the
15714 class also has a inline constructor or destructor and has a key
15715 function that is defined in the current translation unit.
15717 For Microsoft Windows based targets the use of the `dllimport'
15718 attribute on functions is not necessary, but provides a small
15719 performance benefit by eliminating a thunk in the DLL. The use of
15720 the `dllimport' attribute on imported variables was required on
15721 older versions of the GNU linker, but can now be avoided by
15722 passing the `--enable-auto-import' switch to the GNU linker. As
15723 with functions, using the attribute for a variable eliminates a
15726 One drawback to using this attribute is that a pointer to a
15727 function or variable marked as `dllimport' cannot be used as a
15728 constant address. On Microsoft Windows targets, the attribute can
15729 be disabled for functions by setting the `-mnop-fun-dllimport'
15733 Use this attribute on the H8/300, H8/300H, and H8S to indicate
15734 that the specified variable should be placed into the eight bit
15735 data section. The compiler will generate more efficient code for
15736 certain operations on data in the eight bit data area. Note the
15737 eight bit data area is limited to 256 bytes of data.
15739 You must use GAS and GLD from GNU binutils version 2.7 or later for
15740 this attribute to work correctly.
15742 `exception_handler'
15743 Use this attribute on the Blackfin to indicate that the specified
15744 function is an exception handler. The compiler will generate
15745 function entry and exit sequences suitable for use in an exception
15746 handler when this attribute is present.
15749 On 68HC11 and 68HC12 the `far' attribute causes the compiler to
15750 use a calling convention that takes care of switching memory banks
15751 when entering and leaving a function. This calling convention is
15752 also the default when using the `-mlong-calls' option.
15754 On 68HC12 the compiler will use the `call' and `rtc' instructions
15755 to call and return from a function.
15757 On 68HC11 the compiler will generate a sequence of instructions to
15758 invoke a board-specific routine to switch the memory bank and call
15759 the real function. The board-specific routine simulates a `call'.
15760 At the end of a function, it will jump to a board-specific routine
15761 instead of using `rts'. The board-specific return routine
15762 simulates the `rtc'.
15765 On the Intel 386, the `fastcall' attribute causes the compiler to
15766 pass the first argument (if of integral type) in the register ECX
15767 and the second argument (if of integral type) in the register EDX.
15768 Subsequent and other typed arguments are passed on the stack.
15769 The called function will pop the arguments off the stack. If the
15770 number of arguments is variable all arguments are pushed on the
15773 `format (ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)'
15774 The `format' attribute specifies that a function takes `printf',
15775 `scanf', `strftime' or `strfmon' style arguments which should be
15776 type-checked against a format string. For example, the
15780 my_printf (void *my_object, const char *my_format, ...)
15781 __attribute__ ((format (printf, 2, 3)));
15783 causes the compiler to check the arguments in calls to `my_printf'
15784 for consistency with the `printf' style format string argument
15787 The parameter ARCHETYPE determines how the format string is
15788 interpreted, and should be `printf', `scanf', `strftime' or
15789 `strfmon'. (You can also use `__printf__', `__scanf__',
15790 `__strftime__' or `__strfmon__'.) The parameter STRING-INDEX
15791 specifies which argument is the format string argument (starting
15792 from 1), while FIRST-TO-CHECK is the number of the first argument
15793 to check against the format string. For functions where the
15794 arguments are not available to be checked (such as `vprintf'),
15795 specify the third parameter as zero. In this case the compiler
15796 only checks the format string for consistency. For `strftime'
15797 formats, the third parameter is required to be zero. Since
15798 non-static C++ methods have an implicit `this' argument, the
15799 arguments of such methods should be counted from two, not one, when
15800 giving values for STRING-INDEX and FIRST-TO-CHECK.
15802 In the example above, the format string (`my_format') is the second
15803 argument of the function `my_print', and the arguments to check
15804 start with the third argument, so the correct parameters for the
15805 format attribute are 2 and 3.
15807 The `format' attribute allows you to identify your own functions
15808 which take format strings as arguments, so that GCC can check the
15809 calls to these functions for errors. The compiler always (unless
15810 `-ffreestanding' or `-fno-builtin' is used) checks formats for the
15811 standard library functions `printf', `fprintf', `sprintf',
15812 `scanf', `fscanf', `sscanf', `strftime', `vprintf', `vfprintf' and
15813 `vsprintf' whenever such warnings are requested (using
15814 `-Wformat'), so there is no need to modify the header file
15815 `stdio.h'. In C99 mode, the functions `snprintf', `vsnprintf',
15816 `vscanf', `vfscanf' and `vsscanf' are also checked. Except in
15817 strictly conforming C standard modes, the X/Open function
15818 `strfmon' is also checked as are `printf_unlocked' and
15819 `fprintf_unlocked'. *Note Options Controlling C Dialect: C
15822 The target may provide additional types of format checks. *Note
15823 Format Checks Specific to Particular Target Machines: Target
15826 `format_arg (STRING-INDEX)'
15827 The `format_arg' attribute specifies that a function takes a format
15828 string for a `printf', `scanf', `strftime' or `strfmon' style
15829 function and modifies it (for example, to translate it into
15830 another language), so the result can be passed to a `printf',
15831 `scanf', `strftime' or `strfmon' style function (with the
15832 remaining arguments to the format function the same as they would
15833 have been for the unmodified string). For example, the
15837 my_dgettext (char *my_domain, const char *my_format)
15838 __attribute__ ((format_arg (2)));
15840 causes the compiler to check the arguments in calls to a `printf',
15841 `scanf', `strftime' or `strfmon' type function, whose format
15842 string argument is a call to the `my_dgettext' function, for
15843 consistency with the format string argument `my_format'. If the
15844 `format_arg' attribute had not been specified, all the compiler
15845 could tell in such calls to format functions would be that the
15846 format string argument is not constant; this would generate a
15847 warning when `-Wformat-nonliteral' is used, but the calls could
15848 not be checked without the attribute.
15850 The parameter STRING-INDEX specifies which argument is the format
15851 string argument (starting from one). Since non-static C++ methods
15852 have an implicit `this' argument, the arguments of such methods
15853 should be counted from two.
15855 The `format-arg' attribute allows you to identify your own
15856 functions which modify format strings, so that GCC can check the
15857 calls to `printf', `scanf', `strftime' or `strfmon' type function
15858 whose operands are a call to one of your own function. The
15859 compiler always treats `gettext', `dgettext', and `dcgettext' in
15860 this manner except when strict ISO C support is requested by
15861 `-ansi' or an appropriate `-std' option, or `-ffreestanding' or
15862 `-fno-builtin' is used. *Note Options Controlling C Dialect: C
15866 Use this attribute on the H8/300, H8/300H, and H8S to indicate
15867 that the specified function should be called through the function
15868 vector. Calling a function through the function vector will
15869 reduce code size, however; the function vector has a limited size
15870 (maximum 128 entries on the H8/300 and 64 entries on the H8/300H
15871 and H8S) and shares space with the interrupt vector.
15873 You must use GAS and GLD from GNU binutils version 2.7 or later for
15874 this attribute to work correctly.
15877 Use this attribute on the ARM, AVR, C4x, CRX, M32C, M32R/D, MS1,
15878 and Xstormy16 ports to indicate that the specified function is an
15879 interrupt handler. The compiler will generate function entry and
15880 exit sequences suitable for use in an interrupt handler when this
15881 attribute is present.
15883 Note, interrupt handlers for the Blackfin, m68k, H8/300, H8/300H,
15884 H8S, and SH processors can be specified via the
15885 `interrupt_handler' attribute.
15887 Note, on the AVR, interrupts will be enabled inside the function.
15889 Note, for the ARM, you can specify the kind of interrupt to be
15890 handled by adding an optional parameter to the interrupt attribute
15893 void f () __attribute__ ((interrupt ("IRQ")));
15895 Permissible values for this parameter are: IRQ, FIQ, SWI, ABORT
15898 `interrupt_handler'
15899 Use this attribute on the Blackfin, m68k, H8/300, H8/300H, H8S,
15900 and SH to indicate that the specified function is an interrupt
15901 handler. The compiler will generate function entry and exit
15902 sequences suitable for use in an interrupt handler when this
15903 attribute is present.
15906 When used together with `interrupt_handler', `exception_handler'
15907 or `nmi_handler', code will be generated to load the stack pointer
15908 from the USP register in the function prologue.
15910 `long_call/short_call'
15911 This attribute specifies how a particular function is called on
15912 ARM. Both attributes override the `-mlong-calls' (*note ARM
15913 Options::) command line switch and `#pragma long_calls' settings.
15914 The `long_call' attribute indicates that the function might be far
15915 away from the call site and require a different (more expensive)
15916 calling sequence. The `short_call' attribute always places the
15917 offset to the function from the call site into the `BL'
15918 instruction directly.
15920 `longcall/shortcall'
15921 On the Blackfin, RS/6000 and PowerPC, the `longcall' attribute
15922 indicates that the function might be far away from the call site
15923 and require a different (more expensive) calling sequence. The
15924 `shortcall' attribute indicates that the function is always close
15925 enough for the shorter calling sequence to be used. These
15926 attributes override both the `-mlongcall' switch and, on the
15927 RS/6000 and PowerPC, the `#pragma longcall' setting.
15929 *Note RS/6000 and PowerPC Options::, for more information on
15930 whether long calls are necessary.
15933 This attribute specifies how a particular function is called on
15934 MIPS. The attribute overrides the `-mlong-calls' (*note MIPS
15935 Options::) command line switch. This attribute causes the
15936 compiler to always call the function by first loading its address
15937 into a register, and then using the contents of that register.
15940 The `malloc' attribute is used to tell the compiler that a function
15941 may be treated as if any non-`NULL' pointer it returns cannot
15942 alias any other pointer valid when the function returns. This
15943 will often improve optimization. Standard functions with this
15944 property include `malloc' and `calloc'. `realloc'-like functions
15945 have this property as long as the old pointer is never referred to
15946 (including comparing it to the new pointer) after the function
15947 returns a non-`NULL' value.
15949 `model (MODEL-NAME)'
15950 On the M32R/D, use this attribute to set the addressability of an
15951 object, and of the code generated for a function. The identifier
15952 MODEL-NAME is one of `small', `medium', or `large', representing
15953 each of the code models.
15955 Small model objects live in the lower 16MB of memory (so that their
15956 addresses can be loaded with the `ld24' instruction), and are
15957 callable with the `bl' instruction.
15959 Medium model objects may live anywhere in the 32-bit address space
15960 (the compiler will generate `seth/add3' instructions to load their
15961 addresses), and are callable with the `bl' instruction.
15963 Large model objects may live anywhere in the 32-bit address space
15964 (the compiler will generate `seth/add3' instructions to load their
15965 addresses), and may not be reachable with the `bl' instruction
15966 (the compiler will generate the much slower `seth/add3/jl'
15967 instruction sequence).
15969 On IA-64, use this attribute to set the addressability of an
15970 object. At present, the only supported identifier for MODEL-NAME
15971 is `small', indicating addressability via "small" (22-bit)
15972 addresses (so that their addresses can be loaded with the `addl'
15973 instruction). Caveat: such addressing is by definition not
15974 position independent and hence this attribute must not be used for
15975 objects defined by shared libraries.
15978 Use this attribute on the ARM, AVR, C4x and IP2K ports to indicate
15979 that the specified function does not need prologue/epilogue
15980 sequences generated by the compiler. It is up to the programmer
15981 to provide these sequences.
15984 On 68HC11 and 68HC12 the `near' attribute causes the compiler to
15985 use the normal calling convention based on `jsr' and `rts'. This
15986 attribute can be used to cancel the effect of the `-mlong-calls'
15990 Use this attribute together with `interrupt_handler',
15991 `exception_handler' or `nmi_handler' to indicate that the function
15992 entry code should enable nested interrupts or exceptions.
15995 Use this attribute on the Blackfin to indicate that the specified
15996 function is an NMI handler. The compiler will generate function
15997 entry and exit sequences suitable for use in an NMI handler when
15998 this attribute is present.
16000 `no_instrument_function'
16001 If `-finstrument-functions' is given, profiling function calls will
16002 be generated at entry and exit of most user-compiled functions.
16003 Functions with this attribute will not be so instrumented.
16006 This function attribute prevents a function from being considered
16009 `nonnull (ARG-INDEX, ...)'
16010 The `nonnull' attribute specifies that some function parameters
16011 should be non-null pointers. For instance, the declaration:
16014 my_memcpy (void *dest, const void *src, size_t len)
16015 __attribute__((nonnull (1, 2)));
16017 causes the compiler to check that, in calls to `my_memcpy',
16018 arguments DEST and SRC are non-null. If the compiler determines
16019 that a null pointer is passed in an argument slot marked as
16020 non-null, and the `-Wnonnull' option is enabled, a warning is
16021 issued. The compiler may also choose to make optimizations based
16022 on the knowledge that certain function arguments will not be null.
16024 If no argument index list is given to the `nonnull' attribute, all
16025 pointer arguments are marked as non-null. To illustrate, the
16026 following declaration is equivalent to the previous example:
16029 my_memcpy (void *dest, const void *src, size_t len)
16030 __attribute__((nonnull));
16033 A few standard library functions, such as `abort' and `exit',
16034 cannot return. GCC knows this automatically. Some programs define
16035 their own functions that never return. You can declare them
16036 `noreturn' to tell the compiler this fact. For example,
16038 void fatal () __attribute__ ((noreturn));
16043 /* ... */ /* Print error message. */ /* ... */
16047 The `noreturn' keyword tells the compiler to assume that `fatal'
16048 cannot return. It can then optimize without regard to what would
16049 happen if `fatal' ever did return. This makes slightly better
16050 code. More importantly, it helps avoid spurious warnings of
16051 uninitialized variables.
16053 The `noreturn' keyword does not affect the exceptional path when
16054 that applies: a `noreturn'-marked function may still return to the
16055 caller by throwing an exception or calling `longjmp'.
16057 Do not assume that registers saved by the calling function are
16058 restored before calling the `noreturn' function.
16060 It does not make sense for a `noreturn' function to have a return
16061 type other than `void'.
16063 The attribute `noreturn' is not implemented in GCC versions
16064 earlier than 2.5. An alternative way to declare that a function
16065 does not return, which works in the current version and in some
16066 older versions, is as follows:
16068 typedef void voidfn ();
16070 volatile voidfn fatal;
16072 This approach does not work in GNU C++.
16075 The `nothrow' attribute is used to inform the compiler that a
16076 function cannot throw an exception. For example, most functions in
16077 the standard C library can be guaranteed not to throw an exception
16078 with the notable exceptions of `qsort' and `bsearch' that take
16079 function pointer arguments. The `nothrow' attribute is not
16080 implemented in GCC versions earlier than 3.3.
16083 Many functions have no effects except the return value and their
16084 return value depends only on the parameters and/or global
16085 variables. Such a function can be subject to common subexpression
16086 elimination and loop optimization just as an arithmetic operator
16087 would be. These functions should be declared with the attribute
16088 `pure'. For example,
16090 int square (int) __attribute__ ((pure));
16092 says that the hypothetical function `square' is safe to call fewer
16093 times than the program says.
16095 Some of common examples of pure functions are `strlen' or `memcmp'.
16096 Interesting non-pure functions are functions with infinite loops
16097 or those depending on volatile memory or other system resource,
16098 that may change between two consecutive calls (such as `feof' in a
16099 multithreading environment).
16101 The attribute `pure' is not implemented in GCC versions earlier
16105 On the Intel 386, the `regparm' attribute causes the compiler to
16106 pass arguments number one to NUMBER if they are of integral type
16107 in registers EAX, EDX, and ECX instead of on the stack. Functions
16108 that take a variable number of arguments will continue to be
16109 passed all of their arguments on the stack.
16111 Beware that on some ELF systems this attribute is unsuitable for
16112 global functions in shared libraries with lazy binding (which is
16113 the default). Lazy binding will send the first call via resolving
16114 code in the loader, which might assume EAX, EDX and ECX can be
16115 clobbered, as per the standard calling conventions. Solaris 8 is
16116 affected by this. GNU systems with GLIBC 2.1 or higher, and
16117 FreeBSD, are believed to be safe since the loaders there save all
16118 registers. (Lazy binding can be disabled with the linker or the
16119 loader if desired, to avoid the problem.)
16122 On the Intel 386 with SSE support, the `sseregparm' attribute
16123 causes the compiler to pass up to 3 floating point arguments in
16124 SSE registers instead of on the stack. Functions that take a
16125 variable number of arguments will continue to pass all of their
16126 floating point arguments on the stack.
16128 `force_align_arg_pointer'
16129 On the Intel x86, the `force_align_arg_pointer' attribute may be
16130 applied to individual function definitions, generating an alternate
16131 prologue and epilogue that realigns the runtime stack. This
16132 supports mixing legacy codes that run with a 4-byte aligned stack
16133 with modern codes that keep a 16-byte stack for SSE compatibility.
16134 The alternate prologue and epilogue are slower and bigger than
16135 the regular ones, and the alternate prologue requires a scratch
16136 register; this lowers the number of registers available if used in
16137 conjunction with the `regparm' attribute. The
16138 `force_align_arg_pointer' attribute is incompatible with nested
16139 functions; this is considered a hard error.
16142 The `returns_twice' attribute tells the compiler that a function
16143 may return more than one time. The compiler will ensure that all
16144 registers are dead before calling such a function and will emit a
16145 warning about the variables that may be clobbered after the second
16146 return from the function. Examples of such functions are `setjmp'
16147 and `vfork'. The `longjmp'-like counterpart of such function, if
16148 any, might need to be marked with the `noreturn' attribute.
16151 Use this attribute on the Blackfin, H8/300, H8/300H, and H8S to
16152 indicate that all registers except the stack pointer should be
16153 saved in the prologue regardless of whether they are used or not.
16155 `section ("SECTION-NAME")'
16156 Normally, the compiler places the code it generates in the `text'
16157 section. Sometimes, however, you need additional sections, or you
16158 need certain particular functions to appear in special sections.
16159 The `section' attribute specifies that a function lives in a
16160 particular section. For example, the declaration:
16162 extern void foobar (void) __attribute__ ((section ("bar")));
16164 puts the function `foobar' in the `bar' section.
16166 Some file formats do not support arbitrary sections so the
16167 `section' attribute is not available on all platforms. If you
16168 need to map the entire contents of a module to a particular
16169 section, consider using the facilities of the linker instead.
16172 This function attribute ensures that a parameter in a function
16173 call is an explicit `NULL'. The attribute is only valid on
16174 variadic functions. By default, the sentinel is located at
16175 position zero, the last parameter of the function call. If an
16176 optional integer position argument P is supplied to the attribute,
16177 the sentinel must be located at position P counting backwards from
16178 the end of the argument list.
16180 __attribute__ ((sentinel))
16182 __attribute__ ((sentinel(0)))
16184 The attribute is automatically set with a position of 0 for the
16185 built-in functions `execl' and `execlp'. The built-in function
16186 `execle' has the attribute set with a position of 1.
16188 A valid `NULL' in this context is defined as zero with any pointer
16189 type. If your system defines the `NULL' macro with an integer type
16190 then you need to add an explicit cast. GCC replaces `stddef.h'
16191 with a copy that redefines NULL appropriately.
16193 The warnings for missing or incorrect sentinels are enabled with
16197 See long_call/short_call.
16200 See longcall/shortcall.
16203 Use this attribute on the AVR to indicate that the specified
16204 function is a signal handler. The compiler will generate function
16205 entry and exit sequences suitable for use in a signal handler when
16206 this attribute is present. Interrupts will be disabled inside the
16210 Use this attribute on the SH to indicate an `interrupt_handler'
16211 function should switch to an alternate stack. It expects a string
16212 argument that names a global variable holding the address of the
16216 void f () __attribute__ ((interrupt_handler,
16217 sp_switch ("alt_stack")));
16220 On the Intel 386, the `stdcall' attribute causes the compiler to
16221 assume that the called function will pop off the stack space used
16222 to pass arguments, unless it takes a variable number of arguments.
16225 Use this attribute on the H8/300H and H8S to indicate that the
16226 specified variable should be placed into the tiny data section.
16227 The compiler will generate more efficient code for loads and stores
16228 on data in the tiny data section. Note the tiny data area is
16229 limited to slightly under 32kbytes of data.
16232 Use this attribute on the SH for an `interrupt_handler' to return
16233 using `trapa' instead of `rte'. This attribute expects an integer
16234 argument specifying the trap number to be used.
16237 This attribute, attached to a function, means that the function is
16238 meant to be possibly unused. GCC will not produce a warning for
16242 This attribute, attached to a function, means that code must be
16243 emitted for the function even if it appears that the function is
16244 not referenced. This is useful, for example, when the function is
16245 referenced only in inline assembly.
16247 `visibility ("VISIBILITY_TYPE")'
16248 This attribute affects the linkage of the declaration to which it
16249 is attached. There are four supported VISIBILITY_TYPE values:
16250 default, hidden, protected or internal visibility.
16252 void __attribute__ ((visibility ("protected")))
16253 f () { /* Do something. */; }
16254 int i __attribute__ ((visibility ("hidden")));
16256 The possible values of VISIBILITY_TYPE correspond to the
16257 visibility settings in the ELF gABI.
16260 Default visibility is the normal case for the object file
16261 format. This value is available for the visibility attribute
16262 to override other options that may change the assumed
16263 visibility of entities.
16265 On ELF, default visibility means that the declaration is
16266 visible to other modules and, in shared libraries, means that
16267 the declared entity may be overridden.
16269 On Darwin, default visibility means that the declaration is
16270 visible to other modules.
16272 Default visibility corresponds to "external linkage" in the
16276 Hidden visibility indicates that the entity declared will
16277 have a new form of linkage, which we'll call "hidden
16278 linkage". Two declarations of an object with hidden linkage
16279 refer to the same object if they are in the same shared
16283 Internal visibility is like hidden visibility, but with
16284 additional processor specific semantics. Unless otherwise
16285 specified by the psABI, GCC defines internal visibility to
16286 mean that a function is _never_ called from another module.
16287 Compare this with hidden functions which, while they cannot
16288 be referenced directly by other modules, can be referenced
16289 indirectly via function pointers. By indicating that a
16290 function cannot be called from outside the module, GCC may
16291 for instance omit the load of a PIC register since it is known
16292 that the calling function loaded the correct value.
16295 Protected visibility is like default visibility except that it
16296 indicates that references within the defining module will
16297 bind to the definition in that module. That is, the declared
16298 entity cannot be overridden by another module.
16301 All visibilities are supported on many, but not all, ELF targets
16302 (supported when the assembler supports the `.visibility'
16303 pseudo-op). Default visibility is supported everywhere. Hidden
16304 visibility is supported on Darwin targets.
16306 The visibility attribute should be applied only to declarations
16307 which would otherwise have external linkage. The attribute should
16308 be applied consistently, so that the same entity should not be
16309 declared with different settings of the attribute.
16311 In C++, the visibility attribute applies to types as well as
16312 functions and objects, because in C++ types have linkage. A class
16313 must not have greater visibility than its non-static data member
16314 types and bases, and class members default to the visibility of
16315 their class. Also, a declaration without explicit visibility is
16316 limited to the visibility of its type.
16318 In C++, you can mark member functions and static member variables
16319 of a class with the visibility attribute. This is useful if if
16320 you know a particular method or static member variable should only
16321 be used from one shared object; then you can mark it hidden while
16322 the rest of the class has default visibility. Care must be taken
16323 to avoid breaking the One Definition Rule; for example, it is
16324 usually not useful to mark an inline method as hidden without
16325 marking the whole class as hidden.
16327 A C++ namespace declaration can also have the visibility attribute.
16328 This attribute applies only to the particular namespace body, not
16329 to other definitions of the same namespace; it is equivalent to
16330 using `#pragma GCC visibility' before and after the namespace
16331 definition (*note Visibility Pragmas::).
16333 In C++, if a template argument has limited visibility, this
16334 restriction is implicitly propagated to the template instantiation.
16335 Otherwise, template instantiations and specializations default to
16336 the visibility of their template.
16338 If both the template and enclosing class have explicit visibility,
16339 the visibility from the template is used.
16341 `warn_unused_result'
16342 The `warn_unused_result' attribute causes a warning to be emitted
16343 if a caller of the function with this attribute does not use its
16344 return value. This is useful for functions where not checking the
16345 result is either a security problem or always a bug, such as
16348 int fn () __attribute__ ((warn_unused_result));
16351 if (fn () < 0) return -1;
16356 results in warning on line 5.
16359 The `weak' attribute causes the declaration to be emitted as a weak
16360 symbol rather than a global. This is primarily useful in defining
16361 library functions which can be overridden in user code, though it
16362 can also be used with non-function declarations. Weak symbols are
16363 supported for ELF targets, and also for a.out targets when using
16364 the GNU assembler and linker.
16367 `weakref ("TARGET")'
16368 The `weakref' attribute marks a declaration as a weak reference.
16369 Without arguments, it should be accompanied by an `alias' attribute
16370 naming the target symbol. Optionally, the TARGET may be given as
16371 an argument to `weakref' itself. In either case, `weakref'
16372 implicitly marks the declaration as `weak'. Without a TARGET,
16373 given as an argument to `weakref' or to `alias', `weakref' is
16374 equivalent to `weak'.
16376 static int x() __attribute__ ((weakref ("y")));
16377 /* is equivalent to... */
16378 static int x() __attribute__ ((weak, weakref, alias ("y")));
16380 static int x() __attribute__ ((weakref));
16381 static int x() __attribute__ ((alias ("y")));
16383 A weak reference is an alias that does not by itself require a
16384 definition to be given for the target symbol. If the target
16385 symbol is only referenced through weak references, then the
16386 becomes a `weak' undefined symbol. If it is directly referenced,
16387 however, then such strong references prevail, and a definition
16388 will be required for the symbol, not necessarily in the same
16391 The effect is equivalent to moving all references to the alias to a
16392 separate translation unit, renaming the alias to the aliased
16393 symbol, declaring it as weak, compiling the two separate
16394 translation units and performing a reloadable link on them.
16396 At present, a declaration to which `weakref' is attached can only
16399 `externally_visible'
16400 This attribute, attached to a global variable or function nullify
16401 effect of `-fwhole-program' command line option, so the object
16402 remain visible outside the current compilation unit
16405 You can specify multiple attributes in a declaration by separating them
16406 by commas within the double parentheses or by immediately following an
16407 attribute declaration with another attribute declaration.
16409 Some people object to the `__attribute__' feature, suggesting that ISO
16410 C's `#pragma' should be used instead. At the time `__attribute__' was
16411 designed, there were two reasons for not doing this.
16413 1. It is impossible to generate `#pragma' commands from a macro.
16415 2. There is no telling what the same `#pragma' might mean in another
16418 These two reasons applied to almost any application that might have
16419 been proposed for `#pragma'. It was basically a mistake to use
16420 `#pragma' for _anything_.
16422 The ISO C99 standard includes `_Pragma', which now allows pragmas to
16423 be generated from macros. In addition, a `#pragma GCC' namespace is
16424 now in use for GCC-specific pragmas. However, it has been found
16425 convenient to use `__attribute__' to achieve a natural attachment of
16426 attributes to their corresponding declarations, whereas `#pragma GCC'
16427 is of use for constructs that do not naturally form part of the
16428 grammar. *Note Miscellaneous Preprocessing Directives: (cpp)Other
16432 File: gcc.info, Node: Attribute Syntax, Next: Function Prototypes, Prev: Function Attributes, Up: C Extensions
16434 5.26 Attribute Syntax
16435 =====================
16437 This section describes the syntax with which `__attribute__' may be
16438 used, and the constructs to which attribute specifiers bind, for the C
16439 language. Some details may vary for C++ and Objective-C. Because of
16440 infelicities in the grammar for attributes, some forms described here
16441 may not be successfully parsed in all cases.
16443 There are some problems with the semantics of attributes in C++. For
16444 example, there are no manglings for attributes, although they may affect
16445 code generation, so problems may arise when attributed types are used in
16446 conjunction with templates or overloading. Similarly, `typeid' does
16447 not distinguish between types with different attributes. Support for
16448 attributes in C++ may be restricted in future to attributes on
16449 declarations only, but not on nested declarators.
16451 *Note Function Attributes::, for details of the semantics of attributes
16452 applying to functions. *Note Variable Attributes::, for details of the
16453 semantics of attributes applying to variables. *Note Type Attributes::,
16454 for details of the semantics of attributes applying to structure, union
16455 and enumerated types.
16457 An "attribute specifier" is of the form `__attribute__
16458 ((ATTRIBUTE-LIST))'. An "attribute list" is a possibly empty
16459 comma-separated sequence of "attributes", where each attribute is one
16462 * Empty. Empty attributes are ignored.
16464 * A word (which may be an identifier such as `unused', or a reserved
16465 word such as `const').
16467 * A word, followed by, in parentheses, parameters for the attribute.
16468 These parameters take one of the following forms:
16470 * An identifier. For example, `mode' attributes use this form.
16472 * An identifier followed by a comma and a non-empty
16473 comma-separated list of expressions. For example, `format'
16474 attributes use this form.
16476 * A possibly empty comma-separated list of expressions. For
16477 example, `format_arg' attributes use this form with the list
16478 being a single integer constant expression, and `alias'
16479 attributes use this form with the list being a single string
16482 An "attribute specifier list" is a sequence of one or more attribute
16483 specifiers, not separated by any other tokens.
16485 In GNU C, an attribute specifier list may appear after the colon
16486 following a label, other than a `case' or `default' label. The only
16487 attribute it makes sense to use after a label is `unused'. This
16488 feature is intended for code generated by programs which contains labels
16489 that may be unused but which is compiled with `-Wall'. It would not
16490 normally be appropriate to use in it human-written code, though it
16491 could be useful in cases where the code that jumps to the label is
16492 contained within an `#ifdef' conditional. GNU C++ does not permit such
16493 placement of attribute lists, as it is permissible for a declaration,
16494 which could begin with an attribute list, to be labelled in C++.
16495 Declarations cannot be labelled in C90 or C99, so the ambiguity does
16498 An attribute specifier list may appear as part of a `struct', `union'
16499 or `enum' specifier. It may go either immediately after the `struct',
16500 `union' or `enum' keyword, or after the closing brace. The former
16501 syntax is preferred. Where attribute specifiers follow the closing
16502 brace, they are considered to relate to the structure, union or
16503 enumerated type defined, not to any enclosing declaration the type
16504 specifier appears in, and the type defined is not complete until after
16505 the attribute specifiers.
16507 Otherwise, an attribute specifier appears as part of a declaration,
16508 counting declarations of unnamed parameters and type names, and relates
16509 to that declaration (which may be nested in another declaration, for
16510 example in the case of a parameter declaration), or to a particular
16511 declarator within a declaration. Where an attribute specifier is
16512 applied to a parameter declared as a function or an array, it should
16513 apply to the function or array rather than the pointer to which the
16514 parameter is implicitly converted, but this is not yet correctly
16517 Any list of specifiers and qualifiers at the start of a declaration may
16518 contain attribute specifiers, whether or not such a list may in that
16519 context contain storage class specifiers. (Some attributes, however,
16520 are essentially in the nature of storage class specifiers, and only make
16521 sense where storage class specifiers may be used; for example,
16522 `section'.) There is one necessary limitation to this syntax: the
16523 first old-style parameter declaration in a function definition cannot
16524 begin with an attribute specifier, because such an attribute applies to
16525 the function instead by syntax described below (which, however, is not
16526 yet implemented in this case). In some other cases, attribute
16527 specifiers are permitted by this grammar but not yet supported by the
16528 compiler. All attribute specifiers in this place relate to the
16529 declaration as a whole. In the obsolescent usage where a type of `int'
16530 is implied by the absence of type specifiers, such a list of specifiers
16531 and qualifiers may be an attribute specifier list with no other
16532 specifiers or qualifiers.
16534 At present, the first parameter in a function prototype must have some
16535 type specifier which is not an attribute specifier; this resolves an
16536 ambiguity in the interpretation of `void f(int (__attribute__((foo))
16537 x))', but is subject to change. At present, if the parentheses of a
16538 function declarator contain only attributes then those attributes are
16539 ignored, rather than yielding an error or warning or implying a single
16540 parameter of type int, but this is subject to change.
16542 An attribute specifier list may appear immediately before a declarator
16543 (other than the first) in a comma-separated list of declarators in a
16544 declaration of more than one identifier using a single list of
16545 specifiers and qualifiers. Such attribute specifiers apply only to the
16546 identifier before whose declarator they appear. For example, in
16548 __attribute__((noreturn)) void d0 (void),
16549 __attribute__((format(printf, 1, 2))) d1 (const char *, ...),
16552 the `noreturn' attribute applies to all the functions declared; the
16553 `format' attribute only applies to `d1'.
16555 An attribute specifier list may appear immediately before the comma,
16556 `=' or semicolon terminating the declaration of an identifier other
16557 than a function definition. At present, such attribute specifiers apply
16558 to the declared object or function, but in future they may attach to the
16559 outermost adjacent declarator. In simple cases there is no difference,
16560 but, for example, in
16562 void (****f)(void) __attribute__((noreturn));
16564 at present the `noreturn' attribute applies to `f', which causes a
16565 warning since `f' is not a function, but in future it may apply to the
16566 function `****f'. The precise semantics of what attributes in such
16567 cases will apply to are not yet specified. Where an assembler name for
16568 an object or function is specified (*note Asm Labels::), at present the
16569 attribute must follow the `asm' specification; in future, attributes
16570 before the `asm' specification may apply to the adjacent declarator,
16571 and those after it to the declared object or function.
16573 An attribute specifier list may, in future, be permitted to appear
16574 after the declarator in a function definition (before any old-style
16575 parameter declarations or the function body).
16577 Attribute specifiers may be mixed with type qualifiers appearing inside
16578 the `[]' of a parameter array declarator, in the C99 construct by which
16579 such qualifiers are applied to the pointer to which the array is
16580 implicitly converted. Such attribute specifiers apply to the pointer,
16581 not to the array, but at present this is not implemented and they are
16584 An attribute specifier list may appear at the start of a nested
16585 declarator. At present, there are some limitations in this usage: the
16586 attributes correctly apply to the declarator, but for most individual
16587 attributes the semantics this implies are not implemented. When
16588 attribute specifiers follow the `*' of a pointer declarator, they may
16589 be mixed with any type qualifiers present. The following describes the
16590 formal semantics of this syntax. It will make the most sense if you
16591 are familiar with the formal specification of declarators in the ISO C
16594 Consider (as in C99 subclause 6.7.5 paragraph 4) a declaration `T D1',
16595 where `T' contains declaration specifiers that specify a type TYPE
16596 (such as `int') and `D1' is a declarator that contains an identifier
16597 IDENT. The type specified for IDENT for derived declarators whose type
16598 does not include an attribute specifier is as in the ISO C standard.
16600 If `D1' has the form `( ATTRIBUTE-SPECIFIER-LIST D )', and the
16601 declaration `T D' specifies the type "DERIVED-DECLARATOR-TYPE-LIST
16602 TYPE" for IDENT, then `T D1' specifies the type
16603 "DERIVED-DECLARATOR-TYPE-LIST ATTRIBUTE-SPECIFIER-LIST TYPE" for IDENT.
16605 If `D1' has the form `* TYPE-QUALIFIER-AND-ATTRIBUTE-SPECIFIER-LIST
16606 D', and the declaration `T D' specifies the type
16607 "DERIVED-DECLARATOR-TYPE-LIST TYPE" for IDENT, then `T D1' specifies
16608 the type "DERIVED-DECLARATOR-TYPE-LIST
16609 TYPE-QUALIFIER-AND-ATTRIBUTE-SPECIFIER-LIST TYPE" for IDENT.
16613 void (__attribute__((noreturn)) ****f) (void);
16615 specifies the type "pointer to pointer to pointer to pointer to
16616 non-returning function returning `void'". As another example,
16618 char *__attribute__((aligned(8))) *f;
16620 specifies the type "pointer to 8-byte-aligned pointer to `char'". Note
16621 again that this does not work with most attributes; for example, the
16622 usage of `aligned' and `noreturn' attributes given above is not yet
16625 For compatibility with existing code written for compiler versions that
16626 did not implement attributes on nested declarators, some laxity is
16627 allowed in the placing of attributes. If an attribute that only applies
16628 to types is applied to a declaration, it will be treated as applying to
16629 the type of that declaration. If an attribute that only applies to
16630 declarations is applied to the type of a declaration, it will be treated
16631 as applying to that declaration; and, for compatibility with code
16632 placing the attributes immediately before the identifier declared, such
16633 an attribute applied to a function return type will be treated as
16634 applying to the function type, and such an attribute applied to an array
16635 element type will be treated as applying to the array type. If an
16636 attribute that only applies to function types is applied to a
16637 pointer-to-function type, it will be treated as applying to the pointer
16638 target type; if such an attribute is applied to a function return type
16639 that is not a pointer-to-function type, it will be treated as applying
16640 to the function type.
16643 File: gcc.info, Node: Function Prototypes, Next: C++ Comments, Prev: Attribute Syntax, Up: C Extensions
16645 5.27 Prototypes and Old-Style Function Definitions
16646 ==================================================
16648 GNU C extends ISO C to allow a function prototype to override a later
16649 old-style non-prototype definition. Consider the following example:
16651 /* Use prototypes unless the compiler is old-fashioned. */
16658 /* Prototype function declaration. */
16659 int isroot P((uid_t));
16661 /* Old-style function definition. */
16663 isroot (x) /* ??? lossage here ??? */
16669 Suppose the type `uid_t' happens to be `short'. ISO C does not allow
16670 this example, because subword arguments in old-style non-prototype
16671 definitions are promoted. Therefore in this example the function
16672 definition's argument is really an `int', which does not match the
16673 prototype argument type of `short'.
16675 This restriction of ISO C makes it hard to write code that is portable
16676 to traditional C compilers, because the programmer does not know
16677 whether the `uid_t' type is `short', `int', or `long'. Therefore, in
16678 cases like these GNU C allows a prototype to override a later old-style
16679 definition. More precisely, in GNU C, a function prototype argument
16680 type overrides the argument type specified by a later old-style
16681 definition if the former type is the same as the latter type before
16682 promotion. Thus in GNU C the above example is equivalent to the
16685 int isroot (uid_t);
16693 GNU C++ does not support old-style function definitions, so this
16694 extension is irrelevant.
16697 File: gcc.info, Node: C++ Comments, Next: Dollar Signs, Prev: Function Prototypes, Up: C Extensions
16699 5.28 C++ Style Comments
16700 =======================
16702 In GNU C, you may use C++ style comments, which start with `//' and
16703 continue until the end of the line. Many other C implementations allow
16704 such comments, and they are included in the 1999 C standard. However,
16705 C++ style comments are not recognized if you specify an `-std' option
16706 specifying a version of ISO C before C99, or `-ansi' (equivalent to
16710 File: gcc.info, Node: Dollar Signs, Next: Character Escapes, Prev: C++ Comments, Up: C Extensions
16712 5.29 Dollar Signs in Identifier Names
16713 =====================================
16715 In GNU C, you may normally use dollar signs in identifier names. This
16716 is because many traditional C implementations allow such identifiers.
16717 However, dollar signs in identifiers are not supported on a few target
16718 machines, typically because the target assembler does not allow them.
16721 File: gcc.info, Node: Character Escapes, Next: Variable Attributes, Prev: Dollar Signs, Up: C Extensions
16723 5.30 The Character <ESC> in Constants
16724 =====================================
16726 You can use the sequence `\e' in a string or character constant to
16727 stand for the ASCII character <ESC>.
16730 File: gcc.info, Node: Alignment, Next: Inline, Prev: Type Attributes, Up: C Extensions
16732 5.31 Inquiring on Alignment of Types or Variables
16733 =================================================
16735 The keyword `__alignof__' allows you to inquire about how an object is
16736 aligned, or the minimum alignment usually required by a type. Its
16737 syntax is just like `sizeof'.
16739 For example, if the target machine requires a `double' value to be
16740 aligned on an 8-byte boundary, then `__alignof__ (double)' is 8. This
16741 is true on many RISC machines. On more traditional machine designs,
16742 `__alignof__ (double)' is 4 or even 2.
16744 Some machines never actually require alignment; they allow reference
16745 to any data type even at an odd address. For these machines,
16746 `__alignof__' reports the _recommended_ alignment of a type.
16748 If the operand of `__alignof__' is an lvalue rather than a type, its
16749 value is the required alignment for its type, taking into account any
16750 minimum alignment specified with GCC's `__attribute__' extension (*note
16751 Variable Attributes::). For example, after this declaration:
16753 struct foo { int x; char y; } foo1;
16755 the value of `__alignof__ (foo1.y)' is 1, even though its actual
16756 alignment is probably 2 or 4, the same as `__alignof__ (int)'.
16758 It is an error to ask for the alignment of an incomplete type.
16761 File: gcc.info, Node: Variable Attributes, Next: Type Attributes, Prev: Character Escapes, Up: C Extensions
16763 5.32 Specifying Attributes of Variables
16764 =======================================
16766 The keyword `__attribute__' allows you to specify special attributes of
16767 variables or structure fields. This keyword is followed by an
16768 attribute specification inside double parentheses. Some attributes are
16769 currently defined generically for variables. Other attributes are
16770 defined for variables on particular target systems. Other attributes
16771 are available for functions (*note Function Attributes::) and for types
16772 (*note Type Attributes::). Other front ends might define more
16773 attributes (*note Extensions to the C++ Language: C++ Extensions.).
16775 You may also specify attributes with `__' preceding and following each
16776 keyword. This allows you to use them in header files without being
16777 concerned about a possible macro of the same name. For example, you
16778 may use `__aligned__' instead of `aligned'.
16780 *Note Attribute Syntax::, for details of the exact syntax for using
16783 `aligned (ALIGNMENT)'
16784 This attribute specifies a minimum alignment for the variable or
16785 structure field, measured in bytes. For example, the declaration:
16787 int x __attribute__ ((aligned (16))) = 0;
16789 causes the compiler to allocate the global variable `x' on a
16790 16-byte boundary. On a 68040, this could be used in conjunction
16791 with an `asm' expression to access the `move16' instruction which
16792 requires 16-byte aligned operands.
16794 You can also specify the alignment of structure fields. For
16795 example, to create a double-word aligned `int' pair, you could
16798 struct foo { int x[2] __attribute__ ((aligned (8))); };
16800 This is an alternative to creating a union with a `double' member
16801 that forces the union to be double-word aligned.
16803 As in the preceding examples, you can explicitly specify the
16804 alignment (in bytes) that you wish the compiler to use for a given
16805 variable or structure field. Alternatively, you can leave out the
16806 alignment factor and just ask the compiler to align a variable or
16807 field to the maximum useful alignment for the target machine you
16808 are compiling for. For example, you could write:
16810 short array[3] __attribute__ ((aligned));
16812 Whenever you leave out the alignment factor in an `aligned'
16813 attribute specification, the compiler automatically sets the
16814 alignment for the declared variable or field to the largest
16815 alignment which is ever used for any data type on the target
16816 machine you are compiling for. Doing this can often make copy
16817 operations more efficient, because the compiler can use whatever
16818 instructions copy the biggest chunks of memory when performing
16819 copies to or from the variables or fields that you have aligned
16822 The `aligned' attribute can only increase the alignment; but you
16823 can decrease it by specifying `packed' as well. See below.
16825 Note that the effectiveness of `aligned' attributes may be limited
16826 by inherent limitations in your linker. On many systems, the
16827 linker is only able to arrange for variables to be aligned up to a
16828 certain maximum alignment. (For some linkers, the maximum
16829 supported alignment may be very very small.) If your linker is
16830 only able to align variables up to a maximum of 8 byte alignment,
16831 then specifying `aligned(16)' in an `__attribute__' will still
16832 only provide you with 8 byte alignment. See your linker
16833 documentation for further information.
16835 `cleanup (CLEANUP_FUNCTION)'
16836 The `cleanup' attribute runs a function when the variable goes out
16837 of scope. This attribute can only be applied to auto function
16838 scope variables; it may not be applied to parameters or variables
16839 with static storage duration. The function must take one
16840 parameter, a pointer to a type compatible with the variable. The
16841 return value of the function (if any) is ignored.
16843 If `-fexceptions' is enabled, then CLEANUP_FUNCTION will be run
16844 during the stack unwinding that happens during the processing of
16845 the exception. Note that the `cleanup' attribute does not allow
16846 the exception to be caught, only to perform an action. It is
16847 undefined what happens if CLEANUP_FUNCTION does not return
16852 The `common' attribute requests GCC to place a variable in
16853 "common" storage. The `nocommon' attribute requests the
16854 opposite--to allocate space for it directly.
16856 These attributes override the default chosen by the `-fno-common'
16857 and `-fcommon' flags respectively.
16860 The `deprecated' attribute results in a warning if the variable is
16861 used anywhere in the source file. This is useful when identifying
16862 variables that are expected to be removed in a future version of a
16863 program. The warning also includes the location of the declaration
16864 of the deprecated variable, to enable users to easily find further
16865 information about why the variable is deprecated, or what they
16866 should do instead. Note that the warning only occurs for uses:
16868 extern int old_var __attribute__ ((deprecated));
16869 extern int old_var;
16870 int new_fn () { return old_var; }
16872 results in a warning on line 3 but not line 2.
16874 The `deprecated' attribute can also be used for functions and
16875 types (*note Function Attributes::, *note Type Attributes::.)
16878 This attribute specifies the data type for the
16879 declaration--whichever type corresponds to the mode MODE. This in
16880 effect lets you request an integer or floating point type
16881 according to its width.
16883 You may also specify a mode of `byte' or `__byte__' to indicate
16884 the mode corresponding to a one-byte integer, `word' or `__word__'
16885 for the mode of a one-word integer, and `pointer' or `__pointer__'
16886 for the mode used to represent pointers.
16889 The `packed' attribute specifies that a variable or structure field
16890 should have the smallest possible alignment--one byte for a
16891 variable, and one bit for a field, unless you specify a larger
16892 value with the `aligned' attribute.
16894 Here is a structure in which the field `x' is packed, so that it
16895 immediately follows `a':
16900 int x[2] __attribute__ ((packed));
16903 `section ("SECTION-NAME")'
16904 Normally, the compiler places the objects it generates in sections
16905 like `data' and `bss'. Sometimes, however, you need additional
16906 sections, or you need certain particular variables to appear in
16907 special sections, for example to map to special hardware. The
16908 `section' attribute specifies that a variable (or function) lives
16909 in a particular section. For example, this small program uses
16910 several specific section names:
16912 struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };
16913 struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };
16914 char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };
16915 int init_data __attribute__ ((section ("INITDATA"))) = 0;
16919 /* Initialize stack pointer */
16920 init_sp (stack + sizeof (stack));
16922 /* Initialize initialized data */
16923 memcpy (&init_data, &data, &edata - &data);
16925 /* Turn on the serial ports */
16930 Use the `section' attribute with an _initialized_ definition of a
16931 _global_ variable, as shown in the example. GCC issues a warning
16932 and otherwise ignores the `section' attribute in uninitialized
16933 variable declarations.
16935 You may only use the `section' attribute with a fully initialized
16936 global definition because of the way linkers work. The linker
16937 requires each object be defined once, with the exception that
16938 uninitialized variables tentatively go in the `common' (or `bss')
16939 section and can be multiply "defined". You can force a variable
16940 to be initialized with the `-fno-common' flag or the `nocommon'
16943 Some file formats do not support arbitrary sections so the
16944 `section' attribute is not available on all platforms. If you
16945 need to map the entire contents of a module to a particular
16946 section, consider using the facilities of the linker instead.
16949 On Microsoft Windows, in addition to putting variable definitions
16950 in a named section, the section can also be shared among all
16951 running copies of an executable or DLL. For example, this small
16952 program defines shared data by putting it in a named section
16953 `shared' and marking the section shareable:
16955 int foo __attribute__((section ("shared"), shared)) = 0;
16960 /* Read and write foo. All running
16961 copies see the same value. */
16965 You may only use the `shared' attribute along with `section'
16966 attribute with a fully initialized global definition because of
16967 the way linkers work. See `section' attribute for more
16970 The `shared' attribute is only available on Microsoft Windows.
16972 `tls_model ("TLS_MODEL")'
16973 The `tls_model' attribute sets thread-local storage model (*note
16974 Thread-Local::) of a particular `__thread' variable, overriding
16975 `-ftls-model=' command line switch on a per-variable basis. The
16976 TLS_MODEL argument should be one of `global-dynamic',
16977 `local-dynamic', `initial-exec' or `local-exec'.
16979 Not all targets support this attribute.
16982 This attribute, attached to a variable, means that the variable is
16983 meant to be possibly unused. GCC will not produce a warning for
16987 This attribute, attached to a variable, means that the variable
16988 must be emitted even if it appears that the variable is not
16991 `vector_size (BYTES)'
16992 This attribute specifies the vector size for the variable,
16993 measured in bytes. For example, the declaration:
16995 int foo __attribute__ ((vector_size (16)));
16997 causes the compiler to set the mode for `foo', to be 16 bytes,
16998 divided into `int' sized units. Assuming a 32-bit int (a vector of
16999 4 units of 4 bytes), the corresponding mode of `foo' will be V4SI.
17001 This attribute is only applicable to integral and float scalars,
17002 although arrays, pointers, and function return values are allowed
17003 in conjunction with this construct.
17005 Aggregates with this attribute are invalid, even if they are of
17006 the same size as a corresponding scalar. For example, the
17009 struct S { int a; };
17010 struct S __attribute__ ((vector_size (16))) foo;
17012 is invalid even if the size of the structure is the same as the
17016 The `selectany' attribute causes an initialized global variable to
17017 have link-once semantics. When multiple definitions of the
17018 variable are encountered by the linker, the first is selected and
17019 the remainder are discarded. Following usage by the Microsoft
17020 compiler, the linker is told _not_ to warn about size or content
17021 differences of the multiple definitions.
17023 Although the primary usage of this attribute is for POD types, the
17024 attribute can also be applied to global C++ objects that are
17025 initialized by a constructor. In this case, the static
17026 initialization and destruction code for the object is emitted in
17027 each translation defining the object, but the calls to the
17028 constructor and destructor are protected by a link-once guard
17031 The `selectany' attribute is only available on Microsoft Windows
17032 targets. You can use `__declspec (selectany)' as a synonym for
17033 `__attribute__ ((selectany))' for compatibility with other
17037 The `weak' attribute is described in *Note Function Attributes::.
17040 The `dllimport' attribute is described in *Note Function
17044 The `dllexport' attribute is described in *Note Function
17048 5.32.1 M32R/D Variable Attributes
17049 ---------------------------------
17051 One attribute is currently defined for the M32R/D.
17053 `model (MODEL-NAME)'
17054 Use this attribute on the M32R/D to set the addressability of an
17055 object. The identifier MODEL-NAME is one of `small', `medium', or
17056 `large', representing each of the code models.
17058 Small model objects live in the lower 16MB of memory (so that their
17059 addresses can be loaded with the `ld24' instruction).
17061 Medium and large model objects may live anywhere in the 32-bit
17062 address space (the compiler will generate `seth/add3' instructions
17063 to load their addresses).
17065 5.32.2 i386 Variable Attributes
17066 -------------------------------
17068 Two attributes are currently defined for i386 configurations:
17069 `ms_struct' and `gcc_struct'
17073 If `packed' is used on a structure, or if bit-fields are used it
17074 may be that the Microsoft ABI packs them differently than GCC
17075 would normally pack them. Particularly when moving packed data
17076 between functions compiled with GCC and the native Microsoft
17077 compiler (either via function call or as data in a file), it may
17078 be necessary to access either format.
17080 Currently `-m[no-]ms-bitfields' is provided for the Microsoft
17081 Windows X86 compilers to match the native Microsoft compiler.
17083 The Microsoft structure layout algorithm is fairly simple with the
17084 exception of the bitfield packing:
17086 The padding and alignment of members of structures and whether a
17087 bit field can straddle a storage-unit boundary
17089 1. Structure members are stored sequentially in the order in
17090 which they are declared: the first member has the lowest
17091 memory address and the last member the highest.
17093 2. Every data object has an alignment-requirement. The
17094 alignment-requirement for all data except structures, unions,
17095 and arrays is either the size of the object or the current
17096 packing size (specified with either the aligned attribute or
17097 the pack pragma), whichever is less. For structures, unions,
17098 and arrays, the alignment-requirement is the largest
17099 alignment-requirement of its members. Every object is
17100 allocated an offset so that:
17102 offset % alignment-requirement == 0
17104 3. Adjacent bit fields are packed into the same 1-, 2-, or
17105 4-byte allocation unit if the integral types are the same
17106 size and if the next bit field fits into the current
17107 allocation unit without crossing the boundary imposed by the
17108 common alignment requirements of the bit fields.
17110 Handling of zero-length bitfields:
17112 MSVC interprets zero-length bitfields in the following ways:
17114 1. If a zero-length bitfield is inserted between two bitfields
17115 that would normally be coalesced, the bitfields will not be
17122 unsigned long bf_1 : 12;
17124 unsigned long bf_2 : 12;
17127 The size of `t1' would be 8 bytes with the zero-length
17128 bitfield. If the zero-length bitfield were removed, `t1''s
17129 size would be 4 bytes.
17131 2. If a zero-length bitfield is inserted after a bitfield,
17132 `foo', and the alignment of the zero-length bitfield is
17133 greater than the member that follows it, `bar', `bar' will be
17134 aligned as the type of the zero-length bitfield.
17152 For `t2', `bar' will be placed at offset 2, rather than
17153 offset 1. Accordingly, the size of `t2' will be 4. For
17154 `t3', the zero-length bitfield will not affect the alignment
17155 of `bar' or, as a result, the size of the structure.
17157 Taking this into account, it is important to note the
17160 1. If a zero-length bitfield follows a normal bitfield, the
17161 type of the zero-length bitfield may affect the
17162 alignment of the structure as whole. For example, `t2'
17163 has a size of 4 bytes, since the zero-length bitfield
17164 follows a normal bitfield, and is of type short.
17166 2. Even if a zero-length bitfield is not followed by a
17167 normal bitfield, it may still affect the alignment of
17176 Here, `t4' will take up 4 bytes.
17178 3. Zero-length bitfields following non-bitfield members are
17188 Here, `t5' will take up 2 bytes.
17190 5.32.3 PowerPC Variable Attributes
17191 ----------------------------------
17193 Three attributes currently are defined for PowerPC configurations:
17194 `altivec', `ms_struct' and `gcc_struct'.
17196 For full documentation of the struct attributes please see the
17197 documentation in the *Note i386 Variable Attributes::, section.
17199 For documentation of `altivec' attribute please see the documentation
17200 in the *Note PowerPC Type Attributes::, section.
17202 5.32.4 Xstormy16 Variable Attributes
17203 ------------------------------------
17205 One attribute is currently defined for xstormy16 configurations:
17209 If a variable has the `below100' attribute (`BELOW100' is allowed
17210 also), GCC will place the variable in the first 0x100 bytes of
17211 memory and use special opcodes to access it. Such variables will
17212 be placed in either the `.bss_below100' section or the
17213 `.data_below100' section.
17217 File: gcc.info, Node: Type Attributes, Next: Alignment, Prev: Variable Attributes, Up: C Extensions
17219 5.33 Specifying Attributes of Types
17220 ===================================
17222 The keyword `__attribute__' allows you to specify special attributes of
17223 `struct' and `union' types when you define such types. This keyword is
17224 followed by an attribute specification inside double parentheses.
17225 Seven attributes are currently defined for types: `aligned', `packed',
17226 `transparent_union', `unused', `deprecated', `visibility', and
17227 `may_alias'. Other attributes are defined for functions (*note
17228 Function Attributes::) and for variables (*note Variable Attributes::).
17230 You may also specify any one of these attributes with `__' preceding
17231 and following its keyword. This allows you to use these attributes in
17232 header files without being concerned about a possible macro of the same
17233 name. For example, you may use `__aligned__' instead of `aligned'.
17235 You may specify type attributes either in a `typedef' declaration or
17236 in an enum, struct or union type declaration or definition.
17238 For an enum, struct or union type, you may specify attributes either
17239 between the enum, struct or union tag and the name of the type, or just
17240 past the closing curly brace of the _definition_. The former syntax is
17243 *Note Attribute Syntax::, for details of the exact syntax for using
17246 `aligned (ALIGNMENT)'
17247 This attribute specifies a minimum alignment (in bytes) for
17248 variables of the specified type. For example, the declarations:
17250 struct S { short f[3]; } __attribute__ ((aligned (8)));
17251 typedef int more_aligned_int __attribute__ ((aligned (8)));
17253 force the compiler to insure (as far as it can) that each variable
17254 whose type is `struct S' or `more_aligned_int' will be allocated
17255 and aligned _at least_ on a 8-byte boundary. On a SPARC, having
17256 all variables of type `struct S' aligned to 8-byte boundaries
17257 allows the compiler to use the `ldd' and `std' (doubleword load and
17258 store) instructions when copying one variable of type `struct S' to
17259 another, thus improving run-time efficiency.
17261 Note that the alignment of any given `struct' or `union' type is
17262 required by the ISO C standard to be at least a perfect multiple of
17263 the lowest common multiple of the alignments of all of the members
17264 of the `struct' or `union' in question. This means that you _can_
17265 effectively adjust the alignment of a `struct' or `union' type by
17266 attaching an `aligned' attribute to any one of the members of such
17267 a type, but the notation illustrated in the example above is a
17268 more obvious, intuitive, and readable way to request the compiler
17269 to adjust the alignment of an entire `struct' or `union' type.
17271 As in the preceding example, you can explicitly specify the
17272 alignment (in bytes) that you wish the compiler to use for a given
17273 `struct' or `union' type. Alternatively, you can leave out the
17274 alignment factor and just ask the compiler to align a type to the
17275 maximum useful alignment for the target machine you are compiling
17276 for. For example, you could write:
17278 struct S { short f[3]; } __attribute__ ((aligned));
17280 Whenever you leave out the alignment factor in an `aligned'
17281 attribute specification, the compiler automatically sets the
17282 alignment for the type to the largest alignment which is ever used
17283 for any data type on the target machine you are compiling for.
17284 Doing this can often make copy operations more efficient, because
17285 the compiler can use whatever instructions copy the biggest chunks
17286 of memory when performing copies to or from the variables which
17287 have types that you have aligned this way.
17289 In the example above, if the size of each `short' is 2 bytes, then
17290 the size of the entire `struct S' type is 6 bytes. The smallest
17291 power of two which is greater than or equal to that is 8, so the
17292 compiler sets the alignment for the entire `struct S' type to 8
17295 Note that although you can ask the compiler to select a
17296 time-efficient alignment for a given type and then declare only
17297 individual stand-alone objects of that type, the compiler's
17298 ability to select a time-efficient alignment is primarily useful
17299 only when you plan to create arrays of variables having the
17300 relevant (efficiently aligned) type. If you declare or use arrays
17301 of variables of an efficiently-aligned type, then it is likely
17302 that your program will also be doing pointer arithmetic (or
17303 subscripting, which amounts to the same thing) on pointers to the
17304 relevant type, and the code that the compiler generates for these
17305 pointer arithmetic operations will often be more efficient for
17306 efficiently-aligned types than for other types.
17308 The `aligned' attribute can only increase the alignment; but you
17309 can decrease it by specifying `packed' as well. See below.
17311 Note that the effectiveness of `aligned' attributes may be limited
17312 by inherent limitations in your linker. On many systems, the
17313 linker is only able to arrange for variables to be aligned up to a
17314 certain maximum alignment. (For some linkers, the maximum
17315 supported alignment may be very very small.) If your linker is
17316 only able to align variables up to a maximum of 8 byte alignment,
17317 then specifying `aligned(16)' in an `__attribute__' will still
17318 only provide you with 8 byte alignment. See your linker
17319 documentation for further information.
17322 This attribute, attached to `struct' or `union' type definition,
17323 specifies that each member (other than zero-width bitfields) of
17324 the structure or union is placed to minimize the memory required.
17325 When attached to an `enum' definition, it indicates that the
17326 smallest integral type should be used.
17328 Specifying this attribute for `struct' and `union' types is
17329 equivalent to specifying the `packed' attribute on each of the
17330 structure or union members. Specifying the `-fshort-enums' flag
17331 on the line is equivalent to specifying the `packed' attribute on
17332 all `enum' definitions.
17334 In the following example `struct my_packed_struct''s members are
17335 packed closely together, but the internal layout of its `s' member
17336 is not packed--to do that, `struct my_unpacked_struct' would need
17339 struct my_unpacked_struct
17345 struct __attribute__ ((__packed__)) my_packed_struct
17349 struct my_unpacked_struct s;
17352 You may only specify this attribute on the definition of a `enum',
17353 `struct' or `union', not on a `typedef' which does not also define
17354 the enumerated type, structure or union.
17356 `transparent_union'
17357 This attribute, attached to a `union' type definition, indicates
17358 that any function parameter having that union type causes calls to
17359 that function to be treated in a special way.
17361 First, the argument corresponding to a transparent union type can
17362 be of any type in the union; no cast is required. Also, if the
17363 union contains a pointer type, the corresponding argument can be a
17364 null pointer constant or a void pointer expression; and if the
17365 union contains a void pointer type, the corresponding argument can
17366 be any pointer expression. If the union member type is a pointer,
17367 qualifiers like `const' on the referenced type must be respected,
17368 just as with normal pointer conversions.
17370 Second, the argument is passed to the function using the calling
17371 conventions of the first member of the transparent union, not the
17372 calling conventions of the union itself. All members of the union
17373 must have the same machine representation; this is necessary for
17374 this argument passing to work properly.
17376 Transparent unions are designed for library functions that have
17377 multiple interfaces for compatibility reasons. For example,
17378 suppose the `wait' function must accept either a value of type
17379 `int *' to comply with Posix, or a value of type `union wait *' to
17380 comply with the 4.1BSD interface. If `wait''s parameter were
17381 `void *', `wait' would accept both kinds of arguments, but it
17382 would also accept any other pointer type and this would make
17383 argument type checking less useful. Instead, `<sys/wait.h>' might
17384 define the interface as follows:
17390 } wait_status_ptr_t __attribute__ ((__transparent_union__));
17392 pid_t wait (wait_status_ptr_t);
17394 This interface allows either `int *' or `union wait *' arguments
17395 to be passed, using the `int *' calling convention. The program
17396 can call `wait' with arguments of either type:
17398 int w1 () { int w; return wait (&w); }
17399 int w2 () { union wait w; return wait (&w); }
17401 With this interface, `wait''s implementation might look like this:
17403 pid_t wait (wait_status_ptr_t p)
17405 return waitpid (-1, p.__ip, 0);
17409 When attached to a type (including a `union' or a `struct'), this
17410 attribute means that variables of that type are meant to appear
17411 possibly unused. GCC will not produce a warning for any variables
17412 of that type, even if the variable appears to do nothing. This is
17413 often the case with lock or thread classes, which are usually
17414 defined and then not referenced, but contain constructors and
17415 destructors that have nontrivial bookkeeping functions.
17418 The `deprecated' attribute results in a warning if the type is
17419 used anywhere in the source file. This is useful when identifying
17420 types that are expected to be removed in a future version of a
17421 program. If possible, the warning also includes the location of
17422 the declaration of the deprecated type, to enable users to easily
17423 find further information about why the type is deprecated, or what
17424 they should do instead. Note that the warnings only occur for
17425 uses and then only if the type is being applied to an identifier
17426 that itself is not being declared as deprecated.
17428 typedef int T1 __attribute__ ((deprecated));
17432 typedef T1 T3 __attribute__ ((deprecated));
17433 T3 z __attribute__ ((deprecated));
17435 results in a warning on line 2 and 3 but not lines 4, 5, or 6. No
17436 warning is issued for line 4 because T2 is not explicitly
17437 deprecated. Line 5 has no warning because T3 is explicitly
17438 deprecated. Similarly for line 6.
17440 The `deprecated' attribute can also be used for functions and
17441 variables (*note Function Attributes::, *note Variable
17445 Accesses to objects with types with this attribute are not
17446 subjected to type-based alias analysis, but are instead assumed to
17447 be able to alias any other type of objects, just like the `char'
17448 type. See `-fstrict-aliasing' for more information on aliasing
17453 typedef short __attribute__((__may_alias__)) short_a;
17458 int a = 0x12345678;
17459 short_a *b = (short_a *) &a;
17463 if (a == 0x12345678)
17469 If you replaced `short_a' with `short' in the variable
17470 declaration, the above program would abort when compiled with
17471 `-fstrict-aliasing', which is on by default at `-O2' or above in
17472 recent GCC versions.
17475 In C++, attribute visibility (*note Function Attributes::) can
17476 also be applied to class, struct, union and enum types. Unlike
17477 other type attributes, the attribute must appear between the
17478 initial keyword and the name of the type; it cannot appear after
17479 the body of the type.
17481 Note that the type visibility is applied to vague linkage entities
17482 associated with the class (vtable, typeinfo node, etc.). In
17483 particular, if a class is thrown as an exception in one shared
17484 object and caught in another, the class must have default
17485 visibility. Otherwise the two shared objects will be unable to
17486 use the same typeinfo node and exception handling will break.
17488 5.33.1 ARM Type Attributes
17489 --------------------------
17491 On those ARM targets that support `dllimport' (such as Symbian
17492 OS), you can use the `notshared' attribute to indicate that the virtual
17493 table and other similar data for a class should not be exported from a
17496 class __declspec(notshared) C {
17498 __declspec(dllimport) C();
17502 __declspec(dllexport)
17505 In this code, `C::C' is exported from the current DLL, but the
17506 virtual table for `C' is not exported. (You can use `__attribute__'
17507 instead of `__declspec' if you prefer, but most Symbian OS code uses
17510 5.33.2 i386 Type Attributes
17511 ---------------------------
17513 Two attributes are currently defined for i386 configurations:
17514 `ms_struct' and `gcc_struct'
17518 If `packed' is used on a structure, or if bit-fields are used it
17519 may be that the Microsoft ABI packs them differently than GCC
17520 would normally pack them. Particularly when moving packed data
17521 between functions compiled with GCC and the native Microsoft
17522 compiler (either via function call or as data in a file), it may
17523 be necessary to access either format.
17525 Currently `-m[no-]ms-bitfields' is provided for the Microsoft
17526 Windows X86 compilers to match the native Microsoft compiler.
17528 To specify multiple attributes, separate them by commas within the
17529 double parentheses: for example, `__attribute__ ((aligned (16),
17532 5.33.3 PowerPC Type Attributes
17533 ------------------------------
17535 Three attributes currently are defined for PowerPC configurations:
17536 `altivec', `ms_struct' and `gcc_struct'.
17538 For full documentation of the struct attributes please see the
17539 documentation in the *Note i386 Type Attributes::, section.
17541 The `altivec' attribute allows one to declare AltiVec vector data
17542 types supported by the AltiVec Programming Interface Manual. The
17543 attribute requires an argument to specify one of three vector types:
17544 `vector__', `pixel__' (always followed by unsigned short), and `bool__'
17545 (always followed by unsigned).
17547 __attribute__((altivec(vector__)))
17548 __attribute__((altivec(pixel__))) unsigned short
17549 __attribute__((altivec(bool__))) unsigned
17551 These attributes mainly are intended to support the `__vector',
17552 `__pixel', and `__bool' AltiVec keywords.
17555 File: gcc.info, Node: Inline, Next: Extended Asm, Prev: Alignment, Up: C Extensions
17557 5.34 An Inline Function is As Fast As a Macro
17558 =============================================
17560 By declaring a function `inline', you can direct GCC to integrate that
17561 function's code into the code for its callers. This makes execution
17562 faster by eliminating the function-call overhead; in addition, if any
17563 of the actual argument values are constant, their known values may
17564 permit simplifications at compile time so that not all of the inline
17565 function's code needs to be included. The effect on code size is less
17566 predictable; object code may be larger or smaller with function
17567 inlining, depending on the particular case. Inlining of functions is an
17568 optimization and it really "works" only in optimizing compilation. If
17569 you don't use `-O', no function is really inline.
17571 Inline functions are included in the ISO C99 standard, but there are
17572 currently substantial differences between what GCC implements and what
17573 the ISO C99 standard requires. GCC will fully support C99 inline
17574 functions in version 4.3. The traditional GCC handling of inline
17575 functions will still be available with `-std=gnu89', `-fgnu89-inline'
17576 or when `gnu_inline' attribute is present on all inline declarations.
17577 The preprocessor macros `__GNUC_GNU_INLINE__' and
17578 `__GNUC_STDC_INLINE__' may be used to determine the handling of
17579 `inline' during a particular compilation (*note Common Predefined
17580 Macros: (cpp)Common Predefined Macros.).
17582 To declare a function inline, use the `inline' keyword in its
17583 declaration, like this:
17591 (If you are writing a header file to be included in ISO C programs,
17592 write `__inline__' instead of `inline'. *Note Alternate Keywords::.)
17593 You can also make all "simple enough" functions inline with the option
17594 `-finline-functions'.
17596 Note that certain usages in a function definition can make it
17597 unsuitable for inline substitution. Among these usages are: use of
17598 varargs, use of alloca, use of variable sized data types (*note
17599 Variable Length::), use of computed goto (*note Labels as Values::),
17600 use of nonlocal goto, and nested functions (*note Nested Functions::).
17601 Using `-Winline' will warn when a function marked `inline' could not be
17602 substituted, and will give the reason for the failure.
17604 Note that in C and Objective-C, unlike C++, the `inline' keyword does
17605 not affect the linkage of the function.
17607 GCC automatically inlines member functions defined within the class
17608 body of C++ programs even if they are not explicitly declared `inline'.
17609 (You can override this with `-fno-default-inline'; *note Options
17610 Controlling C++ Dialect: C++ Dialect Options.)
17612 When a function is both inline and `static', if all calls to the
17613 function are integrated into the caller, and the function's address is
17614 never used, then the function's own assembler code is never referenced.
17615 In this case, GCC does not actually output assembler code for the
17616 function, unless you specify the option `-fkeep-inline-functions'.
17617 Some calls cannot be integrated for various reasons (in particular,
17618 calls that precede the function's definition cannot be integrated, and
17619 neither can recursive calls within the definition). If there is a
17620 nonintegrated call, then the function is compiled to assembler code as
17621 usual. The function must also be compiled as usual if the program
17622 refers to its address, because that can't be inlined.
17624 When an inline function is not `static', then the compiler must assume
17625 that there may be calls from other source files; since a global symbol
17626 can be defined only once in any program, the function must not be
17627 defined in the other source files, so the calls therein cannot be
17628 integrated. Therefore, a non-`static' inline function is always
17629 compiled on its own in the usual fashion.
17631 If you specify both `inline' and `extern' in the function definition,
17632 then the definition is used only for inlining. In no case is the
17633 function compiled on its own, not even if you refer to its address
17634 explicitly. Such an address becomes an external reference, as if you
17635 had only declared the function, and had not defined it.
17637 This combination of `inline' and `extern' has almost the effect of a
17638 macro. The way to use it is to put a function definition in a header
17639 file with these keywords, and put another copy of the definition
17640 (lacking `inline' and `extern') in a library file. The definition in
17641 the header file will cause most calls to the function to be inlined.
17642 If any uses of the function remain, they will refer to the single copy
17645 Since GCC 4.3 will implement ISO C99 semantics for inline functions,
17646 it is simplest to use `static inline' only to guarantee compatibility.
17647 (The existing semantics will remain available when `-std=gnu89' is
17648 specified, but eventually the default will be `-std=gnu99'; that will
17649 implement the C99 semantics, though it does not do so in versions of
17650 GCC before 4.3. After the default changes, the existing semantics will
17651 still be available via the `-fgnu89-inline' option or the `gnu_inline'
17652 function attribute.)
17654 GCC does not inline any functions when not optimizing unless you
17655 specify the `always_inline' attribute for the function, like this:
17658 inline void foo (const char) __attribute__((always_inline));
17661 File: gcc.info, Node: Extended Asm, Next: Constraints, Prev: Inline, Up: C Extensions
17663 5.35 Assembler Instructions with C Expression Operands
17664 ======================================================
17666 In an assembler instruction using `asm', you can specify the operands
17667 of the instruction using C expressions. This means you need not guess
17668 which registers or memory locations will contain the data you want to
17671 You must specify an assembler instruction template much like what
17672 appears in a machine description, plus an operand constraint string for
17675 For example, here is how to use the 68881's `fsinx' instruction:
17677 asm ("fsinx %1,%0" : "=f" (result) : "f" (angle));
17679 Here `angle' is the C expression for the input operand while `result'
17680 is that of the output operand. Each has `"f"' as its operand
17681 constraint, saying that a floating point register is required. The `='
17682 in `=f' indicates that the operand is an output; all output operands'
17683 constraints must use `='. The constraints use the same language used
17684 in the machine description (*note Constraints::).
17686 Each operand is described by an operand-constraint string followed by
17687 the C expression in parentheses. A colon separates the assembler
17688 template from the first output operand and another separates the last
17689 output operand from the first input, if any. Commas separate the
17690 operands within each group. The total number of operands is currently
17691 limited to 30; this limitation may be lifted in some future version of
17694 If there are no output operands but there are input operands, you must
17695 place two consecutive colons surrounding the place where the output
17698 As of GCC version 3.1, it is also possible to specify input and output
17699 operands using symbolic names which can be referenced within the
17700 assembler code. These names are specified inside square brackets
17701 preceding the constraint string, and can be referenced inside the
17702 assembler code using `%[NAME]' instead of a percentage sign followed by
17703 the operand number. Using named operands the above example could look
17706 asm ("fsinx %[angle],%[output]"
17707 : [output] "=f" (result)
17708 : [angle] "f" (angle));
17710 Note that the symbolic operand names have no relation whatsoever to
17711 other C identifiers. You may use any name you like, even those of
17712 existing C symbols, but you must ensure that no two operands within the
17713 same assembler construct use the same symbolic name.
17715 Output operand expressions must be lvalues; the compiler can check
17716 this. The input operands need not be lvalues. The compiler cannot
17717 check whether the operands have data types that are reasonable for the
17718 instruction being executed. It does not parse the assembler instruction
17719 template and does not know what it means or even whether it is valid
17720 assembler input. The extended `asm' feature is most often used for
17721 machine instructions the compiler itself does not know exist. If the
17722 output expression cannot be directly addressed (for example, it is a
17723 bit-field), your constraint must allow a register. In that case, GCC
17724 will use the register as the output of the `asm', and then store that
17725 register into the output.
17727 The ordinary output operands must be write-only; GCC will assume that
17728 the values in these operands before the instruction are dead and need
17729 not be generated. Extended asm supports input-output or read-write
17730 operands. Use the constraint character `+' to indicate such an operand
17731 and list it with the output operands. You should only use read-write
17732 operands when the constraints for the operand (or the operand in which
17733 only some of the bits are to be changed) allow a register.
17735 You may, as an alternative, logically split its function into two
17736 separate operands, one input operand and one write-only output operand.
17737 The connection between them is expressed by constraints which say they
17738 need to be in the same location when the instruction executes. You can
17739 use the same C expression for both operands, or different expressions.
17740 For example, here we write the (fictitious) `combine' instruction with
17741 `bar' as its read-only source operand and `foo' as its read-write
17744 asm ("combine %2,%0" : "=r" (foo) : "0" (foo), "g" (bar));
17746 The constraint `"0"' for operand 1 says that it must occupy the same
17747 location as operand 0. A number in constraint is allowed only in an
17748 input operand and it must refer to an output operand.
17750 Only a number in the constraint can guarantee that one operand will be
17751 in the same place as another. The mere fact that `foo' is the value of
17752 both operands is not enough to guarantee that they will be in the same
17753 place in the generated assembler code. The following would not work
17756 asm ("combine %2,%0" : "=r" (foo) : "r" (foo), "g" (bar));
17758 Various optimizations or reloading could cause operands 0 and 1 to be
17759 in different registers; GCC knows no reason not to do so. For example,
17760 the compiler might find a copy of the value of `foo' in one register and
17761 use it for operand 1, but generate the output operand 0 in a different
17762 register (copying it afterward to `foo''s own address). Of course,
17763 since the register for operand 1 is not even mentioned in the assembler
17764 code, the result will not work, but GCC can't tell that.
17766 As of GCC version 3.1, one may write `[NAME]' instead of the operand
17767 number for a matching constraint. For example:
17769 asm ("cmoveq %1,%2,%[result]"
17770 : [result] "=r"(result)
17771 : "r" (test), "r"(new), "[result]"(old));
17773 Sometimes you need to make an `asm' operand be a specific register,
17774 but there's no matching constraint letter for that register _by
17775 itself_. To force the operand into that register, use a local variable
17776 for the operand and specify the register in the variable declaration.
17777 *Note Explicit Reg Vars::. Then for the `asm' operand, use any
17778 register constraint letter that matches the register:
17780 register int *p1 asm ("r0") = ...;
17781 register int *p2 asm ("r1") = ...;
17782 register int *result asm ("r0");
17783 asm ("sysint" : "=r" (result) : "0" (p1), "r" (p2));
17785 In the above example, beware that a register that is call-clobbered by
17786 the target ABI will be overwritten by any function call in the
17787 assignment, including library calls for arithmetic operators. Assuming
17788 it is a call-clobbered register, this may happen to `r0' above by the
17789 assignment to `p2'. If you have to use such a register, use temporary
17790 variables for expressions between the register assignment and use:
17793 register int *p1 asm ("r0") = ...;
17794 register int *p2 asm ("r1") = t1;
17795 register int *result asm ("r0");
17796 asm ("sysint" : "=r" (result) : "0" (p1), "r" (p2));
17798 Some instructions clobber specific hard registers. To describe this,
17799 write a third colon after the input operands, followed by the names of
17800 the clobbered hard registers (given as strings). Here is a realistic
17801 example for the VAX:
17803 asm volatile ("movc3 %0,%1,%2"
17805 : "g" (from), "g" (to), "g" (count)
17806 : "r0", "r1", "r2", "r3", "r4", "r5");
17808 You may not write a clobber description in a way that overlaps with an
17809 input or output operand. For example, you may not have an operand
17810 describing a register class with one member if you mention that register
17811 in the clobber list. Variables declared to live in specific registers
17812 (*note Explicit Reg Vars::), and used as asm input or output operands
17813 must have no part mentioned in the clobber description. There is no
17814 way for you to specify that an input operand is modified without also
17815 specifying it as an output operand. Note that if all the output
17816 operands you specify are for this purpose (and hence unused), you will
17817 then also need to specify `volatile' for the `asm' construct, as
17818 described below, to prevent GCC from deleting the `asm' statement as
17821 If you refer to a particular hardware register from the assembler code,
17822 you will probably have to list the register after the third colon to
17823 tell the compiler the register's value is modified. In some assemblers,
17824 the register names begin with `%'; to produce one `%' in the assembler
17825 code, you must write `%%' in the input.
17827 If your assembler instruction can alter the condition code register,
17828 add `cc' to the list of clobbered registers. GCC on some machines
17829 represents the condition codes as a specific hardware register; `cc'
17830 serves to name this register. On other machines, the condition code is
17831 handled differently, and specifying `cc' has no effect. But it is
17832 valid no matter what the machine.
17834 If your assembler instructions access memory in an unpredictable
17835 fashion, add `memory' to the list of clobbered registers. This will
17836 cause GCC to not keep memory values cached in registers across the
17837 assembler instruction and not optimize stores or loads to that memory.
17838 You will also want to add the `volatile' keyword if the memory affected
17839 is not listed in the inputs or outputs of the `asm', as the `memory'
17840 clobber does not count as a side-effect of the `asm'. If you know how
17841 large the accessed memory is, you can add it as input or output but if
17842 this is not known, you should add `memory'. As an example, if you
17843 access ten bytes of a string, you can use a memory input like:
17845 {"m"( ({ struct { char x[10]; } *p = (void *)ptr ; *p; }) )}.
17847 Note that in the following example the memory input is necessary,
17848 otherwise GCC might optimize the store to `x' away:
17854 asm ("magic stuff accessing an 'int' pointed to by '%1'"
17855 "=&d" (r) : "a" (y), "m" (*y));
17859 You can put multiple assembler instructions together in a single `asm'
17860 template, separated by the characters normally used in assembly code
17861 for the system. A combination that works in most places is a newline
17862 to break the line, plus a tab character to move to the instruction field
17863 (written as `\n\t'). Sometimes semicolons can be used, if the
17864 assembler allows semicolons as a line-breaking character. Note that
17865 some assembler dialects use semicolons to start a comment. The input
17866 operands are guaranteed not to use any of the clobbered registers, and
17867 neither will the output operands' addresses, so you can read and write
17868 the clobbered registers as many times as you like. Here is an example
17869 of multiple instructions in a template; it assumes the subroutine
17870 `_foo' accepts arguments in registers 9 and 10:
17872 asm ("movl %0,r9\n\tmovl %1,r10\n\tcall _foo"
17874 : "g" (from), "g" (to)
17877 Unless an output operand has the `&' constraint modifier, GCC may
17878 allocate it in the same register as an unrelated input operand, on the
17879 assumption the inputs are consumed before the outputs are produced.
17880 This assumption may be false if the assembler code actually consists of
17881 more than one instruction. In such a case, use `&' for each output
17882 operand that may not overlap an input. *Note Modifiers::.
17884 If you want to test the condition code produced by an assembler
17885 instruction, you must include a branch and a label in the `asm'
17886 construct, as follows:
17888 asm ("clr %0\n\tfrob %1\n\tbeq 0f\n\tmov #1,%0\n0:"
17892 This assumes your assembler supports local labels, as the GNU assembler
17893 and most Unix assemblers do.
17895 Speaking of labels, jumps from one `asm' to another are not supported.
17896 The compiler's optimizers do not know about these jumps, and therefore
17897 they cannot take account of them when deciding how to optimize.
17899 Usually the most convenient way to use these `asm' instructions is to
17900 encapsulate them in macros that look like functions. For example,
17903 ({ double __value, __arg = (x); \
17904 asm ("fsinx %1,%0": "=f" (__value): "f" (__arg)); \
17907 Here the variable `__arg' is used to make sure that the instruction
17908 operates on a proper `double' value, and to accept only those arguments
17909 `x' which can convert automatically to a `double'.
17911 Another way to make sure the instruction operates on the correct data
17912 type is to use a cast in the `asm'. This is different from using a
17913 variable `__arg' in that it converts more different types. For
17914 example, if the desired type were `int', casting the argument to `int'
17915 would accept a pointer with no complaint, while assigning the argument
17916 to an `int' variable named `__arg' would warn about using a pointer
17917 unless the caller explicitly casts it.
17919 If an `asm' has output operands, GCC assumes for optimization purposes
17920 the instruction has no side effects except to change the output
17921 operands. This does not mean instructions with a side effect cannot be
17922 used, but you must be careful, because the compiler may eliminate them
17923 if the output operands aren't used, or move them out of loops, or
17924 replace two with one if they constitute a common subexpression. Also,
17925 if your instruction does have a side effect on a variable that otherwise
17926 appears not to change, the old value of the variable may be reused later
17927 if it happens to be found in a register.
17929 You can prevent an `asm' instruction from being deleted by writing the
17930 keyword `volatile' after the `asm'. For example:
17932 #define get_and_set_priority(new) \
17934 asm volatile ("get_and_set_priority %0, %1" \
17935 : "=g" (__old) : "g" (new)); \
17938 The `volatile' keyword indicates that the instruction has important
17939 side-effects. GCC will not delete a volatile `asm' if it is reachable.
17940 (The instruction can still be deleted if GCC can prove that
17941 control-flow will never reach the location of the instruction.) Note
17942 that even a volatile `asm' instruction can be moved relative to other
17943 code, including across jump instructions. For example, on many targets
17944 there is a system register which can be set to control the rounding
17945 mode of floating point operations. You might try setting it with a
17946 volatile `asm', like this PowerPC example:
17948 asm volatile("mtfsf 255,%0" : : "f" (fpenv));
17951 This will not work reliably, as the compiler may move the addition back
17952 before the volatile `asm'. To make it work you need to add an
17953 artificial dependency to the `asm' referencing a variable in the code
17954 you don't want moved, for example:
17956 asm volatile ("mtfsf 255,%1" : "=X"(sum): "f"(fpenv));
17959 Similarly, you can't expect a sequence of volatile `asm' instructions
17960 to remain perfectly consecutive. If you want consecutive output, use a
17961 single `asm'. Also, GCC will perform some optimizations across a
17962 volatile `asm' instruction; GCC does not "forget everything" when it
17963 encounters a volatile `asm' instruction the way some other compilers do.
17965 An `asm' instruction without any output operands will be treated
17966 identically to a volatile `asm' instruction.
17968 It is a natural idea to look for a way to give access to the condition
17969 code left by the assembler instruction. However, when we attempted to
17970 implement this, we found no way to make it work reliably. The problem
17971 is that output operands might need reloading, which would result in
17972 additional following "store" instructions. On most machines, these
17973 instructions would alter the condition code before there was time to
17974 test it. This problem doesn't arise for ordinary "test" and "compare"
17975 instructions because they don't have any output operands.
17977 For reasons similar to those described above, it is not possible to
17978 give an assembler instruction access to the condition code left by
17979 previous instructions.
17981 If you are writing a header file that should be includable in ISO C
17982 programs, write `__asm__' instead of `asm'. *Note Alternate Keywords::.
17984 5.35.1 Size of an `asm'
17985 -----------------------
17987 Some targets require that GCC track the size of each instruction used in
17988 order to generate correct code. Because the final length of an `asm'
17989 is only known by the assembler, GCC must make an estimate as to how big
17990 it will be. The estimate is formed by counting the number of
17991 statements in the pattern of the `asm' and multiplying that by the
17992 length of the longest instruction on that processor. Statements in the
17993 `asm' are identified by newline characters and whatever statement
17994 separator characters are supported by the assembler; on most processors
17995 this is the ``;'' character.
17997 Normally, GCC's estimate is perfectly adequate to ensure that correct
17998 code is generated, but it is possible to confuse the compiler if you use
17999 pseudo instructions or assembler macros that expand into multiple real
18000 instructions or if you use assembler directives that expand to more
18001 space in the object file than would be needed for a single instruction.
18002 If this happens then the assembler will produce a diagnostic saying that
18003 a label is unreachable.
18005 5.35.2 i386 floating point asm operands
18006 ---------------------------------------
18008 There are several rules on the usage of stack-like regs in asm_operands
18009 insns. These rules apply only to the operands that are stack-like regs:
18011 1. Given a set of input regs that die in an asm_operands, it is
18012 necessary to know which are implicitly popped by the asm, and
18013 which must be explicitly popped by gcc.
18015 An input reg that is implicitly popped by the asm must be
18016 explicitly clobbered, unless it is constrained to match an output
18019 2. For any input reg that is implicitly popped by an asm, it is
18020 necessary to know how to adjust the stack to compensate for the
18021 pop. If any non-popped input is closer to the top of the
18022 reg-stack than the implicitly popped reg, it would not be possible
18023 to know what the stack looked like--it's not clear how the rest of
18024 the stack "slides up".
18026 All implicitly popped input regs must be closer to the top of the
18027 reg-stack than any input that is not implicitly popped.
18029 It is possible that if an input dies in an insn, reload might use
18030 the input reg for an output reload. Consider this example:
18032 asm ("foo" : "=t" (a) : "f" (b));
18034 This asm says that input B is not popped by the asm, and that the
18035 asm pushes a result onto the reg-stack, i.e., the stack is one
18036 deeper after the asm than it was before. But, it is possible that
18037 reload will think that it can use the same reg for both the input
18038 and the output, if input B dies in this insn.
18040 If any input operand uses the `f' constraint, all output reg
18041 constraints must use the `&' earlyclobber.
18043 The asm above would be written as
18045 asm ("foo" : "=&t" (a) : "f" (b));
18047 3. Some operands need to be in particular places on the stack. All
18048 output operands fall in this category--there is no other way to
18049 know which regs the outputs appear in unless the user indicates
18050 this in the constraints.
18052 Output operands must specifically indicate which reg an output
18053 appears in after an asm. `=f' is not allowed: the operand
18054 constraints must select a class with a single reg.
18056 4. Output operands may not be "inserted" between existing stack regs.
18057 Since no 387 opcode uses a read/write operand, all output operands
18058 are dead before the asm_operands, and are pushed by the
18059 asm_operands. It makes no sense to push anywhere but the top of
18062 Output operands must start at the top of the reg-stack: output
18063 operands may not "skip" a reg.
18065 5. Some asm statements may need extra stack space for internal
18066 calculations. This can be guaranteed by clobbering stack registers
18067 unrelated to the inputs and outputs.
18070 Here are a couple of reasonable asms to want to write. This asm takes
18071 one input, which is internally popped, and produces two outputs.
18073 asm ("fsincos" : "=t" (cos), "=u" (sin) : "0" (inp));
18075 This asm takes two inputs, which are popped by the `fyl2xp1' opcode,
18076 and replaces them with one output. The user must code the `st(1)'
18077 clobber for reg-stack.c to know that `fyl2xp1' pops both inputs.
18079 asm ("fyl2xp1" : "=t" (result) : "0" (x), "u" (y) : "st(1)");
18082 File: gcc.info, Node: Constraints, Next: Asm Labels, Prev: Extended Asm, Up: C Extensions
18084 5.36 Constraints for `asm' Operands
18085 ===================================
18087 Here are specific details on what constraint letters you can use with
18088 `asm' operands. Constraints can say whether an operand may be in a
18089 register, and which kinds of register; whether the operand can be a
18090 memory reference, and which kinds of address; whether the operand may
18091 be an immediate constant, and which possible values it may have.
18092 Constraints can also require two operands to match.
18096 * Simple Constraints:: Basic use of constraints.
18097 * Multi-Alternative:: When an insn has two alternative constraint-patterns.
18098 * Modifiers:: More precise control over effects of constraints.
18099 * Machine Constraints:: Special constraints for some particular machines.
18102 File: gcc.info, Node: Simple Constraints, Next: Multi-Alternative, Up: Constraints
18104 5.36.1 Simple Constraints
18105 -------------------------
18107 The simplest kind of constraint is a string full of letters, each of
18108 which describes one kind of operand that is permitted. Here are the
18109 letters that are allowed:
18112 Whitespace characters are ignored and can be inserted at any
18113 position except the first. This enables each alternative for
18114 different operands to be visually aligned in the machine
18115 description even if they have different number of constraints and
18119 A memory operand is allowed, with any kind of address that the
18120 machine supports in general.
18123 A memory operand is allowed, but only if the address is
18124 "offsettable". This means that adding a small integer (actually,
18125 the width in bytes of the operand, as determined by its machine
18126 mode) may be added to the address and the result is also a valid
18129 For example, an address which is constant is offsettable; so is an
18130 address that is the sum of a register and a constant (as long as a
18131 slightly larger constant is also within the range of
18132 address-offsets supported by the machine); but an autoincrement or
18133 autodecrement address is not offsettable. More complicated
18134 indirect/indexed addresses may or may not be offsettable depending
18135 on the other addressing modes that the machine supports.
18137 Note that in an output operand which can be matched by another
18138 operand, the constraint letter `o' is valid only when accompanied
18139 by both `<' (if the target machine has predecrement addressing)
18140 and `>' (if the target machine has preincrement addressing).
18143 A memory operand that is not offsettable. In other words,
18144 anything that would fit the `m' constraint but not the `o'
18148 A memory operand with autodecrement addressing (either
18149 predecrement or postdecrement) is allowed.
18152 A memory operand with autoincrement addressing (either
18153 preincrement or postincrement) is allowed.
18156 A register operand is allowed provided that it is in a general
18160 An immediate integer operand (one with constant value) is allowed.
18161 This includes symbolic constants whose values will be known only at
18162 assembly time or later.
18165 An immediate integer operand with a known numeric value is allowed.
18166 Many systems cannot support assembly-time constants for operands
18167 less than a word wide. Constraints for these operands should use
18168 `n' rather than `i'.
18170 `I', `J', `K', ... `P'
18171 Other letters in the range `I' through `P' may be defined in a
18172 machine-dependent fashion to permit immediate integer operands with
18173 explicit integer values in specified ranges. For example, on the
18174 68000, `I' is defined to stand for the range of values 1 to 8.
18175 This is the range permitted as a shift count in the shift
18179 An immediate floating operand (expression code `const_double') is
18180 allowed, but only if the target floating point format is the same
18181 as that of the host machine (on which the compiler is running).
18184 An immediate floating operand (expression code `const_double' or
18185 `const_vector') is allowed.
18188 `G' and `H' may be defined in a machine-dependent fashion to
18189 permit immediate floating operands in particular ranges of values.
18192 An immediate integer operand whose value is not an explicit
18193 integer is allowed.
18195 This might appear strange; if an insn allows a constant operand
18196 with a value not known at compile time, it certainly must allow
18197 any known value. So why use `s' instead of `i'? Sometimes it
18198 allows better code to be generated.
18200 For example, on the 68000 in a fullword instruction it is possible
18201 to use an immediate operand; but if the immediate value is between
18202 -128 and 127, better code results from loading the value into a
18203 register and using the register. This is because the load into
18204 the register can be done with a `moveq' instruction. We arrange
18205 for this to happen by defining the letter `K' to mean "any integer
18206 outside the range -128 to 127", and then specifying `Ks' in the
18207 operand constraints.
18210 Any register, memory or immediate integer operand is allowed,
18211 except for registers that are not general registers.
18214 Any operand whatsoever is allowed.
18216 `0', `1', `2', ... `9'
18217 An operand that matches the specified operand number is allowed.
18218 If a digit is used together with letters within the same
18219 alternative, the digit should come last.
18221 This number is allowed to be more than a single digit. If multiple
18222 digits are encountered consecutively, they are interpreted as a
18223 single decimal integer. There is scant chance for ambiguity,
18224 since to-date it has never been desirable that `10' be interpreted
18225 as matching either operand 1 _or_ operand 0. Should this be
18226 desired, one can use multiple alternatives instead.
18228 This is called a "matching constraint" and what it really means is
18229 that the assembler has only a single operand that fills two roles
18230 which `asm' distinguishes. For example, an add instruction uses
18231 two input operands and an output operand, but on most CISC
18232 machines an add instruction really has only two operands, one of
18233 them an input-output operand:
18237 Matching constraints are used in these circumstances. More
18238 precisely, the two operands that match must include one input-only
18239 operand and one output-only operand. Moreover, the digit must be a
18240 smaller number than the number of the operand that uses it in the
18244 An operand that is a valid memory address is allowed. This is for
18245 "load address" and "push address" instructions.
18247 `p' in the constraint must be accompanied by `address_operand' as
18248 the predicate in the `match_operand'. This predicate interprets
18249 the mode specified in the `match_operand' as the mode of the memory
18250 reference for which the address would be valid.
18253 Other letters can be defined in machine-dependent fashion to stand
18254 for particular classes of registers or other arbitrary operand
18255 types. `d', `a' and `f' are defined on the 68000/68020 to stand
18256 for data, address and floating point registers.
18259 File: gcc.info, Node: Multi-Alternative, Next: Modifiers, Prev: Simple Constraints, Up: Constraints
18261 5.36.2 Multiple Alternative Constraints
18262 ---------------------------------------
18264 Sometimes a single instruction has multiple alternative sets of possible
18265 operands. For example, on the 68000, a logical-or instruction can
18266 combine register or an immediate value into memory, or it can combine
18267 any kind of operand into a register; but it cannot combine one memory
18268 location into another.
18270 These constraints are represented as multiple alternatives. An
18271 alternative can be described by a series of letters for each operand.
18272 The overall constraint for an operand is made from the letters for this
18273 operand from the first alternative, a comma, the letters for this
18274 operand from the second alternative, a comma, and so on until the last
18277 If all the operands fit any one alternative, the instruction is valid.
18278 Otherwise, for each alternative, the compiler counts how many
18279 instructions must be added to copy the operands so that that
18280 alternative applies. The alternative requiring the least copying is
18281 chosen. If two alternatives need the same amount of copying, the one
18282 that comes first is chosen. These choices can be altered with the `?'
18283 and `!' characters:
18286 Disparage slightly the alternative that the `?' appears in, as a
18287 choice when no alternative applies exactly. The compiler regards
18288 this alternative as one unit more costly for each `?' that appears
18292 Disparage severely the alternative that the `!' appears in. This
18293 alternative can still be used if it fits without reloading, but if
18294 reloading is needed, some other alternative will be used.
18297 File: gcc.info, Node: Modifiers, Next: Machine Constraints, Prev: Multi-Alternative, Up: Constraints
18299 5.36.3 Constraint Modifier Characters
18300 -------------------------------------
18302 Here are constraint modifier characters.
18305 Means that this operand is write-only for this instruction: the
18306 previous value is discarded and replaced by output data.
18309 Means that this operand is both read and written by the
18312 When the compiler fixes up the operands to satisfy the constraints,
18313 it needs to know which operands are inputs to the instruction and
18314 which are outputs from it. `=' identifies an output; `+'
18315 identifies an operand that is both input and output; all other
18316 operands are assumed to be input only.
18318 If you specify `=' or `+' in a constraint, you put it in the first
18319 character of the constraint string.
18322 Means (in a particular alternative) that this operand is an
18323 "earlyclobber" operand, which is modified before the instruction is
18324 finished using the input operands. Therefore, this operand may
18325 not lie in a register that is used as an input operand or as part
18326 of any memory address.
18328 `&' applies only to the alternative in which it is written. In
18329 constraints with multiple alternatives, sometimes one alternative
18330 requires `&' while others do not. See, for example, the `movdf'
18333 An input operand can be tied to an earlyclobber operand if its only
18334 use as an input occurs before the early result is written. Adding
18335 alternatives of this form often allows GCC to produce better code
18336 when only some of the inputs can be affected by the earlyclobber.
18337 See, for example, the `mulsi3' insn of the ARM.
18339 `&' does not obviate the need to write `='.
18342 Declares the instruction to be commutative for this operand and the
18343 following operand. This means that the compiler may interchange
18344 the two operands if that is the cheapest way to make all operands
18345 fit the constraints. GCC can only handle one commutative pair in
18346 an asm; if you use more, the compiler may fail. Note that you
18347 need not use the modifier if the two alternatives are strictly
18348 identical; this would only waste time in the reload pass. The
18349 modifier is not operational after register allocation, so the
18350 result of `define_peephole2' and `define_split's performed after
18351 reload cannot rely on `%' to make the intended insn match.
18354 Says that all following characters, up to the next comma, are to be
18355 ignored as a constraint. They are significant only for choosing
18356 register preferences.
18359 Says that the following character should be ignored when choosing
18360 register preferences. `*' has no effect on the meaning of the
18361 constraint as a constraint, and no effect on reloading.
18365 File: gcc.info, Node: Machine Constraints, Prev: Modifiers, Up: Constraints
18367 5.36.4 Constraints for Particular Machines
18368 ------------------------------------------
18370 Whenever possible, you should use the general-purpose constraint letters
18371 in `asm' arguments, since they will convey meaning more readily to
18372 people reading your code. Failing that, use the constraint letters
18373 that usually have very similar meanings across architectures. The most
18374 commonly used constraints are `m' and `r' (for memory and
18375 general-purpose registers respectively; *note Simple Constraints::), and
18376 `I', usually the letter indicating the most common immediate-constant
18379 Each architecture defines additional constraints. These constraints
18380 are used by the compiler itself for instruction generation, as well as
18381 for `asm' statements; therefore, some of the constraints are not
18382 particularly useful for `asm'. Here is a summary of some of the
18383 machine-dependent constraints available on some particular machines; it
18384 includes both constraints that are useful for `asm' and constraints
18385 that aren't. The compiler source file mentioned in the table heading
18386 for each architecture is the definitive reference for the meanings of
18387 that architecture's constraints.
18389 _ARM family--`config/arm/arm.h'_
18392 Floating-point register
18395 VFP floating-point register
18398 One of the floating-point constants 0.0, 0.5, 1.0, 2.0, 3.0,
18402 Floating-point constant that would satisfy the constraint `F'
18406 Integer that is valid as an immediate operand in a data
18407 processing instruction. That is, an integer in the range 0
18408 to 255 rotated by a multiple of 2
18411 Integer in the range -4095 to 4095
18414 Integer that satisfies constraint `I' when inverted (ones
18418 Integer that satisfies constraint `I' when negated (twos
18422 Integer in the range 0 to 32
18425 A memory reference where the exact address is in a single
18426 register (``m'' is preferable for `asm' statements)
18429 An item in the constant pool
18432 A symbol in the text segment of the current file
18435 A memory reference suitable for VFP load/store insns
18436 (reg+constant offset)
18439 A memory reference suitable for iWMMXt load/store
18443 A memory reference suitable for the ARMv4 ldrsb instruction.
18445 _AVR family--`config/avr/constraints.md'_
18448 Registers from r0 to r15
18451 Registers from r16 to r23
18454 Registers from r16 to r31
18457 Registers from r24 to r31. These registers can be used in
18461 Pointer register (r26-r31)
18464 Base pointer register (r28-r31)
18467 Stack pointer register (SPH:SPL)
18470 Temporary register r0
18473 Register pair X (r27:r26)
18476 Register pair Y (r29:r28)
18479 Register pair Z (r31:r30)
18482 Constant greater than -1, less than 64
18485 Constant greater than -64, less than 1
18494 Constant that fits in 8 bits
18497 Constant integer -1
18500 Constant integer 8, 16, or 24
18506 A floating point constant 0.0
18508 _CRX Architecture--`config/crx/crx.h'_
18511 Registers from r0 to r14 (registers without stack pointer)
18514 Register r16 (64-bit accumulator lo register)
18517 Register r17 (64-bit accumulator hi register)
18520 Register pair r16-r17. (64-bit accumulator lo-hi pair)
18523 Constant that fits in 3 bits
18526 Constant that fits in 4 bits
18529 Constant that fits in 5 bits
18532 Constant that is one of -1, 4, -4, 7, 8, 12, 16, 20, 32, 48
18535 Floating point constant that is legal for store immediate
18537 _PowerPC and IBM RS6000--`config/rs6000/rs6000.h'_
18540 Address base register
18543 Floating point register
18549 `MQ', `CTR', or `LINK' register
18561 `CR' register (condition register) number 0
18564 `CR' register (condition register)
18567 `FPMEM' stack memory for FPR-GPR transfers
18570 Signed 16-bit constant
18573 Unsigned 16-bit constant shifted left 16 bits (use `L'
18574 instead for `SImode' constants)
18577 Unsigned 16-bit constant
18580 Signed 16-bit constant shifted left 16 bits
18583 Constant larger than 31
18592 Constant whose negation is a signed 16-bit constant
18595 Floating point constant that can be loaded into a register
18596 with one instruction per word
18599 Memory operand that is an offset from a register (`m' is
18600 preferable for `asm' statements)
18606 Constant suitable as a 64-bit mask operand
18609 Constant suitable as a 32-bit mask operand
18612 System V Release 4 small data area reference
18614 _MorphoTech family--`config/mt/mt.h'_
18617 Constant for an arithmetic insn (16-bit signed integer).
18623 Constant for a logical insn (16-bit zero-extended integer).
18626 A constant that can be loaded with `lui' (i.e. the bottom 16
18630 A constant that takes two words to load (i.e. not matched by
18634 Negative 16-bit constants other than -65536.
18637 A 15-bit signed integer constant.
18640 A positive 16-bit constant.
18642 _Intel 386--`config/i386/constraints.md'_
18645 Legacy register--the eight integer registers available on all
18646 i386 processors (`a', `b', `c', `d', `si', `di', `bp', `sp').
18649 Any register accessible as `Rl'. In 32-bit mode, `a', `b',
18650 `c', and `d'; in 64-bit mode, any integer register.
18653 Any register accessible as `Rh': `a', `b', `c', and `d'.
18674 The `a' and `d' registers, as a pair (for instructions that
18675 return half the result in one and half in the other).
18678 Any 80387 floating-point (stack) register.
18681 Top of 80387 floating-point stack (`%st(0)').
18684 Second from top of 80387 floating-point stack (`%st(1)').
18693 Integer constant in the range 0 ... 31, for 32-bit shifts.
18696 Integer constant in the range 0 ... 63, for 64-bit shifts.
18699 Signed 8-bit integer constant.
18702 `0xFF' or `0xFFFF', for andsi as a zero-extending move.
18705 0, 1, 2, or 3 (shifts for the `lea' instruction).
18708 Unsigned 8-bit integer constant (for `in' and `out'
18712 Standard 80387 floating point constant.
18715 Standard SSE floating point constant.
18718 32-bit signed integer constant, or a symbolic reference known
18719 to fit that range (for immediate operands in sign-extending
18720 x86-64 instructions).
18723 32-bit unsigned integer constant, or a symbolic reference
18724 known to fit that range (for immediate operands in
18725 zero-extending x86-64 instructions).
18728 _Intel IA-64--`config/ia64/ia64.h'_
18731 General register `r0' to `r3' for `addl' instruction
18737 Predicate register (`c' as in "conditional")
18740 Application register residing in M-unit
18743 Application register residing in I-unit
18746 Floating-point register
18749 Memory operand. Remember that `m' allows postincrement and
18750 postdecrement which require printing with `%Pn' on IA-64.
18751 Use `S' to disallow postincrement and postdecrement.
18754 Floating-point constant 0.0 or 1.0
18757 14-bit signed integer constant
18760 22-bit signed integer constant
18763 8-bit signed integer constant for logical instructions
18766 8-bit adjusted signed integer constant for compare pseudo-ops
18769 6-bit unsigned integer constant for shift counts
18772 9-bit signed integer constant for load and store
18779 0 or -1 for `dep' instruction
18782 Non-volatile memory for floating-point loads and stores
18785 Integer constant in the range 1 to 4 for `shladd' instruction
18788 Memory operand except postincrement and postdecrement
18790 _FRV--`config/frv/frv.h'_
18793 Register in the class `ACC_REGS' (`acc0' to `acc7').
18796 Register in the class `EVEN_ACC_REGS' (`acc0' to `acc7').
18799 Register in the class `CC_REGS' (`fcc0' to `fcc3' and `icc0'
18803 Register in the class `GPR_REGS' (`gr0' to `gr63').
18806 Register in the class `EVEN_REGS' (`gr0' to `gr63'). Odd
18807 registers are excluded not in the class but through the use
18808 of a machine mode larger than 4 bytes.
18811 Register in the class `FPR_REGS' (`fr0' to `fr63').
18814 Register in the class `FEVEN_REGS' (`fr0' to `fr63'). Odd
18815 registers are excluded not in the class but through the use
18816 of a machine mode larger than 4 bytes.
18819 Register in the class `LR_REG' (the `lr' register).
18822 Register in the class `QUAD_REGS' (`gr2' to `gr63').
18823 Register numbers not divisible by 4 are excluded not in the
18824 class but through the use of a machine mode larger than 8
18828 Register in the class `ICC_REGS' (`icc0' to `icc3').
18831 Register in the class `FCC_REGS' (`fcc0' to `fcc3').
18834 Register in the class `ICR_REGS' (`cc4' to `cc7').
18837 Register in the class `FCR_REGS' (`cc0' to `cc3').
18840 Register in the class `QUAD_FPR_REGS' (`fr0' to `fr63').
18841 Register numbers not divisible by 4 are excluded not in the
18842 class but through the use of a machine mode larger than 8
18846 Register in the class `SPR_REGS' (`lcr' and `lr').
18849 Register in the class `QUAD_ACC_REGS' (`acc0' to `acc7').
18852 Register in the class `ACCG_REGS' (`accg0' to `accg7').
18855 Register in the class `CR_REGS' (`cc0' to `cc7').
18858 Floating point constant zero
18861 6-bit signed integer constant
18864 10-bit signed integer constant
18867 16-bit signed integer constant
18870 16-bit unsigned integer constant
18873 12-bit signed integer constant that is negative--i.e. in the
18874 range of -2048 to -1
18880 12-bit signed integer constant that is greater than
18881 zero--i.e. in the range of 1 to 2047.
18884 _Blackfin family--`config/bfin/bfin.h'_
18893 A call clobbered P register.
18896 Even-numbered D register
18899 Odd-numbered D register
18902 Accumulator register.
18905 Even-numbered accumulator register.
18908 Odd-numbered accumulator register.
18920 Registers used for circular buffering, i.e. I, B, or L
18936 Any D, P, B, M, I or L register.
18939 Additional registers typically used only in prologues and
18940 epilogues: RETS, RETN, RETI, RETX, RETE, ASTAT, SEQSTAT and
18944 Any register except accumulators or CC.
18947 Signed 16 bit integer (in the range -32768 to 32767)
18950 Unsigned 16 bit integer (in the range 0 to 65535)
18953 Signed 7 bit integer (in the range -64 to 63)
18956 Unsigned 7 bit integer (in the range 0 to 127)
18959 Unsigned 5 bit integer (in the range 0 to 31)
18962 Signed 4 bit integer (in the range -8 to 7)
18965 Signed 3 bit integer (in the range -3 to 4)
18968 Unsigned 3 bit integer (in the range 0 to 7)
18971 Constant N, where N is a single-digit constant in the range 0
18981 An integer constant with exactly a single bit set.
18984 An integer constant with all bits set except exactly one.
18991 _M32C--`config/m32c/m32c.c'_
18996 `$sp', `$fb', `$sb'.
18999 Any control register, when they're 16 bits wide (nothing if
19000 control registers are 24 bits wide)
19003 Any control register, when they're 24 bits wide.
19009 $r0, $r1, $r2, $r3.
19012 $r0 or $r2, or $r2r0 for 32 bit values.
19015 $r1 or $r3, or $r3r1 for 32 bit values.
19018 A register that can hold a 64 bit value.
19021 $r0 or $r1 (registers with addressable high/low bytes)
19030 Address registers when they're 16 bits wide.
19033 Address registers when they're 24 bits wide.
19036 Registers that can hold QI values.
19039 Registers that can be used with displacements ($a0, $a1, $sb).
19042 Registers that can hold 32 bit values.
19045 Registers that can hold 16 bit values.
19048 Registers chat can hold 16 bit values, including all control
19052 $r0 through R1, plus $a0 and $a1.
19055 The flags register.
19058 The memory-based pseudo-registers $mem0 through $mem15.
19061 Registers that can hold pointers (16 bit registers for r8c,
19062 m16c; 24 bit registers for m32cm, m32c).
19065 Matches multiple registers in a PARALLEL to form a larger
19066 register. Used to match function return values.
19081 -8 ... -1 or 1 ... 8
19084 -16 ... -1 or 1 ... 16
19087 -32 ... -1 or 1 ... 32
19093 An 8 bit value with exactly one bit set.
19096 A 16 bit value with exactly one bit set.
19099 The common src/dest memory addressing modes.
19102 Memory addressed using $a0 or $a1.
19105 Memory addressed with immediate addresses.
19108 Memory addressed using the stack pointer ($sp).
19111 Memory addressed using the frame base register ($fb).
19114 Memory addressed using the small base register ($sb).
19119 _MIPS--`config/mips/constraints.md'_
19122 An address register. This is equivalent to `r' unless
19123 generating MIPS16 code.
19126 A floating-point register (if available).
19135 The `hi' and `lo' registers.
19138 A register suitable for use in an indirect jump. This will
19139 always be `$25' for `-mabicalls'.
19142 Equivalent to `r'; retained for backwards compatibility.
19145 A floating-point condition code register.
19148 A signed 16-bit constant (for arithmetic instructions).
19154 An unsigned 16-bit constant (for logic instructions).
19157 A signed 32-bit constant in which the lower 16 bits are zero.
19158 Such constants can be loaded using `lui'.
19161 A constant that cannot be loaded using `lui', `addiu' or
19165 A constant in the range -65535 to -1 (inclusive).
19168 A signed 15-bit constant.
19171 A constant in the range 1 to 65535 (inclusive).
19174 Floating-point zero.
19177 An address that can be used in a non-macro load or store.
19179 _Motorola 680x0--`config/m68k/m68k.h'_
19188 68881 floating-point register, if available
19191 Integer in the range 1 to 8
19194 16-bit signed number
19197 Signed number whose magnitude is greater than 0x80
19200 Integer in the range -8 to -1
19203 Signed number whose magnitude is greater than 0x100
19206 Floating point constant that is not a 68881 constant
19208 _Motorola 68HC11 & 68HC12 families--`config/m68hc11/m68hc11.h'_
19223 Temporary soft register _.tmp
19226 A soft register _.d1 to _.d31
19229 Stack pointer register
19238 Pseudo register `z' (replaced by `x' or `y' at the end)
19241 An address register: x, y or z
19244 An address register: x or y
19247 Register pair (x:d) to form a 32-bit value
19250 Constants in the range -65536 to 65535
19253 Constants whose 16-bit low part is zero
19256 Constant integer 1 or -1
19259 Constant integer 16
19262 Constants in the range -8 to 2
19265 _SPARC--`config/sparc/sparc.h'_
19268 Floating-point register on the SPARC-V8 architecture and
19269 lower floating-point register on the SPARC-V9 architecture.
19272 Floating-point register. It is equivalent to `f' on the
19273 SPARC-V8 architecture and contains both lower and upper
19274 floating-point registers on the SPARC-V9 architecture.
19277 Floating-point condition code register.
19280 Lower floating-point register. It is only valid on the
19281 SPARC-V9 architecture when the Visual Instruction Set is
19285 Floating-point register. It is only valid on the SPARC-V9
19286 architecture when the Visual Instruction Set is available.
19289 64-bit global or out register for the SPARC-V8+ architecture.
19292 Signed 13-bit constant
19298 32-bit constant with the low 12 bits clear (a constant that
19299 can be loaded with the `sethi' instruction)
19302 A constant in the range supported by `movcc' instructions
19305 A constant in the range supported by `movrcc' instructions
19308 Same as `K', except that it verifies that bits that are not
19309 in the lower 32-bit range are all zero. Must be used instead
19310 of `K' for modes wider than `SImode'
19316 Floating-point zero
19319 Signed 13-bit constant, sign-extended to 32 or 64 bits
19322 Floating-point constant whose integral representation can be
19323 moved into an integer register using a single sethi
19327 Floating-point constant whose integral representation can be
19328 moved into an integer register using a single mov instruction
19331 Floating-point constant whose integral representation can be
19332 moved into an integer register using a high/lo_sum
19333 instruction sequence
19336 Memory address aligned to an 8-byte boundary
19342 Memory address for `e' constraint registers
19348 _TMS320C3x/C4x--`config/c4x/c4x.h'_
19351 Auxiliary (address) register (ar0-ar7)
19354 Stack pointer register (sp)
19357 Standard (32-bit) precision integer register
19360 Extended (40-bit) precision register (r0-r11)
19363 Block count register (bk)
19366 Extended (40-bit) precision low register (r0-r7)
19369 Extended (40-bit) precision register (r0-r1)
19372 Extended (40-bit) precision register (r2-r3)
19375 Repeat count register (rc)
19378 Index register (ir0-ir1)
19381 Status (condition code) register (st)
19384 Data page register (dp)
19387 Floating-point zero
19390 Immediate 16-bit floating-point constant
19393 Signed 16-bit constant
19396 Signed 8-bit constant
19399 Signed 5-bit constant
19402 Unsigned 16-bit constant
19405 Unsigned 8-bit constant
19408 Ones complement of unsigned 16-bit constant
19411 High 16-bit constant (32-bit constant with 16 LSBs zero)
19414 Indirect memory reference with signed 8-bit or index register
19418 Indirect memory reference with unsigned 5-bit displacement
19421 Indirect memory reference with 1 bit or index register
19425 Direct memory reference
19431 _S/390 and zSeries--`config/s390/s390.h'_
19434 Address register (general purpose register except r0)
19437 Condition code register
19440 Data register (arbitrary general purpose register)
19443 Floating-point register
19446 Unsigned 8-bit constant (0-255)
19449 Unsigned 12-bit constant (0-4095)
19452 Signed 16-bit constant (-32768-32767)
19455 Value appropriate as displacement.
19457 for short displacement
19459 `(-524288..524287)'
19460 for long displacement
19463 Constant integer with a value of 0x7fffffff.
19466 Multiple letter constraint followed by 4 parameter letters.
19468 number of the part counting from most to least
19475 mode of the containing operand
19478 value of the other parts (F--all bits set)
19479 The constraint matches if the specified part of a constant
19480 has a value different from it's other parts.
19483 Memory reference without index register and with short
19487 Memory reference with index register and short displacement.
19490 Memory reference without index register but with long
19494 Memory reference with index register and long displacement.
19497 Pointer with short displacement.
19500 Pointer with long displacement.
19503 Shift count operand.
19506 _Score family--`config/score/score.h'_
19509 Registers from r0 to r32.
19512 Registers from r0 to r16.
19515 r8--r11 or r22--r27 registers.
19536 cnt + lcb + scb register.
19539 cr0--cr15 register.
19551 cp1 + cp2 + cp3 registers.
19554 High 16-bit constant (32-bit constant with 16 LSBs zero).
19557 Unsigned 5 bit integer (in the range 0 to 31).
19560 Unsigned 16 bit integer (in the range 0 to 65535).
19563 Signed 16 bit integer (in the range -32768 to 32767).
19566 Unsigned 14 bit integer (in the range 0 to 16383).
19569 Signed 14 bit integer (in the range -8192 to 8191).
19574 _Xstormy16--`config/stormy16/stormy16.h'_
19589 Registers r0 through r7.
19592 Registers r0 and r1.
19595 The carry register.
19598 Registers r8 and r9.
19601 A constant between 0 and 3 inclusive.
19604 A constant that has exactly one bit set.
19607 A constant that has exactly one bit clear.
19610 A constant between 0 and 255 inclusive.
19613 A constant between -255 and 0 inclusive.
19616 A constant between -3 and 0 inclusive.
19619 A constant between 1 and 4 inclusive.
19622 A constant between -4 and -1 inclusive.
19625 A memory reference that is a stack push.
19628 A memory reference that is a stack pop.
19631 A memory reference that refers to a constant address of known
19635 The register indicated by Rx (not implemented yet).
19638 A constant that is not between 2 and 15 inclusive.
19644 _Xtensa--`config/xtensa/xtensa.h'_
19647 General-purpose 32-bit register
19650 One-bit boolean register
19653 MAC16 40-bit accumulator register
19656 Signed 12-bit integer constant, for use in MOVI instructions
19659 Signed 8-bit integer constant, for use in ADDI instructions
19662 Integer constant valid for BccI instructions
19665 Unsigned constant valid for BccUI instructions
19670 File: gcc.info, Node: Asm Labels, Next: Explicit Reg Vars, Prev: Constraints, Up: C Extensions
19672 5.37 Controlling Names Used in Assembler Code
19673 =============================================
19675 You can specify the name to be used in the assembler code for a C
19676 function or variable by writing the `asm' (or `__asm__') keyword after
19677 the declarator as follows:
19679 int foo asm ("myfoo") = 2;
19681 This specifies that the name to be used for the variable `foo' in the
19682 assembler code should be `myfoo' rather than the usual `_foo'.
19684 On systems where an underscore is normally prepended to the name of a C
19685 function or variable, this feature allows you to define names for the
19686 linker that do not start with an underscore.
19688 It does not make sense to use this feature with a non-static local
19689 variable since such variables do not have assembler names. If you are
19690 trying to put the variable in a particular register, see *Note Explicit
19691 Reg Vars::. GCC presently accepts such code with a warning, but will
19692 probably be changed to issue an error, rather than a warning, in the
19695 You cannot use `asm' in this way in a function _definition_; but you
19696 can get the same effect by writing a declaration for the function
19697 before its definition and putting `asm' there, like this:
19699 extern func () asm ("FUNC");
19705 It is up to you to make sure that the assembler names you choose do not
19706 conflict with any other assembler symbols. Also, you must not use a
19707 register name; that would produce completely invalid assembler code.
19708 GCC does not as yet have the ability to store static variables in
19709 registers. Perhaps that will be added.
19712 File: gcc.info, Node: Explicit Reg Vars, Next: Alternate Keywords, Prev: Asm Labels, Up: C Extensions
19714 5.38 Variables in Specified Registers
19715 =====================================
19717 GNU C allows you to put a few global variables into specified hardware
19718 registers. You can also specify the register in which an ordinary
19719 register variable should be allocated.
19721 * Global register variables reserve registers throughout the program.
19722 This may be useful in programs such as programming language
19723 interpreters which have a couple of global variables that are
19724 accessed very often.
19726 * Local register variables in specific registers do not reserve the
19727 registers, except at the point where they are used as input or
19728 output operands in an `asm' statement and the `asm' statement
19729 itself is not deleted. The compiler's data flow analysis is
19730 capable of determining where the specified registers contain live
19731 values, and where they are available for other uses. Stores into
19732 local register variables may be deleted when they appear to be
19733 dead according to dataflow analysis. References to local register
19734 variables may be deleted or moved or simplified.
19736 These local variables are sometimes convenient for use with the
19737 extended `asm' feature (*note Extended Asm::), if you want to
19738 write one output of the assembler instruction directly into a
19739 particular register. (This will work provided the register you
19740 specify fits the constraints specified for that operand in the
19745 * Global Reg Vars::
19749 File: gcc.info, Node: Global Reg Vars, Next: Local Reg Vars, Up: Explicit Reg Vars
19751 5.38.1 Defining Global Register Variables
19752 -----------------------------------------
19754 You can define a global register variable in GNU C like this:
19756 register int *foo asm ("a5");
19758 Here `a5' is the name of the register which should be used. Choose a
19759 register which is normally saved and restored by function calls on your
19760 machine, so that library routines will not clobber it.
19762 Naturally the register name is cpu-dependent, so you would need to
19763 conditionalize your program according to cpu type. The register `a5'
19764 would be a good choice on a 68000 for a variable of pointer type. On
19765 machines with register windows, be sure to choose a "global" register
19766 that is not affected magically by the function call mechanism.
19768 In addition, operating systems on one type of cpu may differ in how
19769 they name the registers; then you would need additional conditionals.
19770 For example, some 68000 operating systems call this register `%a5'.
19772 Eventually there may be a way of asking the compiler to choose a
19773 register automatically, but first we need to figure out how it should
19774 choose and how to enable you to guide the choice. No solution is
19777 Defining a global register variable in a certain register reserves that
19778 register entirely for this use, at least within the current compilation.
19779 The register will not be allocated for any other purpose in the
19780 functions in the current compilation. The register will not be saved
19781 and restored by these functions. Stores into this register are never
19782 deleted even if they would appear to be dead, but references may be
19783 deleted or moved or simplified.
19785 It is not safe to access the global register variables from signal
19786 handlers, or from more than one thread of control, because the system
19787 library routines may temporarily use the register for other things
19788 (unless you recompile them specially for the task at hand).
19790 It is not safe for one function that uses a global register variable to
19791 call another such function `foo' by way of a third function `lose' that
19792 was compiled without knowledge of this variable (i.e. in a different
19793 source file in which the variable wasn't declared). This is because
19794 `lose' might save the register and put some other value there. For
19795 example, you can't expect a global register variable to be available in
19796 the comparison-function that you pass to `qsort', since `qsort' might
19797 have put something else in that register. (If you are prepared to
19798 recompile `qsort' with the same global register variable, you can solve
19801 If you want to recompile `qsort' or other source files which do not
19802 actually use your global register variable, so that they will not use
19803 that register for any other purpose, then it suffices to specify the
19804 compiler option `-ffixed-REG'. You need not actually add a global
19805 register declaration to their source code.
19807 A function which can alter the value of a global register variable
19808 cannot safely be called from a function compiled without this variable,
19809 because it could clobber the value the caller expects to find there on
19810 return. Therefore, the function which is the entry point into the part
19811 of the program that uses the global register variable must explicitly
19812 save and restore the value which belongs to its caller.
19814 On most machines, `longjmp' will restore to each global register
19815 variable the value it had at the time of the `setjmp'. On some
19816 machines, however, `longjmp' will not change the value of global
19817 register variables. To be portable, the function that called `setjmp'
19818 should make other arrangements to save the values of the global register
19819 variables, and to restore them in a `longjmp'. This way, the same
19820 thing will happen regardless of what `longjmp' does.
19822 All global register variable declarations must precede all function
19823 definitions. If such a declaration could appear after function
19824 definitions, the declaration would be too late to prevent the register
19825 from being used for other purposes in the preceding functions.
19827 Global register variables may not have initial values, because an
19828 executable file has no means to supply initial contents for a register.
19830 On the SPARC, there are reports that g3 ... g7 are suitable registers,
19831 but certain library functions, such as `getwd', as well as the
19832 subroutines for division and remainder, modify g3 and g4. g1 and g2
19833 are local temporaries.
19835 On the 68000, a2 ... a5 should be suitable, as should d2 ... d7. Of
19836 course, it will not do to use more than a few of those.
19839 File: gcc.info, Node: Local Reg Vars, Prev: Global Reg Vars, Up: Explicit Reg Vars
19841 5.38.2 Specifying Registers for Local Variables
19842 -----------------------------------------------
19844 You can define a local register variable with a specified register like
19847 register int *foo asm ("a5");
19849 Here `a5' is the name of the register which should be used. Note that
19850 this is the same syntax used for defining global register variables,
19851 but for a local variable it would appear within a function.
19853 Naturally the register name is cpu-dependent, but this is not a
19854 problem, since specific registers are most often useful with explicit
19855 assembler instructions (*note Extended Asm::). Both of these things
19856 generally require that you conditionalize your program according to cpu
19859 In addition, operating systems on one type of cpu may differ in how
19860 they name the registers; then you would need additional conditionals.
19861 For example, some 68000 operating systems call this register `%a5'.
19863 Defining such a register variable does not reserve the register; it
19864 remains available for other uses in places where flow control determines
19865 the variable's value is not live.
19867 This option does not guarantee that GCC will generate code that has
19868 this variable in the register you specify at all times. You may not
19869 code an explicit reference to this register in the _assembler
19870 instruction template_ part of an `asm' statement and assume it will
19871 always refer to this variable. However, using the variable as an `asm'
19872 _operand_ guarantees that the specified register is used for the
19875 Stores into local register variables may be deleted when they appear
19876 to be dead according to dataflow analysis. References to local
19877 register variables may be deleted or moved or simplified.
19879 As for global register variables, it's recommended that you choose a
19880 register which is normally saved and restored by function calls on your
19881 machine, so that library routines will not clobber it. A common
19882 pitfall is to initialize multiple call-clobbered registers with
19883 arbitrary expressions, where a function call or library call for an
19884 arithmetic operator will overwrite a register value from a previous
19885 assignment, for example `r0' below:
19886 register int *p1 asm ("r0") = ...;
19887 register int *p2 asm ("r1") = ...;
19888 In those cases, a solution is to use a temporary variable for each
19889 arbitrary expression. *Note Example of asm with clobbered asm reg::.
19892 File: gcc.info, Node: Alternate Keywords, Next: Incomplete Enums, Prev: Explicit Reg Vars, Up: C Extensions
19894 5.39 Alternate Keywords
19895 =======================
19897 `-ansi' and the various `-std' options disable certain keywords. This
19898 causes trouble when you want to use GNU C extensions, or a
19899 general-purpose header file that should be usable by all programs,
19900 including ISO C programs. The keywords `asm', `typeof' and `inline'
19901 are not available in programs compiled with `-ansi' or `-std' (although
19902 `inline' can be used in a program compiled with `-std=c99'). The ISO
19903 C99 keyword `restrict' is only available when `-std=gnu99' (which will
19904 eventually be the default) or `-std=c99' (or the equivalent
19905 `-std=iso9899:1999') is used.
19907 The way to solve these problems is to put `__' at the beginning and
19908 end of each problematical keyword. For example, use `__asm__' instead
19909 of `asm', and `__inline__' instead of `inline'.
19911 Other C compilers won't accept these alternative keywords; if you want
19912 to compile with another compiler, you can define the alternate keywords
19913 as macros to replace them with the customary keywords. It looks like
19917 #define __asm__ asm
19920 `-pedantic' and other options cause warnings for many GNU C extensions.
19921 You can prevent such warnings within one expression by writing
19922 `__extension__' before the expression. `__extension__' has no effect
19926 File: gcc.info, Node: Incomplete Enums, Next: Function Names, Prev: Alternate Keywords, Up: C Extensions
19928 5.40 Incomplete `enum' Types
19929 ============================
19931 You can define an `enum' tag without specifying its possible values.
19932 This results in an incomplete type, much like what you get if you write
19933 `struct foo' without describing the elements. A later declaration
19934 which does specify the possible values completes the type.
19936 You can't allocate variables or storage using the type while it is
19937 incomplete. However, you can work with pointers to that type.
19939 This extension may not be very useful, but it makes the handling of
19940 `enum' more consistent with the way `struct' and `union' are handled.
19942 This extension is not supported by GNU C++.
19945 File: gcc.info, Node: Function Names, Next: Return Address, Prev: Incomplete Enums, Up: C Extensions
19947 5.41 Function Names as Strings
19948 ==============================
19950 GCC provides three magic variables which hold the name of the current
19951 function, as a string. The first of these is `__func__', which is part
19952 of the C99 standard:
19954 The identifier `__func__' is implicitly declared by the translator
19955 as if, immediately following the opening brace of each function
19956 definition, the declaration
19957 static const char __func__[] = "function-name";
19959 appeared, where function-name is the name of the lexically-enclosing
19960 function. This name is the unadorned name of the function.
19962 `__FUNCTION__' is another name for `__func__'. Older versions of GCC
19963 recognize only this name. However, it is not standardized. For
19964 maximum portability, we recommend you use `__func__', but provide a
19965 fallback definition with the preprocessor:
19967 #if __STDC_VERSION__ < 199901L
19969 # define __func__ __FUNCTION__
19971 # define __func__ "<unknown>"
19975 In C, `__PRETTY_FUNCTION__' is yet another name for `__func__'.
19976 However, in C++, `__PRETTY_FUNCTION__' contains the type signature of
19977 the function as well as its bare name. For example, this program:
19980 extern int printf (char *, ...);
19987 printf ("__FUNCTION__ = %s\n", __FUNCTION__);
19988 printf ("__PRETTY_FUNCTION__ = %s\n", __PRETTY_FUNCTION__);
20003 __PRETTY_FUNCTION__ = void a::sub(int)
20005 These identifiers are not preprocessor macros. In GCC 3.3 and
20006 earlier, in C only, `__FUNCTION__' and `__PRETTY_FUNCTION__' were
20007 treated as string literals; they could be used to initialize `char'
20008 arrays, and they could be concatenated with other string literals. GCC
20009 3.4 and later treat them as variables, like `__func__'. In C++,
20010 `__FUNCTION__' and `__PRETTY_FUNCTION__' have always been variables.
20013 File: gcc.info, Node: Return Address, Next: Vector Extensions, Prev: Function Names, Up: C Extensions
20015 5.42 Getting the Return or Frame Address of a Function
20016 ======================================================
20018 These functions may be used to get information about the callers of a
20021 -- Built-in Function: void * __builtin_return_address (unsigned int
20023 This function returns the return address of the current function,
20024 or of one of its callers. The LEVEL argument is number of frames
20025 to scan up the call stack. A value of `0' yields the return
20026 address of the current function, a value of `1' yields the return
20027 address of the caller of the current function, and so forth. When
20028 inlining the expected behavior is that the function will return
20029 the address of the function that will be returned to. To work
20030 around this behavior use the `noinline' function attribute.
20032 The LEVEL argument must be a constant integer.
20034 On some machines it may be impossible to determine the return
20035 address of any function other than the current one; in such cases,
20036 or when the top of the stack has been reached, this function will
20037 return `0' or a random value. In addition,
20038 `__builtin_frame_address' may be used to determine if the top of
20039 the stack has been reached.
20041 This function should only be used with a nonzero argument for
20042 debugging purposes.
20044 -- Built-in Function: void * __builtin_frame_address (unsigned int
20046 This function is similar to `__builtin_return_address', but it
20047 returns the address of the function frame rather than the return
20048 address of the function. Calling `__builtin_frame_address' with a
20049 value of `0' yields the frame address of the current function, a
20050 value of `1' yields the frame address of the caller of the current
20051 function, and so forth.
20053 The frame is the area on the stack which holds local variables and
20054 saved registers. The frame address is normally the address of the
20055 first word pushed on to the stack by the function. However, the
20056 exact definition depends upon the processor and the calling
20057 convention. If the processor has a dedicated frame pointer
20058 register, and the function has a frame, then
20059 `__builtin_frame_address' will return the value of the frame
20062 On some machines it may be impossible to determine the frame
20063 address of any function other than the current one; in such cases,
20064 or when the top of the stack has been reached, this function will
20065 return `0' if the first frame pointer is properly initialized by
20068 This function should only be used with a nonzero argument for
20069 debugging purposes.
20072 File: gcc.info, Node: Vector Extensions, Next: Offsetof, Prev: Return Address, Up: C Extensions
20074 5.43 Using vector instructions through built-in functions
20075 =========================================================
20077 On some targets, the instruction set contains SIMD vector instructions
20078 that operate on multiple values contained in one large register at the
20079 same time. For example, on the i386 the MMX, 3Dnow! and SSE extensions
20080 can be used this way.
20082 The first step in using these extensions is to provide the necessary
20083 data types. This should be done using an appropriate `typedef':
20085 typedef int v4si __attribute__ ((vector_size (16)));
20087 The `int' type specifies the base type, while the attribute specifies
20088 the vector size for the variable, measured in bytes. For example, the
20089 declaration above causes the compiler to set the mode for the `v4si'
20090 type to be 16 bytes wide and divided into `int' sized units. For a
20091 32-bit `int' this means a vector of 4 units of 4 bytes, and the
20092 corresponding mode of `foo' will be V4SI.
20094 The `vector_size' attribute is only applicable to integral and float
20095 scalars, although arrays, pointers, and function return values are
20096 allowed in conjunction with this construct.
20098 All the basic integer types can be used as base types, both as signed
20099 and as unsigned: `char', `short', `int', `long', `long long'. In
20100 addition, `float' and `double' can be used to build floating-point
20103 Specifying a combination that is not valid for the current architecture
20104 will cause GCC to synthesize the instructions using a narrower mode.
20105 For example, if you specify a variable of type `V4SI' and your
20106 architecture does not allow for this specific SIMD type, GCC will
20107 produce code that uses 4 `SIs'.
20109 The types defined in this manner can be used with a subset of normal C
20110 operations. Currently, GCC will allow using the following operators on
20111 these types: `+, -, *, /, unary minus, ^, |, &, ~'.
20113 The operations behave like C++ `valarrays'. Addition is defined as
20114 the addition of the corresponding elements of the operands. For
20115 example, in the code below, each of the 4 elements in A will be added
20116 to the corresponding 4 elements in B and the resulting vector will be
20119 typedef int v4si __attribute__ ((vector_size (16)));
20125 Subtraction, multiplication, division, and the logical operations
20126 operate in a similar manner. Likewise, the result of using the unary
20127 minus or complement operators on a vector type is a vector whose
20128 elements are the negative or complemented values of the corresponding
20129 elements in the operand.
20131 You can declare variables and use them in function calls and returns,
20132 as well as in assignments and some casts. You can specify a vector
20133 type as a return type for a function. Vector types can also be used as
20134 function arguments. It is possible to cast from one vector type to
20135 another, provided they are of the same size (in fact, you can also cast
20136 vectors to and from other datatypes of the same size).
20138 You cannot operate between vectors of different lengths or different
20139 signedness without a cast.
20141 A port that supports hardware vector operations, usually provides a set
20142 of built-in functions that can be used to operate on vectors. For
20143 example, a function to add two vectors and multiply the result by a
20144 third could look like this:
20146 v4si f (v4si a, v4si b, v4si c)
20148 v4si tmp = __builtin_addv4si (a, b);
20149 return __builtin_mulv4si (tmp, c);
20153 File: gcc.info, Node: Offsetof, Next: Atomic Builtins, Prev: Vector Extensions, Up: C Extensions
20158 GCC implements for both C and C++ a syntactic extension to implement
20159 the `offsetof' macro.
20162 "__builtin_offsetof" "(" `typename' "," offsetof_member_designator ")"
20164 offsetof_member_designator:
20166 | offsetof_member_designator "." `identifier'
20167 | offsetof_member_designator "[" `expr' "]"
20169 This extension is sufficient such that
20171 #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
20173 is a suitable definition of the `offsetof' macro. In C++, TYPE may be
20174 dependent. In either case, MEMBER may consist of a single identifier,
20175 or a sequence of member accesses and array references.
20178 File: gcc.info, Node: Atomic Builtins, Next: Object Size Checking, Prev: Offsetof, Up: C Extensions
20180 5.45 Built-in functions for atomic memory access
20181 ================================================
20183 The following builtins are intended to be compatible with those
20184 described in the `Intel Itanium Processor-specific Application Binary
20185 Interface', section 7.4. As such, they depart from the normal GCC
20186 practice of using the "__builtin_" prefix, and further that they are
20187 overloaded such that they work on multiple types.
20189 The definition given in the Intel documentation allows only for the
20190 use of the types `int', `long', `long long' as well as their unsigned
20191 counterparts. GCC will allow any integral scalar or pointer type that
20192 is 1, 2, 4 or 8 bytes in length.
20194 Not all operations are supported by all target processors. If a
20195 particular operation cannot be implemented on the target processor, a
20196 warning will be generated and a call an external function will be
20197 generated. The external function will carry the same name as the
20198 builtin, with an additional suffix `_N' where N is the size of the data
20201 In most cases, these builtins are considered a "full barrier". That
20202 is, no memory operand will be moved across the operation, either
20203 forward or backward. Further, instructions will be issued as necessary
20204 to prevent the processor from speculating loads across the operation
20205 and from queuing stores after the operation.
20207 All of the routines are are described in the Intel documentation to
20208 take "an optional list of variables protected by the memory barrier".
20209 It's not clear what is meant by that; it could mean that _only_ the
20210 following variables are protected, or it could mean that these variables
20211 should in addition be protected. At present GCC ignores this list and
20212 protects all variables which are globally accessible. If in the future
20213 we make some use of this list, an empty list will continue to mean all
20214 globally accessible variables.
20216 `TYPE __sync_fetch_and_add (TYPE *ptr, TYPE value, ...)'
20217 `TYPE __sync_fetch_and_sub (TYPE *ptr, TYPE value, ...)'
20218 `TYPE __sync_fetch_and_or (TYPE *ptr, TYPE value, ...)'
20219 `TYPE __sync_fetch_and_and (TYPE *ptr, TYPE value, ...)'
20220 `TYPE __sync_fetch_and_xor (TYPE *ptr, TYPE value, ...)'
20221 `TYPE __sync_fetch_and_nand (TYPE *ptr, TYPE value, ...)'
20222 These builtins perform the operation suggested by the name, and
20223 returns the value that had previously been in memory. That is,
20225 { tmp = *ptr; *ptr OP= value; return tmp; }
20226 { tmp = *ptr; *ptr = ~tmp & value; return tmp; } // nand
20228 `TYPE __sync_add_and_fetch (TYPE *ptr, TYPE value, ...)'
20229 `TYPE __sync_sub_and_fetch (TYPE *ptr, TYPE value, ...)'
20230 `TYPE __sync_or_and_fetch (TYPE *ptr, TYPE value, ...)'
20231 `TYPE __sync_and_and_fetch (TYPE *ptr, TYPE value, ...)'
20232 `TYPE __sync_xor_and_fetch (TYPE *ptr, TYPE value, ...)'
20233 `TYPE __sync_nand_and_fetch (TYPE *ptr, TYPE value, ...)'
20234 These builtins perform the operation suggested by the name, and
20235 return the new value. That is,
20237 { *ptr OP= value; return *ptr; }
20238 { *ptr = ~*ptr & value; return *ptr; } // nand
20240 `bool __sync_bool_compare_and_swap (TYPE *ptr, TYPE oldval TYPE newval, ...)'
20241 `TYPE __sync_val_compare_and_swap (TYPE *ptr, TYPE oldval TYPE newval, ...)'
20242 These builtins perform an atomic compare and swap. That is, if
20243 the current value of `*PTR' is OLDVAL, then write NEWVAL into
20246 The "bool" version returns true if the comparison is successful and
20247 NEWVAL was written. The "val" version returns the contents of
20248 `*PTR' before the operation.
20250 `__sync_synchronize (...)'
20251 This builtin issues a full memory barrier.
20253 `TYPE __sync_lock_test_and_set (TYPE *ptr, TYPE value, ...)'
20254 This builtin, as described by Intel, is not a traditional
20255 test-and-set operation, but rather an atomic exchange operation.
20256 It writes VALUE into `*PTR', and returns the previous contents of
20259 Many targets have only minimal support for such locks, and do not
20260 support a full exchange operation. In this case, a target may
20261 support reduced functionality here by which the _only_ valid value
20262 to store is the immediate constant 1. The exact value actually
20263 stored in `*PTR' is implementation defined.
20265 This builtin is not a full barrier, but rather an "acquire
20266 barrier". This means that references after the builtin cannot
20267 move to (or be speculated to) before the builtin, but previous
20268 memory stores may not be globally visible yet, and previous memory
20269 loads may not yet be satisfied.
20271 `void __sync_lock_release (TYPE *ptr, ...)'
20272 This builtin releases the lock acquired by
20273 `__sync_lock_test_and_set'. Normally this means writing the
20274 constant 0 to `*PTR'.
20276 This builtin is not a full barrier, but rather a "release barrier".
20277 This means that all previous memory stores are globally visible,
20278 and all previous memory loads have been satisfied, but following
20279 memory reads are not prevented from being speculated to before the
20283 File: gcc.info, Node: Object Size Checking, Next: Other Builtins, Prev: Atomic Builtins, Up: C Extensions
20285 5.46 Object Size Checking Builtins
20286 ==================================
20288 GCC implements a limited buffer overflow protection mechanism that can
20289 prevent some buffer overflow attacks.
20291 -- Built-in Function: size_t __builtin_object_size (void * PTR, int
20293 is a built-in construct that returns a constant number of bytes
20294 from PTR to the end of the object PTR pointer points to (if known
20295 at compile time). `__builtin_object_size' never evaluates its
20296 arguments for side-effects. If there are any side-effects in
20297 them, it returns `(size_t) -1' for TYPE 0 or 1 and `(size_t) 0'
20298 for TYPE 2 or 3. If there are multiple objects PTR can point to
20299 and all of them are known at compile time, the returned number is
20300 the maximum of remaining byte counts in those objects if TYPE & 2
20301 is 0 and minimum if nonzero. If it is not possible to determine
20302 which objects PTR points to at compile time,
20303 `__builtin_object_size' should return `(size_t) -1' for TYPE 0 or
20304 1 and `(size_t) 0' for TYPE 2 or 3.
20306 TYPE is an integer constant from 0 to 3. If the least significant
20307 bit is clear, objects are whole variables, if it is set, a closest
20308 surrounding subobject is considered the object a pointer points to.
20309 The second bit determines if maximum or minimum of remaining bytes
20312 struct V { char buf1[10]; int b; char buf2[10]; } var;
20313 char *p = &var.buf1[1], *q = &var.b;
20315 /* Here the object p points to is var. */
20316 assert (__builtin_object_size (p, 0) == sizeof (var) - 1);
20317 /* The subobject p points to is var.buf1. */
20318 assert (__builtin_object_size (p, 1) == sizeof (var.buf1) - 1);
20319 /* The object q points to is var. */
20320 assert (__builtin_object_size (q, 0)
20321 == (char *) (&var + 1) - (char *) &var.b);
20322 /* The subobject q points to is var.b. */
20323 assert (__builtin_object_size (q, 1) == sizeof (var.b));
20325 There are built-in functions added for many common string operation
20326 functions, e.g. for `memcpy' `__builtin___memcpy_chk' built-in is
20327 provided. This built-in has an additional last argument, which is the
20328 number of bytes remaining in object the DEST argument points to or
20329 `(size_t) -1' if the size is not known.
20331 The built-in functions are optimized into the normal string functions
20332 like `memcpy' if the last argument is `(size_t) -1' or if it is known
20333 at compile time that the destination object will not be overflown. If
20334 the compiler can determine at compile time the object will be always
20335 overflown, it issues a warning.
20337 The intended use can be e.g.
20340 #define bos0(dest) __builtin_object_size (dest, 0)
20341 #define memcpy(dest, src, n) \
20342 __builtin___memcpy_chk (dest, src, n, bos0 (dest))
20346 /* It is unknown what object p points to, so this is optimized
20347 into plain memcpy - no checking is possible. */
20348 memcpy (p, "abcde", n);
20349 /* Destination is known and length too. It is known at compile
20350 time there will be no overflow. */
20351 memcpy (&buf[5], "abcde", 5);
20352 /* Destination is known, but the length is not known at compile time.
20353 This will result in __memcpy_chk call that can check for overflow
20355 memcpy (&buf[5], "abcde", n);
20356 /* Destination is known and it is known at compile time there will
20357 be overflow. There will be a warning and __memcpy_chk call that
20358 will abort the program at runtime. */
20359 memcpy (&buf[6], "abcde", 5);
20361 Such built-in functions are provided for `memcpy', `mempcpy',
20362 `memmove', `memset', `strcpy', `stpcpy', `strncpy', `strcat' and
20365 There are also checking built-in functions for formatted output
20367 int __builtin___sprintf_chk (char *s, int flag, size_t os, const char *fmt, ...);
20368 int __builtin___snprintf_chk (char *s, size_t maxlen, int flag, size_t os,
20369 const char *fmt, ...);
20370 int __builtin___vsprintf_chk (char *s, int flag, size_t os, const char *fmt,
20372 int __builtin___vsnprintf_chk (char *s, size_t maxlen, int flag, size_t os,
20373 const char *fmt, va_list ap);
20375 The added FLAG argument is passed unchanged to `__sprintf_chk' etc.
20376 functions and can contain implementation specific flags on what
20377 additional security measures the checking function might take, such as
20378 handling `%n' differently.
20380 The OS argument is the object size S points to, like in the other
20381 built-in functions. There is a small difference in the behavior
20382 though, if OS is `(size_t) -1', the built-in functions are optimized
20383 into the non-checking functions only if FLAG is 0, otherwise the
20384 checking function is called with OS argument set to `(size_t) -1'.
20386 In addition to this, there are checking built-in functions
20387 `__builtin___printf_chk', `__builtin___vprintf_chk',
20388 `__builtin___fprintf_chk' and `__builtin___vfprintf_chk'. These have
20389 just one additional argument, FLAG, right before format string FMT. If
20390 the compiler is able to optimize them to `fputc' etc. functions, it
20391 will, otherwise the checking function should be called and the FLAG
20392 argument passed to it.
20395 File: gcc.info, Node: Other Builtins, Next: Target Builtins, Prev: Object Size Checking, Up: C Extensions
20397 5.47 Other built-in functions provided by GCC
20398 =============================================
20400 GCC provides a large number of built-in functions other than the ones
20401 mentioned above. Some of these are for internal use in the processing
20402 of exceptions or variable-length argument lists and will not be
20403 documented here because they may change from time to time; we do not
20404 recommend general use of these functions.
20406 The remaining functions are provided for optimization purposes.
20408 GCC includes built-in versions of many of the functions in the standard
20409 C library. The versions prefixed with `__builtin_' will always be
20410 treated as having the same meaning as the C library function even if you
20411 specify the `-fno-builtin' option. (*note C Dialect Options::) Many of
20412 these functions are only optimized in certain cases; if they are not
20413 optimized in a particular case, a call to the library function will be
20416 Outside strict ISO C mode (`-ansi', `-std=c89' or `-std=c99'), the
20417 functions `_exit', `alloca', `bcmp', `bzero', `dcgettext', `dgettext',
20418 `dremf', `dreml', `drem', `exp10f', `exp10l', `exp10', `ffsll', `ffsl',
20419 `ffs', `fprintf_unlocked', `fputs_unlocked', `gammaf', `gammal',
20420 `gamma', `gettext', `index', `isascii', `j0f', `j0l', `j0', `j1f',
20421 `j1l', `j1', `jnf', `jnl', `jn', `mempcpy', `pow10f', `pow10l', `pow10',
20422 `printf_unlocked', `rindex', `scalbf', `scalbl', `scalb', `signbit',
20423 `signbitf', `signbitl', `significandf', `significandl', `significand',
20424 `sincosf', `sincosl', `sincos', `stpcpy', `stpncpy', `strcasecmp',
20425 `strdup', `strfmon', `strncasecmp', `strndup', `toascii', `y0f', `y0l',
20426 `y0', `y1f', `y1l', `y1', `ynf', `ynl' and `yn' may be handled as
20427 built-in functions. All these functions have corresponding versions
20428 prefixed with `__builtin_', which may be used even in strict C89 mode.
20430 The ISO C99 functions `_Exit', `acoshf', `acoshl', `acosh', `asinhf',
20431 `asinhl', `asinh', `atanhf', `atanhl', `atanh', `cabsf', `cabsl',
20432 `cabs', `cacosf', `cacoshf', `cacoshl', `cacosh', `cacosl', `cacos',
20433 `cargf', `cargl', `carg', `casinf', `casinhf', `casinhl', `casinh',
20434 `casinl', `casin', `catanf', `catanhf', `catanhl', `catanh', `catanl',
20435 `catan', `cbrtf', `cbrtl', `cbrt', `ccosf', `ccoshf', `ccoshl',
20436 `ccosh', `ccosl', `ccos', `cexpf', `cexpl', `cexp', `cimagf', `cimagl',
20437 `cimag', `clogf', `clogl', `clog', `conjf', `conjl', `conj',
20438 `copysignf', `copysignl', `copysign', `cpowf', `cpowl', `cpow',
20439 `cprojf', `cprojl', `cproj', `crealf', `creall', `creal', `csinf',
20440 `csinhf', `csinhl', `csinh', `csinl', `csin', `csqrtf', `csqrtl',
20441 `csqrt', `ctanf', `ctanhf', `ctanhl', `ctanh', `ctanl', `ctan',
20442 `erfcf', `erfcl', `erfc', `erff', `erfl', `erf', `exp2f', `exp2l',
20443 `exp2', `expm1f', `expm1l', `expm1', `fdimf', `fdiml', `fdim', `fmaf',
20444 `fmal', `fmaxf', `fmaxl', `fmax', `fma', `fminf', `fminl', `fmin',
20445 `hypotf', `hypotl', `hypot', `ilogbf', `ilogbl', `ilogb', `imaxabs',
20446 `isblank', `iswblank', `lgammaf', `lgammal', `lgamma', `llabs',
20447 `llrintf', `llrintl', `llrint', `llroundf', `llroundl', `llround',
20448 `log1pf', `log1pl', `log1p', `log2f', `log2l', `log2', `logbf',
20449 `logbl', `logb', `lrintf', `lrintl', `lrint', `lroundf', `lroundl',
20450 `lround', `nearbyintf', `nearbyintl', `nearbyint', `nextafterf',
20451 `nextafterl', `nextafter', `nexttowardf', `nexttowardl', `nexttoward',
20452 `remainderf', `remainderl', `remainder', `remquof', `remquol',
20453 `remquo', `rintf', `rintl', `rint', `roundf', `roundl', `round',
20454 `scalblnf', `scalblnl', `scalbln', `scalbnf', `scalbnl', `scalbn',
20455 `snprintf', `tgammaf', `tgammal', `tgamma', `truncf', `truncl', `trunc',
20456 `vfscanf', `vscanf', `vsnprintf' and `vsscanf' are handled as built-in
20457 functions except in strict ISO C90 mode (`-ansi' or `-std=c89').
20459 There are also built-in versions of the ISO C99 functions `acosf',
20460 `acosl', `asinf', `asinl', `atan2f', `atan2l', `atanf', `atanl',
20461 `ceilf', `ceill', `cosf', `coshf', `coshl', `cosl', `expf', `expl',
20462 `fabsf', `fabsl', `floorf', `floorl', `fmodf', `fmodl', `frexpf',
20463 `frexpl', `ldexpf', `ldexpl', `log10f', `log10l', `logf', `logl',
20464 `modfl', `modf', `powf', `powl', `sinf', `sinhf', `sinhl', `sinl',
20465 `sqrtf', `sqrtl', `tanf', `tanhf', `tanhl' and `tanl' that are
20466 recognized in any mode since ISO C90 reserves these names for the
20467 purpose to which ISO C99 puts them. All these functions have
20468 corresponding versions prefixed with `__builtin_'.
20470 The ISO C94 functions `iswalnum', `iswalpha', `iswcntrl', `iswdigit',
20471 `iswgraph', `iswlower', `iswprint', `iswpunct', `iswspace', `iswupper',
20472 `iswxdigit', `towlower' and `towupper' are handled as built-in functions
20473 except in strict ISO C90 mode (`-ansi' or `-std=c89').
20475 The ISO C90 functions `abort', `abs', `acos', `asin', `atan2', `atan',
20476 `calloc', `ceil', `cosh', `cos', `exit', `exp', `fabs', `floor', `fmod',
20477 `fprintf', `fputs', `frexp', `fscanf', `isalnum', `isalpha', `iscntrl',
20478 `isdigit', `isgraph', `islower', `isprint', `ispunct', `isspace',
20479 `isupper', `isxdigit', `tolower', `toupper', `labs', `ldexp', `log10',
20480 `log', `malloc', `memcmp', `memcpy', `memset', `modf', `pow', `printf',
20481 `putchar', `puts', `scanf', `sinh', `sin', `snprintf', `sprintf',
20482 `sqrt', `sscanf', `strcat', `strchr', `strcmp', `strcpy', `strcspn',
20483 `strlen', `strncat', `strncmp', `strncpy', `strpbrk', `strrchr',
20484 `strspn', `strstr', `tanh', `tan', `vfprintf', `vprintf' and `vsprintf'
20485 are all recognized as built-in functions unless `-fno-builtin' is
20486 specified (or `-fno-builtin-FUNCTION' is specified for an individual
20487 function). All of these functions have corresponding versions prefixed
20490 GCC provides built-in versions of the ISO C99 floating point comparison
20491 macros that avoid raising exceptions for unordered operands. They have
20492 the same names as the standard macros ( `isgreater', `isgreaterequal',
20493 `isless', `islessequal', `islessgreater', and `isunordered') , with
20494 `__builtin_' prefixed. We intend for a library implementor to be able
20495 to simply `#define' each standard macro to its built-in equivalent.
20497 -- Built-in Function: int __builtin_types_compatible_p (TYPE1, TYPE2)
20498 You can use the built-in function `__builtin_types_compatible_p' to
20499 determine whether two types are the same.
20501 This built-in function returns 1 if the unqualified versions of the
20502 types TYPE1 and TYPE2 (which are types, not expressions) are
20503 compatible, 0 otherwise. The result of this built-in function can
20504 be used in integer constant expressions.
20506 This built-in function ignores top level qualifiers (e.g., `const',
20507 `volatile'). For example, `int' is equivalent to `const int'.
20509 The type `int[]' and `int[5]' are compatible. On the other hand,
20510 `int' and `char *' are not compatible, even if the size of their
20511 types, on the particular architecture are the same. Also, the
20512 amount of pointer indirection is taken into account when
20513 determining similarity. Consequently, `short *' is not similar to
20514 `short **'. Furthermore, two types that are typedefed are
20515 considered compatible if their underlying types are compatible.
20517 An `enum' type is not considered to be compatible with another
20518 `enum' type even if both are compatible with the same integer
20519 type; this is what the C standard specifies. For example, `enum
20520 {foo, bar}' is not similar to `enum {hot, dog}'.
20522 You would typically use this function in code whose execution
20523 varies depending on the arguments' types. For example:
20527 typeof (x) tmp = (x); \
20528 if (__builtin_types_compatible_p (typeof (x), long double)) \
20529 tmp = foo_long_double (tmp); \
20530 else if (__builtin_types_compatible_p (typeof (x), double)) \
20531 tmp = foo_double (tmp); \
20532 else if (__builtin_types_compatible_p (typeof (x), float)) \
20533 tmp = foo_float (tmp); \
20539 _Note:_ This construct is only available for C.
20542 -- Built-in Function: TYPE __builtin_choose_expr (CONST_EXP, EXP1,
20544 You can use the built-in function `__builtin_choose_expr' to
20545 evaluate code depending on the value of a constant expression.
20546 This built-in function returns EXP1 if CONST_EXP, which is a
20547 constant expression that must be able to be determined at compile
20548 time, is nonzero. Otherwise it returns 0.
20550 This built-in function is analogous to the `? :' operator in C,
20551 except that the expression returned has its type unaltered by
20552 promotion rules. Also, the built-in function does not evaluate
20553 the expression that was not chosen. For example, if CONST_EXP
20554 evaluates to true, EXP2 is not evaluated even if it has
20557 This built-in function can return an lvalue if the chosen argument
20560 If EXP1 is returned, the return type is the same as EXP1's type.
20561 Similarly, if EXP2 is returned, its return type is the same as
20567 __builtin_choose_expr ( \
20568 __builtin_types_compatible_p (typeof (x), double), \
20570 __builtin_choose_expr ( \
20571 __builtin_types_compatible_p (typeof (x), float), \
20573 /* The void expression results in a compile-time error \
20574 when assigning the result to something. */ \
20577 _Note:_ This construct is only available for C. Furthermore, the
20578 unused expression (EXP1 or EXP2 depending on the value of
20579 CONST_EXP) may still generate syntax errors. This may change in
20583 -- Built-in Function: int __builtin_constant_p (EXP)
20584 You can use the built-in function `__builtin_constant_p' to
20585 determine if a value is known to be constant at compile-time and
20586 hence that GCC can perform constant-folding on expressions
20587 involving that value. The argument of the function is the value
20588 to test. The function returns the integer 1 if the argument is
20589 known to be a compile-time constant and 0 if it is not known to be
20590 a compile-time constant. A return of 0 does not indicate that the
20591 value is _not_ a constant, but merely that GCC cannot prove it is
20592 a constant with the specified value of the `-O' option.
20594 You would typically use this function in an embedded application
20595 where memory was a critical resource. If you have some complex
20596 calculation, you may want it to be folded if it involves
20597 constants, but need to call a function if it does not. For
20600 #define Scale_Value(X) \
20601 (__builtin_constant_p (X) \
20602 ? ((X) * SCALE + OFFSET) : Scale (X))
20604 You may use this built-in function in either a macro or an inline
20605 function. However, if you use it in an inlined function and pass
20606 an argument of the function as the argument to the built-in, GCC
20607 will never return 1 when you call the inline function with a
20608 string constant or compound literal (*note Compound Literals::)
20609 and will not return 1 when you pass a constant numeric value to
20610 the inline function unless you specify the `-O' option.
20612 You may also use `__builtin_constant_p' in initializers for static
20613 data. For instance, you can write
20615 static const int table[] = {
20616 __builtin_constant_p (EXPRESSION) ? (EXPRESSION) : -1,
20620 This is an acceptable initializer even if EXPRESSION is not a
20621 constant expression. GCC must be more conservative about
20622 evaluating the built-in in this case, because it has no
20623 opportunity to perform optimization.
20625 Previous versions of GCC did not accept this built-in in data
20626 initializers. The earliest version where it is completely safe is
20629 -- Built-in Function: long __builtin_expect (long EXP, long C)
20630 You may use `__builtin_expect' to provide the compiler with branch
20631 prediction information. In general, you should prefer to use
20632 actual profile feedback for this (`-fprofile-arcs'), as
20633 programmers are notoriously bad at predicting how their programs
20634 actually perform. However, there are applications in which this
20635 data is hard to collect.
20637 The return value is the value of EXP, which should be an integral
20638 expression. The value of C must be a compile-time constant. The
20639 semantics of the built-in are that it is expected that EXP == C.
20642 if (__builtin_expect (x, 0))
20645 would indicate that we do not expect to call `foo', since we
20646 expect `x' to be zero. Since you are limited to integral
20647 expressions for EXP, you should use constructions such as
20649 if (__builtin_expect (ptr != NULL, 1))
20652 when testing pointer or floating-point values.
20654 -- Built-in Function: void __builtin_prefetch (const void *ADDR, ...)
20655 This function is used to minimize cache-miss latency by moving
20656 data into a cache before it is accessed. You can insert calls to
20657 `__builtin_prefetch' into code for which you know addresses of
20658 data in memory that is likely to be accessed soon. If the target
20659 supports them, data prefetch instructions will be generated. If
20660 the prefetch is done early enough before the access then the data
20661 will be in the cache by the time it is accessed.
20663 The value of ADDR is the address of the memory to prefetch. There
20664 are two optional arguments, RW and LOCALITY. The value of RW is a
20665 compile-time constant one or zero; one means that the prefetch is
20666 preparing for a write to the memory address and zero, the default,
20667 means that the prefetch is preparing for a read. The value
20668 LOCALITY must be a compile-time constant integer between zero and
20669 three. A value of zero means that the data has no temporal
20670 locality, so it need not be left in the cache after the access. A
20671 value of three means that the data has a high degree of temporal
20672 locality and should be left in all levels of cache possible.
20673 Values of one and two mean, respectively, a low or moderate degree
20674 of temporal locality. The default is three.
20676 for (i = 0; i < n; i++)
20678 a[i] = a[i] + b[i];
20679 __builtin_prefetch (&a[i+j], 1, 1);
20680 __builtin_prefetch (&b[i+j], 0, 1);
20684 Data prefetch does not generate faults if ADDR is invalid, but the
20685 address expression itself must be valid. For example, a prefetch
20686 of `p->next' will not fault if `p->next' is not a valid address,
20687 but evaluation will fault if `p' is not a valid address.
20689 If the target does not support data prefetch, the address
20690 expression is evaluated if it includes side effects but no other
20691 code is generated and GCC does not issue a warning.
20693 -- Built-in Function: double __builtin_huge_val (void)
20694 Returns a positive infinity, if supported by the floating-point
20695 format, else `DBL_MAX'. This function is suitable for
20696 implementing the ISO C macro `HUGE_VAL'.
20698 -- Built-in Function: float __builtin_huge_valf (void)
20699 Similar to `__builtin_huge_val', except the return type is `float'.
20701 -- Built-in Function: long double __builtin_huge_vall (void)
20702 Similar to `__builtin_huge_val', except the return type is `long
20705 -- Built-in Function: double __builtin_inf (void)
20706 Similar to `__builtin_huge_val', except a warning is generated if
20707 the target floating-point format does not support infinities.
20709 -- Built-in Function: _Decimal32 __builtin_infd32 (void)
20710 Similar to `__builtin_inf', except the return type is `_Decimal32'.
20712 -- Built-in Function: _Decimal64 __builtin_infd64 (void)
20713 Similar to `__builtin_inf', except the return type is `_Decimal64'.
20715 -- Built-in Function: _Decimal128 __builtin_infd128 (void)
20716 Similar to `__builtin_inf', except the return type is
20719 -- Built-in Function: float __builtin_inff (void)
20720 Similar to `__builtin_inf', except the return type is `float'.
20721 This function is suitable for implementing the ISO C99 macro
20724 -- Built-in Function: long double __builtin_infl (void)
20725 Similar to `__builtin_inf', except the return type is `long
20728 -- Built-in Function: double __builtin_nan (const char *str)
20729 This is an implementation of the ISO C99 function `nan'.
20731 Since ISO C99 defines this function in terms of `strtod', which we
20732 do not implement, a description of the parsing is in order. The
20733 string is parsed as by `strtol'; that is, the base is recognized by
20734 leading `0' or `0x' prefixes. The number parsed is placed in the
20735 significand such that the least significant bit of the number is
20736 at the least significant bit of the significand. The number is
20737 truncated to fit the significand field provided. The significand
20738 is forced to be a quiet NaN.
20740 This function, if given a string literal all of which would have
20741 been consumed by strtol, is evaluated early enough that it is
20742 considered a compile-time constant.
20744 -- Built-in Function: _Decimal32 __builtin_nand32 (const char *str)
20745 Similar to `__builtin_nan', except the return type is `_Decimal32'.
20747 -- Built-in Function: _Decimal64 __builtin_nand64 (const char *str)
20748 Similar to `__builtin_nan', except the return type is `_Decimal64'.
20750 -- Built-in Function: _Decimal128 __builtin_nand128 (const char *str)
20751 Similar to `__builtin_nan', except the return type is
20754 -- Built-in Function: float __builtin_nanf (const char *str)
20755 Similar to `__builtin_nan', except the return type is `float'.
20757 -- Built-in Function: long double __builtin_nanl (const char *str)
20758 Similar to `__builtin_nan', except the return type is `long
20761 -- Built-in Function: double __builtin_nans (const char *str)
20762 Similar to `__builtin_nan', except the significand is forced to be
20763 a signaling NaN. The `nans' function is proposed by WG14 N965.
20765 -- Built-in Function: float __builtin_nansf (const char *str)
20766 Similar to `__builtin_nans', except the return type is `float'.
20768 -- Built-in Function: long double __builtin_nansl (const char *str)
20769 Similar to `__builtin_nans', except the return type is `long
20772 -- Built-in Function: int __builtin_ffs (unsigned int x)
20773 Returns one plus the index of the least significant 1-bit of X, or
20774 if X is zero, returns zero.
20776 -- Built-in Function: int __builtin_clz (unsigned int x)
20777 Returns the number of leading 0-bits in X, starting at the most
20778 significant bit position. If X is 0, the result is undefined.
20780 -- Built-in Function: int __builtin_ctz (unsigned int x)
20781 Returns the number of trailing 0-bits in X, starting at the least
20782 significant bit position. If X is 0, the result is undefined.
20784 -- Built-in Function: int __builtin_popcount (unsigned int x)
20785 Returns the number of 1-bits in X.
20787 -- Built-in Function: int __builtin_parity (unsigned int x)
20788 Returns the parity of X, i.e. the number of 1-bits in X modulo 2.
20790 -- Built-in Function: int __builtin_ffsl (unsigned long)
20791 Similar to `__builtin_ffs', except the argument type is `unsigned
20794 -- Built-in Function: int __builtin_clzl (unsigned long)
20795 Similar to `__builtin_clz', except the argument type is `unsigned
20798 -- Built-in Function: int __builtin_ctzl (unsigned long)
20799 Similar to `__builtin_ctz', except the argument type is `unsigned
20802 -- Built-in Function: int __builtin_popcountl (unsigned long)
20803 Similar to `__builtin_popcount', except the argument type is
20806 -- Built-in Function: int __builtin_parityl (unsigned long)
20807 Similar to `__builtin_parity', except the argument type is
20810 -- Built-in Function: int __builtin_ffsll (unsigned long long)
20811 Similar to `__builtin_ffs', except the argument type is `unsigned
20814 -- Built-in Function: int __builtin_clzll (unsigned long long)
20815 Similar to `__builtin_clz', except the argument type is `unsigned
20818 -- Built-in Function: int __builtin_ctzll (unsigned long long)
20819 Similar to `__builtin_ctz', except the argument type is `unsigned
20822 -- Built-in Function: int __builtin_popcountll (unsigned long long)
20823 Similar to `__builtin_popcount', except the argument type is
20824 `unsigned long long'.
20826 -- Built-in Function: int __builtin_parityll (unsigned long long)
20827 Similar to `__builtin_parity', except the argument type is
20828 `unsigned long long'.
20830 -- Built-in Function: double __builtin_powi (double, int)
20831 Returns the first argument raised to the power of the second.
20832 Unlike the `pow' function no guarantees about precision and
20835 -- Built-in Function: float __builtin_powif (float, int)
20836 Similar to `__builtin_powi', except the argument and return types
20839 -- Built-in Function: long double __builtin_powil (long double, int)
20840 Similar to `__builtin_powi', except the argument and return types
20844 File: gcc.info, Node: Target Builtins, Next: Target Format Checks, Prev: Other Builtins, Up: C Extensions
20846 5.48 Built-in Functions Specific to Particular Target Machines
20847 ==============================================================
20849 On some target machines, GCC supports many built-in functions specific
20850 to those machines. Generally these generate calls to specific machine
20851 instructions, but allow the compiler to schedule those calls.
20855 * Alpha Built-in Functions::
20856 * ARM Built-in Functions::
20857 * Blackfin Built-in Functions::
20858 * FR-V Built-in Functions::
20859 * X86 Built-in Functions::
20860 * MIPS DSP Built-in Functions::
20861 * MIPS Paired-Single Support::
20862 * PowerPC AltiVec Built-in Functions::
20863 * SPARC VIS Built-in Functions::
20866 File: gcc.info, Node: Alpha Built-in Functions, Next: ARM Built-in Functions, Up: Target Builtins
20868 5.48.1 Alpha Built-in Functions
20869 -------------------------------
20871 These built-in functions are available for the Alpha family of
20872 processors, depending on the command-line switches used.
20874 The following built-in functions are always available. They all
20875 generate the machine instruction that is part of the name.
20877 long __builtin_alpha_implver (void)
20878 long __builtin_alpha_rpcc (void)
20879 long __builtin_alpha_amask (long)
20880 long __builtin_alpha_cmpbge (long, long)
20881 long __builtin_alpha_extbl (long, long)
20882 long __builtin_alpha_extwl (long, long)
20883 long __builtin_alpha_extll (long, long)
20884 long __builtin_alpha_extql (long, long)
20885 long __builtin_alpha_extwh (long, long)
20886 long __builtin_alpha_extlh (long, long)
20887 long __builtin_alpha_extqh (long, long)
20888 long __builtin_alpha_insbl (long, long)
20889 long __builtin_alpha_inswl (long, long)
20890 long __builtin_alpha_insll (long, long)
20891 long __builtin_alpha_insql (long, long)
20892 long __builtin_alpha_inswh (long, long)
20893 long __builtin_alpha_inslh (long, long)
20894 long __builtin_alpha_insqh (long, long)
20895 long __builtin_alpha_mskbl (long, long)
20896 long __builtin_alpha_mskwl (long, long)
20897 long __builtin_alpha_mskll (long, long)
20898 long __builtin_alpha_mskql (long, long)
20899 long __builtin_alpha_mskwh (long, long)
20900 long __builtin_alpha_msklh (long, long)
20901 long __builtin_alpha_mskqh (long, long)
20902 long __builtin_alpha_umulh (long, long)
20903 long __builtin_alpha_zap (long, long)
20904 long __builtin_alpha_zapnot (long, long)
20906 The following built-in functions are always with `-mmax' or
20907 `-mcpu=CPU' where CPU is `pca56' or later. They all generate the
20908 machine instruction that is part of the name.
20910 long __builtin_alpha_pklb (long)
20911 long __builtin_alpha_pkwb (long)
20912 long __builtin_alpha_unpkbl (long)
20913 long __builtin_alpha_unpkbw (long)
20914 long __builtin_alpha_minub8 (long, long)
20915 long __builtin_alpha_minsb8 (long, long)
20916 long __builtin_alpha_minuw4 (long, long)
20917 long __builtin_alpha_minsw4 (long, long)
20918 long __builtin_alpha_maxub8 (long, long)
20919 long __builtin_alpha_maxsb8 (long, long)
20920 long __builtin_alpha_maxuw4 (long, long)
20921 long __builtin_alpha_maxsw4 (long, long)
20922 long __builtin_alpha_perr (long, long)
20924 The following built-in functions are always with `-mcix' or
20925 `-mcpu=CPU' where CPU is `ev67' or later. They all generate the
20926 machine instruction that is part of the name.
20928 long __builtin_alpha_cttz (long)
20929 long __builtin_alpha_ctlz (long)
20930 long __builtin_alpha_ctpop (long)
20932 The following builtins are available on systems that use the OSF/1
20933 PALcode. Normally they invoke the `rduniq' and `wruniq' PAL calls, but
20934 when invoked with `-mtls-kernel', they invoke `rdval' and `wrval'.
20936 void *__builtin_thread_pointer (void)
20937 void __builtin_set_thread_pointer (void *)
20940 File: gcc.info, Node: ARM Built-in Functions, Next: Blackfin Built-in Functions, Prev: Alpha Built-in Functions, Up: Target Builtins
20942 5.48.2 ARM Built-in Functions
20943 -----------------------------
20945 These built-in functions are available for the ARM family of
20946 processors, when the `-mcpu=iwmmxt' switch is used:
20948 typedef int v2si __attribute__ ((vector_size (8)));
20949 typedef short v4hi __attribute__ ((vector_size (8)));
20950 typedef char v8qi __attribute__ ((vector_size (8)));
20952 int __builtin_arm_getwcx (int)
20953 void __builtin_arm_setwcx (int, int)
20954 int __builtin_arm_textrmsb (v8qi, int)
20955 int __builtin_arm_textrmsh (v4hi, int)
20956 int __builtin_arm_textrmsw (v2si, int)
20957 int __builtin_arm_textrmub (v8qi, int)
20958 int __builtin_arm_textrmuh (v4hi, int)
20959 int __builtin_arm_textrmuw (v2si, int)
20960 v8qi __builtin_arm_tinsrb (v8qi, int)
20961 v4hi __builtin_arm_tinsrh (v4hi, int)
20962 v2si __builtin_arm_tinsrw (v2si, int)
20963 long long __builtin_arm_tmia (long long, int, int)
20964 long long __builtin_arm_tmiabb (long long, int, int)
20965 long long __builtin_arm_tmiabt (long long, int, int)
20966 long long __builtin_arm_tmiaph (long long, int, int)
20967 long long __builtin_arm_tmiatb (long long, int, int)
20968 long long __builtin_arm_tmiatt (long long, int, int)
20969 int __builtin_arm_tmovmskb (v8qi)
20970 int __builtin_arm_tmovmskh (v4hi)
20971 int __builtin_arm_tmovmskw (v2si)
20972 long long __builtin_arm_waccb (v8qi)
20973 long long __builtin_arm_wacch (v4hi)
20974 long long __builtin_arm_waccw (v2si)
20975 v8qi __builtin_arm_waddb (v8qi, v8qi)
20976 v8qi __builtin_arm_waddbss (v8qi, v8qi)
20977 v8qi __builtin_arm_waddbus (v8qi, v8qi)
20978 v4hi __builtin_arm_waddh (v4hi, v4hi)
20979 v4hi __builtin_arm_waddhss (v4hi, v4hi)
20980 v4hi __builtin_arm_waddhus (v4hi, v4hi)
20981 v2si __builtin_arm_waddw (v2si, v2si)
20982 v2si __builtin_arm_waddwss (v2si, v2si)
20983 v2si __builtin_arm_waddwus (v2si, v2si)
20984 v8qi __builtin_arm_walign (v8qi, v8qi, int)
20985 long long __builtin_arm_wand(long long, long long)
20986 long long __builtin_arm_wandn (long long, long long)
20987 v8qi __builtin_arm_wavg2b (v8qi, v8qi)
20988 v8qi __builtin_arm_wavg2br (v8qi, v8qi)
20989 v4hi __builtin_arm_wavg2h (v4hi, v4hi)
20990 v4hi __builtin_arm_wavg2hr (v4hi, v4hi)
20991 v8qi __builtin_arm_wcmpeqb (v8qi, v8qi)
20992 v4hi __builtin_arm_wcmpeqh (v4hi, v4hi)
20993 v2si __builtin_arm_wcmpeqw (v2si, v2si)
20994 v8qi __builtin_arm_wcmpgtsb (v8qi, v8qi)
20995 v4hi __builtin_arm_wcmpgtsh (v4hi, v4hi)
20996 v2si __builtin_arm_wcmpgtsw (v2si, v2si)
20997 v8qi __builtin_arm_wcmpgtub (v8qi, v8qi)
20998 v4hi __builtin_arm_wcmpgtuh (v4hi, v4hi)
20999 v2si __builtin_arm_wcmpgtuw (v2si, v2si)
21000 long long __builtin_arm_wmacs (long long, v4hi, v4hi)
21001 long long __builtin_arm_wmacsz (v4hi, v4hi)
21002 long long __builtin_arm_wmacu (long long, v4hi, v4hi)
21003 long long __builtin_arm_wmacuz (v4hi, v4hi)
21004 v4hi __builtin_arm_wmadds (v4hi, v4hi)
21005 v4hi __builtin_arm_wmaddu (v4hi, v4hi)
21006 v8qi __builtin_arm_wmaxsb (v8qi, v8qi)
21007 v4hi __builtin_arm_wmaxsh (v4hi, v4hi)
21008 v2si __builtin_arm_wmaxsw (v2si, v2si)
21009 v8qi __builtin_arm_wmaxub (v8qi, v8qi)
21010 v4hi __builtin_arm_wmaxuh (v4hi, v4hi)
21011 v2si __builtin_arm_wmaxuw (v2si, v2si)
21012 v8qi __builtin_arm_wminsb (v8qi, v8qi)
21013 v4hi __builtin_arm_wminsh (v4hi, v4hi)
21014 v2si __builtin_arm_wminsw (v2si, v2si)
21015 v8qi __builtin_arm_wminub (v8qi, v8qi)
21016 v4hi __builtin_arm_wminuh (v4hi, v4hi)
21017 v2si __builtin_arm_wminuw (v2si, v2si)
21018 v4hi __builtin_arm_wmulsm (v4hi, v4hi)
21019 v4hi __builtin_arm_wmulul (v4hi, v4hi)
21020 v4hi __builtin_arm_wmulum (v4hi, v4hi)
21021 long long __builtin_arm_wor (long long, long long)
21022 v2si __builtin_arm_wpackdss (long long, long long)
21023 v2si __builtin_arm_wpackdus (long long, long long)
21024 v8qi __builtin_arm_wpackhss (v4hi, v4hi)
21025 v8qi __builtin_arm_wpackhus (v4hi, v4hi)
21026 v4hi __builtin_arm_wpackwss (v2si, v2si)
21027 v4hi __builtin_arm_wpackwus (v2si, v2si)
21028 long long __builtin_arm_wrord (long long, long long)
21029 long long __builtin_arm_wrordi (long long, int)
21030 v4hi __builtin_arm_wrorh (v4hi, long long)
21031 v4hi __builtin_arm_wrorhi (v4hi, int)
21032 v2si __builtin_arm_wrorw (v2si, long long)
21033 v2si __builtin_arm_wrorwi (v2si, int)
21034 v2si __builtin_arm_wsadb (v8qi, v8qi)
21035 v2si __builtin_arm_wsadbz (v8qi, v8qi)
21036 v2si __builtin_arm_wsadh (v4hi, v4hi)
21037 v2si __builtin_arm_wsadhz (v4hi, v4hi)
21038 v4hi __builtin_arm_wshufh (v4hi, int)
21039 long long __builtin_arm_wslld (long long, long long)
21040 long long __builtin_arm_wslldi (long long, int)
21041 v4hi __builtin_arm_wsllh (v4hi, long long)
21042 v4hi __builtin_arm_wsllhi (v4hi, int)
21043 v2si __builtin_arm_wsllw (v2si, long long)
21044 v2si __builtin_arm_wsllwi (v2si, int)
21045 long long __builtin_arm_wsrad (long long, long long)
21046 long long __builtin_arm_wsradi (long long, int)
21047 v4hi __builtin_arm_wsrah (v4hi, long long)
21048 v4hi __builtin_arm_wsrahi (v4hi, int)
21049 v2si __builtin_arm_wsraw (v2si, long long)
21050 v2si __builtin_arm_wsrawi (v2si, int)
21051 long long __builtin_arm_wsrld (long long, long long)
21052 long long __builtin_arm_wsrldi (long long, int)
21053 v4hi __builtin_arm_wsrlh (v4hi, long long)
21054 v4hi __builtin_arm_wsrlhi (v4hi, int)
21055 v2si __builtin_arm_wsrlw (v2si, long long)
21056 v2si __builtin_arm_wsrlwi (v2si, int)
21057 v8qi __builtin_arm_wsubb (v8qi, v8qi)
21058 v8qi __builtin_arm_wsubbss (v8qi, v8qi)
21059 v8qi __builtin_arm_wsubbus (v8qi, v8qi)
21060 v4hi __builtin_arm_wsubh (v4hi, v4hi)
21061 v4hi __builtin_arm_wsubhss (v4hi, v4hi)
21062 v4hi __builtin_arm_wsubhus (v4hi, v4hi)
21063 v2si __builtin_arm_wsubw (v2si, v2si)
21064 v2si __builtin_arm_wsubwss (v2si, v2si)
21065 v2si __builtin_arm_wsubwus (v2si, v2si)
21066 v4hi __builtin_arm_wunpckehsb (v8qi)
21067 v2si __builtin_arm_wunpckehsh (v4hi)
21068 long long __builtin_arm_wunpckehsw (v2si)
21069 v4hi __builtin_arm_wunpckehub (v8qi)
21070 v2si __builtin_arm_wunpckehuh (v4hi)
21071 long long __builtin_arm_wunpckehuw (v2si)
21072 v4hi __builtin_arm_wunpckelsb (v8qi)
21073 v2si __builtin_arm_wunpckelsh (v4hi)
21074 long long __builtin_arm_wunpckelsw (v2si)
21075 v4hi __builtin_arm_wunpckelub (v8qi)
21076 v2si __builtin_arm_wunpckeluh (v4hi)
21077 long long __builtin_arm_wunpckeluw (v2si)
21078 v8qi __builtin_arm_wunpckihb (v8qi, v8qi)
21079 v4hi __builtin_arm_wunpckihh (v4hi, v4hi)
21080 v2si __builtin_arm_wunpckihw (v2si, v2si)
21081 v8qi __builtin_arm_wunpckilb (v8qi, v8qi)
21082 v4hi __builtin_arm_wunpckilh (v4hi, v4hi)
21083 v2si __builtin_arm_wunpckilw (v2si, v2si)
21084 long long __builtin_arm_wxor (long long, long long)
21085 long long __builtin_arm_wzero ()
21088 File: gcc.info, Node: Blackfin Built-in Functions, Next: FR-V Built-in Functions, Prev: ARM Built-in Functions, Up: Target Builtins
21090 5.48.3 Blackfin Built-in Functions
21091 ----------------------------------
21093 Currently, there are two Blackfin-specific built-in functions. These
21094 are used for generating `CSYNC' and `SSYNC' machine insns without using
21095 inline assembly; by using these built-in functions the compiler can
21096 automatically add workarounds for hardware errata involving these
21097 instructions. These functions are named as follows:
21099 void __builtin_bfin_csync (void)
21100 void __builtin_bfin_ssync (void)
21103 File: gcc.info, Node: FR-V Built-in Functions, Next: X86 Built-in Functions, Prev: Blackfin Built-in Functions, Up: Target Builtins
21105 5.48.4 FR-V Built-in Functions
21106 ------------------------------
21108 GCC provides many FR-V-specific built-in functions. In general, these
21109 functions are intended to be compatible with those described by `FR-V
21110 Family, Softune C/C++ Compiler Manual (V6), Fujitsu Semiconductor'.
21111 The two exceptions are `__MDUNPACKH' and `__MBTOHE', the gcc forms of
21112 which pass 128-bit values by pointer rather than by value.
21114 Most of the functions are named after specific FR-V instructions.
21115 Such functions are said to be "directly mapped" and are summarized here
21121 * Directly-mapped Integer Functions::
21122 * Directly-mapped Media Functions::
21123 * Raw read/write Functions::
21124 * Other Built-in Functions::
21127 File: gcc.info, Node: Argument Types, Next: Directly-mapped Integer Functions, Up: FR-V Built-in Functions
21129 5.48.4.1 Argument Types
21130 .......................
21132 The arguments to the built-in functions can be divided into three
21133 groups: register numbers, compile-time constants and run-time values.
21134 In order to make this classification clear at a glance, the arguments
21135 and return values are given the following pseudo types:
21137 Pseudo type Real C type Constant? Description
21138 `uh' `unsigned short' No an unsigned halfword
21139 `uw1' `unsigned int' No an unsigned word
21140 `sw1' `int' No a signed word
21141 `uw2' `unsigned long long' No an unsigned doubleword
21142 `sw2' `long long' No a signed doubleword
21143 `const' `int' Yes an integer constant
21144 `acc' `int' Yes an ACC register number
21145 `iacc' `int' Yes an IACC register number
21147 These pseudo types are not defined by GCC, they are simply a notational
21148 convenience used in this manual.
21150 Arguments of type `uh', `uw1', `sw1', `uw2' and `sw2' are evaluated at
21151 run time. They correspond to register operands in the underlying FR-V
21154 `const' arguments represent immediate operands in the underlying FR-V
21155 instructions. They must be compile-time constants.
21157 `acc' arguments are evaluated at compile time and specify the number
21158 of an accumulator register. For example, an `acc' argument of 2 will
21159 select the ACC2 register.
21161 `iacc' arguments are similar to `acc' arguments but specify the number
21162 of an IACC register. See *note Other Built-in Functions:: for more
21166 File: gcc.info, Node: Directly-mapped Integer Functions, Next: Directly-mapped Media Functions, Prev: Argument Types, Up: FR-V Built-in Functions
21168 5.48.4.2 Directly-mapped Integer Functions
21169 ..........................................
21171 The functions listed below map directly to FR-V I-type instructions.
21173 Function prototype Example usage Assembly output
21174 `sw1 __ADDSS (sw1, sw1)' `C = __ADDSS (A, B)' `ADDSS A,B,C'
21175 `sw1 __SCAN (sw1, sw1)' `C = __SCAN (A, B)' `SCAN A,B,C'
21176 `sw1 __SCUTSS (sw1)' `B = __SCUTSS (A)' `SCUTSS A,B'
21177 `sw1 __SLASS (sw1, sw1)' `C = __SLASS (A, B)' `SLASS A,B,C'
21178 `void __SMASS (sw1, sw1)' `__SMASS (A, B)' `SMASS A,B'
21179 `void __SMSSS (sw1, sw1)' `__SMSSS (A, B)' `SMSSS A,B'
21180 `void __SMU (sw1, sw1)' `__SMU (A, B)' `SMU A,B'
21181 `sw2 __SMUL (sw1, sw1)' `C = __SMUL (A, B)' `SMUL A,B,C'
21182 `sw1 __SUBSS (sw1, sw1)' `C = __SUBSS (A, B)' `SUBSS A,B,C'
21183 `uw2 __UMUL (uw1, uw1)' `C = __UMUL (A, B)' `UMUL A,B,C'
21186 File: gcc.info, Node: Directly-mapped Media Functions, Next: Raw read/write Functions, Prev: Directly-mapped Integer Functions, Up: FR-V Built-in Functions
21188 5.48.4.3 Directly-mapped Media Functions
21189 ........................................
21191 The functions listed below map directly to FR-V M-type instructions.
21193 Function prototype Example usage Assembly output
21194 `uw1 __MABSHS (sw1)' `B = __MABSHS (A)' `MABSHS A,B'
21195 `void __MADDACCS (acc, acc)' `__MADDACCS (B, A)' `MADDACCS A,B'
21196 `sw1 __MADDHSS (sw1, sw1)' `C = __MADDHSS (A, B)' `MADDHSS A,B,C'
21197 `uw1 __MADDHUS (uw1, uw1)' `C = __MADDHUS (A, B)' `MADDHUS A,B,C'
21198 `uw1 __MAND (uw1, uw1)' `C = __MAND (A, B)' `MAND A,B,C'
21199 `void __MASACCS (acc, acc)' `__MASACCS (B, A)' `MASACCS A,B'
21200 `uw1 __MAVEH (uw1, uw1)' `C = __MAVEH (A, B)' `MAVEH A,B,C'
21201 `uw2 __MBTOH (uw1)' `B = __MBTOH (A)' `MBTOH A,B'
21202 `void __MBTOHE (uw1 *, uw1)' `__MBTOHE (&B, A)' `MBTOHE A,B'
21203 `void __MCLRACC (acc)' `__MCLRACC (A)' `MCLRACC A'
21204 `void __MCLRACCA (void)' `__MCLRACCA ()' `MCLRACCA'
21205 `uw1 __Mcop1 (uw1, uw1)' `C = __Mcop1 (A, B)' `Mcop1 A,B,C'
21206 `uw1 __Mcop2 (uw1, uw1)' `C = __Mcop2 (A, B)' `Mcop2 A,B,C'
21207 `uw1 __MCPLHI (uw2, const)' `C = __MCPLHI (A, B)' `MCPLHI A,#B,C'
21208 `uw1 __MCPLI (uw2, const)' `C = __MCPLI (A, B)' `MCPLI A,#B,C'
21209 `void __MCPXIS (acc, sw1, sw1)' `__MCPXIS (C, A, B)' `MCPXIS A,B,C'
21210 `void __MCPXIU (acc, uw1, uw1)' `__MCPXIU (C, A, B)' `MCPXIU A,B,C'
21211 `void __MCPXRS (acc, sw1, sw1)' `__MCPXRS (C, A, B)' `MCPXRS A,B,C'
21212 `void __MCPXRU (acc, uw1, uw1)' `__MCPXRU (C, A, B)' `MCPXRU A,B,C'
21213 `uw1 __MCUT (acc, uw1)' `C = __MCUT (A, B)' `MCUT A,B,C'
21214 `uw1 __MCUTSS (acc, sw1)' `C = __MCUTSS (A, B)' `MCUTSS A,B,C'
21215 `void __MDADDACCS (acc, acc)' `__MDADDACCS (B, A)' `MDADDACCS A,B'
21216 `void __MDASACCS (acc, acc)' `__MDASACCS (B, A)' `MDASACCS A,B'
21217 `uw2 __MDCUTSSI (acc, const)' `C = __MDCUTSSI (A, B)' `MDCUTSSI A,#B,C'
21218 `uw2 __MDPACKH (uw2, uw2)' `C = __MDPACKH (A, B)' `MDPACKH A,B,C'
21219 `uw2 __MDROTLI (uw2, const)' `C = __MDROTLI (A, B)' `MDROTLI A,#B,C'
21220 `void __MDSUBACCS (acc, acc)' `__MDSUBACCS (B, A)' `MDSUBACCS A,B'
21221 `void __MDUNPACKH (uw1 *, uw2)' `__MDUNPACKH (&B, A)' `MDUNPACKH A,B'
21222 `uw2 __MEXPDHD (uw1, const)' `C = __MEXPDHD (A, B)' `MEXPDHD A,#B,C'
21223 `uw1 __MEXPDHW (uw1, const)' `C = __MEXPDHW (A, B)' `MEXPDHW A,#B,C'
21224 `uw1 __MHDSETH (uw1, const)' `C = __MHDSETH (A, B)' `MHDSETH A,#B,C'
21225 `sw1 __MHDSETS (const)' `B = __MHDSETS (A)' `MHDSETS #A,B'
21226 `uw1 __MHSETHIH (uw1, const)' `B = __MHSETHIH (B, A)' `MHSETHIH #A,B'
21227 `sw1 __MHSETHIS (sw1, const)' `B = __MHSETHIS (B, A)' `MHSETHIS #A,B'
21228 `uw1 __MHSETLOH (uw1, const)' `B = __MHSETLOH (B, A)' `MHSETLOH #A,B'
21229 `sw1 __MHSETLOS (sw1, const)' `B = __MHSETLOS (B, A)' `MHSETLOS #A,B'
21230 `uw1 __MHTOB (uw2)' `B = __MHTOB (A)' `MHTOB A,B'
21231 `void __MMACHS (acc, sw1, sw1)' `__MMACHS (C, A, B)' `MMACHS A,B,C'
21232 `void __MMACHU (acc, uw1, uw1)' `__MMACHU (C, A, B)' `MMACHU A,B,C'
21233 `void __MMRDHS (acc, sw1, sw1)' `__MMRDHS (C, A, B)' `MMRDHS A,B,C'
21234 `void __MMRDHU (acc, uw1, uw1)' `__MMRDHU (C, A, B)' `MMRDHU A,B,C'
21235 `void __MMULHS (acc, sw1, sw1)' `__MMULHS (C, A, B)' `MMULHS A,B,C'
21236 `void __MMULHU (acc, uw1, uw1)' `__MMULHU (C, A, B)' `MMULHU A,B,C'
21237 `void __MMULXHS (acc, sw1, sw1)' `__MMULXHS (C, A, B)' `MMULXHS A,B,C'
21238 `void __MMULXHU (acc, uw1, uw1)' `__MMULXHU (C, A, B)' `MMULXHU A,B,C'
21239 `uw1 __MNOT (uw1)' `B = __MNOT (A)' `MNOT A,B'
21240 `uw1 __MOR (uw1, uw1)' `C = __MOR (A, B)' `MOR A,B,C'
21241 `uw1 __MPACKH (uh, uh)' `C = __MPACKH (A, B)' `MPACKH A,B,C'
21242 `sw2 __MQADDHSS (sw2, sw2)' `C = __MQADDHSS (A, B)' `MQADDHSS A,B,C'
21243 `uw2 __MQADDHUS (uw2, uw2)' `C = __MQADDHUS (A, B)' `MQADDHUS A,B,C'
21244 `void __MQCPXIS (acc, sw2, sw2)' `__MQCPXIS (C, A, B)' `MQCPXIS A,B,C'
21245 `void __MQCPXIU (acc, uw2, uw2)' `__MQCPXIU (C, A, B)' `MQCPXIU A,B,C'
21246 `void __MQCPXRS (acc, sw2, sw2)' `__MQCPXRS (C, A, B)' `MQCPXRS A,B,C'
21247 `void __MQCPXRU (acc, uw2, uw2)' `__MQCPXRU (C, A, B)' `MQCPXRU A,B,C'
21248 `sw2 __MQLCLRHS (sw2, sw2)' `C = __MQLCLRHS (A, B)' `MQLCLRHS A,B,C'
21249 `sw2 __MQLMTHS (sw2, sw2)' `C = __MQLMTHS (A, B)' `MQLMTHS A,B,C'
21250 `void __MQMACHS (acc, sw2, sw2)' `__MQMACHS (C, A, B)' `MQMACHS A,B,C'
21251 `void __MQMACHU (acc, uw2, uw2)' `__MQMACHU (C, A, B)' `MQMACHU A,B,C'
21252 `void __MQMACXHS (acc, sw2, `__MQMACXHS (C, A, B)' `MQMACXHS A,B,C'
21254 `void __MQMULHS (acc, sw2, sw2)' `__MQMULHS (C, A, B)' `MQMULHS A,B,C'
21255 `void __MQMULHU (acc, uw2, uw2)' `__MQMULHU (C, A, B)' `MQMULHU A,B,C'
21256 `void __MQMULXHS (acc, sw2, `__MQMULXHS (C, A, B)' `MQMULXHS A,B,C'
21258 `void __MQMULXHU (acc, uw2, `__MQMULXHU (C, A, B)' `MQMULXHU A,B,C'
21260 `sw2 __MQSATHS (sw2, sw2)' `C = __MQSATHS (A, B)' `MQSATHS A,B,C'
21261 `uw2 __MQSLLHI (uw2, int)' `C = __MQSLLHI (A, B)' `MQSLLHI A,B,C'
21262 `sw2 __MQSRAHI (sw2, int)' `C = __MQSRAHI (A, B)' `MQSRAHI A,B,C'
21263 `sw2 __MQSUBHSS (sw2, sw2)' `C = __MQSUBHSS (A, B)' `MQSUBHSS A,B,C'
21264 `uw2 __MQSUBHUS (uw2, uw2)' `C = __MQSUBHUS (A, B)' `MQSUBHUS A,B,C'
21265 `void __MQXMACHS (acc, sw2, `__MQXMACHS (C, A, B)' `MQXMACHS A,B,C'
21267 `void __MQXMACXHS (acc, sw2, `__MQXMACXHS (C, A, B)' `MQXMACXHS A,B,C'
21269 `uw1 __MRDACC (acc)' `B = __MRDACC (A)' `MRDACC A,B'
21270 `uw1 __MRDACCG (acc)' `B = __MRDACCG (A)' `MRDACCG A,B'
21271 `uw1 __MROTLI (uw1, const)' `C = __MROTLI (A, B)' `MROTLI A,#B,C'
21272 `uw1 __MROTRI (uw1, const)' `C = __MROTRI (A, B)' `MROTRI A,#B,C'
21273 `sw1 __MSATHS (sw1, sw1)' `C = __MSATHS (A, B)' `MSATHS A,B,C'
21274 `uw1 __MSATHU (uw1, uw1)' `C = __MSATHU (A, B)' `MSATHU A,B,C'
21275 `uw1 __MSLLHI (uw1, const)' `C = __MSLLHI (A, B)' `MSLLHI A,#B,C'
21276 `sw1 __MSRAHI (sw1, const)' `C = __MSRAHI (A, B)' `MSRAHI A,#B,C'
21277 `uw1 __MSRLHI (uw1, const)' `C = __MSRLHI (A, B)' `MSRLHI A,#B,C'
21278 `void __MSUBACCS (acc, acc)' `__MSUBACCS (B, A)' `MSUBACCS A,B'
21279 `sw1 __MSUBHSS (sw1, sw1)' `C = __MSUBHSS (A, B)' `MSUBHSS A,B,C'
21280 `uw1 __MSUBHUS (uw1, uw1)' `C = __MSUBHUS (A, B)' `MSUBHUS A,B,C'
21281 `void __MTRAP (void)' `__MTRAP ()' `MTRAP'
21282 `uw2 __MUNPACKH (uw1)' `B = __MUNPACKH (A)' `MUNPACKH A,B'
21283 `uw1 __MWCUT (uw2, uw1)' `C = __MWCUT (A, B)' `MWCUT A,B,C'
21284 `void __MWTACC (acc, uw1)' `__MWTACC (B, A)' `MWTACC A,B'
21285 `void __MWTACCG (acc, uw1)' `__MWTACCG (B, A)' `MWTACCG A,B'
21286 `uw1 __MXOR (uw1, uw1)' `C = __MXOR (A, B)' `MXOR A,B,C'
21289 File: gcc.info, Node: Raw read/write Functions, Next: Other Built-in Functions, Prev: Directly-mapped Media Functions, Up: FR-V Built-in Functions
21291 5.48.4.4 Raw read/write Functions
21292 .................................
21294 This sections describes built-in functions related to read and write
21295 instructions to access memory. These functions generate `membar'
21296 instructions to flush the I/O load and stores where appropriate, as
21297 described in Fujitsu's manual described above.
21299 `unsigned char __builtin_read8 (void *DATA)'
21301 `unsigned short __builtin_read16 (void *DATA)'
21303 `unsigned long __builtin_read32 (void *DATA)'
21305 `unsigned long long __builtin_read64 (void *DATA)'
21307 `void __builtin_write8 (void *DATA, unsigned char DATUM)'
21309 `void __builtin_write16 (void *DATA, unsigned short DATUM)'
21311 `void __builtin_write32 (void *DATA, unsigned long DATUM)'
21313 `void __builtin_write64 (void *DATA, unsigned long long DATUM)'
21316 File: gcc.info, Node: Other Built-in Functions, Prev: Raw read/write Functions, Up: FR-V Built-in Functions
21318 5.48.4.5 Other Built-in Functions
21319 .................................
21321 This section describes built-in functions that are not named after a
21322 specific FR-V instruction.
21324 `sw2 __IACCreadll (iacc REG)'
21325 Return the full 64-bit value of IACC0. The REG argument is
21326 reserved for future expansion and must be 0.
21328 `sw1 __IACCreadl (iacc REG)'
21329 Return the value of IACC0H if REG is 0 and IACC0L if REG is 1.
21330 Other values of REG are rejected as invalid.
21332 `void __IACCsetll (iacc REG, sw2 X)'
21333 Set the full 64-bit value of IACC0 to X. The REG argument is
21334 reserved for future expansion and must be 0.
21336 `void __IACCsetl (iacc REG, sw1 X)'
21337 Set IACC0H to X if REG is 0 and IACC0L to X if REG is 1. Other
21338 values of REG are rejected as invalid.
21340 `void __data_prefetch0 (const void *X)'
21341 Use the `dcpl' instruction to load the contents of address X into
21344 `void __data_prefetch (const void *X)'
21345 Use the `nldub' instruction to load the contents of address X into
21346 the data cache. The instruction will be issued in slot I1.
21349 File: gcc.info, Node: X86 Built-in Functions, Next: MIPS DSP Built-in Functions, Prev: FR-V Built-in Functions, Up: Target Builtins
21351 5.48.5 X86 Built-in Functions
21352 -----------------------------
21354 These built-in functions are available for the i386 and x86-64 family
21355 of computers, depending on the command-line switches used.
21357 Note that, if you specify command-line switches such as `-msse', the
21358 compiler could use the extended instruction sets even if the built-ins
21359 are not used explicitly in the program. For this reason, applications
21360 which perform runtime CPU detection must compile separate files for each
21361 supported architecture, using the appropriate flags. In particular,
21362 the file containing the CPU detection code should be compiled without
21365 The following machine modes are available for use with MMX built-in
21366 functions (*note Vector Extensions::): `V2SI' for a vector of two
21367 32-bit integers, `V4HI' for a vector of four 16-bit integers, and
21368 `V8QI' for a vector of eight 8-bit integers. Some of the built-in
21369 functions operate on MMX registers as a whole 64-bit entity, these use
21370 `DI' as their mode.
21372 If 3Dnow extensions are enabled, `V2SF' is used as a mode for a vector
21373 of two 32-bit floating point values.
21375 If SSE extensions are enabled, `V4SF' is used for a vector of four
21376 32-bit floating point values. Some instructions use a vector of four
21377 32-bit integers, these use `V4SI'. Finally, some instructions operate
21378 on an entire vector register, interpreting it as a 128-bit integer,
21379 these use mode `TI'.
21381 The following built-in functions are made available by `-mmmx'. All
21382 of them generate the machine instruction that is part of the name.
21384 v8qi __builtin_ia32_paddb (v8qi, v8qi)
21385 v4hi __builtin_ia32_paddw (v4hi, v4hi)
21386 v2si __builtin_ia32_paddd (v2si, v2si)
21387 v8qi __builtin_ia32_psubb (v8qi, v8qi)
21388 v4hi __builtin_ia32_psubw (v4hi, v4hi)
21389 v2si __builtin_ia32_psubd (v2si, v2si)
21390 v8qi __builtin_ia32_paddsb (v8qi, v8qi)
21391 v4hi __builtin_ia32_paddsw (v4hi, v4hi)
21392 v8qi __builtin_ia32_psubsb (v8qi, v8qi)
21393 v4hi __builtin_ia32_psubsw (v4hi, v4hi)
21394 v8qi __builtin_ia32_paddusb (v8qi, v8qi)
21395 v4hi __builtin_ia32_paddusw (v4hi, v4hi)
21396 v8qi __builtin_ia32_psubusb (v8qi, v8qi)
21397 v4hi __builtin_ia32_psubusw (v4hi, v4hi)
21398 v4hi __builtin_ia32_pmullw (v4hi, v4hi)
21399 v4hi __builtin_ia32_pmulhw (v4hi, v4hi)
21400 di __builtin_ia32_pand (di, di)
21401 di __builtin_ia32_pandn (di,di)
21402 di __builtin_ia32_por (di, di)
21403 di __builtin_ia32_pxor (di, di)
21404 v8qi __builtin_ia32_pcmpeqb (v8qi, v8qi)
21405 v4hi __builtin_ia32_pcmpeqw (v4hi, v4hi)
21406 v2si __builtin_ia32_pcmpeqd (v2si, v2si)
21407 v8qi __builtin_ia32_pcmpgtb (v8qi, v8qi)
21408 v4hi __builtin_ia32_pcmpgtw (v4hi, v4hi)
21409 v2si __builtin_ia32_pcmpgtd (v2si, v2si)
21410 v8qi __builtin_ia32_punpckhbw (v8qi, v8qi)
21411 v4hi __builtin_ia32_punpckhwd (v4hi, v4hi)
21412 v2si __builtin_ia32_punpckhdq (v2si, v2si)
21413 v8qi __builtin_ia32_punpcklbw (v8qi, v8qi)
21414 v4hi __builtin_ia32_punpcklwd (v4hi, v4hi)
21415 v2si __builtin_ia32_punpckldq (v2si, v2si)
21416 v8qi __builtin_ia32_packsswb (v4hi, v4hi)
21417 v4hi __builtin_ia32_packssdw (v2si, v2si)
21418 v8qi __builtin_ia32_packuswb (v4hi, v4hi)
21420 The following built-in functions are made available either with
21421 `-msse', or with a combination of `-m3dnow' and `-march=athlon'. All
21422 of them generate the machine instruction that is part of the name.
21424 v4hi __builtin_ia32_pmulhuw (v4hi, v4hi)
21425 v8qi __builtin_ia32_pavgb (v8qi, v8qi)
21426 v4hi __builtin_ia32_pavgw (v4hi, v4hi)
21427 v4hi __builtin_ia32_psadbw (v8qi, v8qi)
21428 v8qi __builtin_ia32_pmaxub (v8qi, v8qi)
21429 v4hi __builtin_ia32_pmaxsw (v4hi, v4hi)
21430 v8qi __builtin_ia32_pminub (v8qi, v8qi)
21431 v4hi __builtin_ia32_pminsw (v4hi, v4hi)
21432 int __builtin_ia32_pextrw (v4hi, int)
21433 v4hi __builtin_ia32_pinsrw (v4hi, int, int)
21434 int __builtin_ia32_pmovmskb (v8qi)
21435 void __builtin_ia32_maskmovq (v8qi, v8qi, char *)
21436 void __builtin_ia32_movntq (di *, di)
21437 void __builtin_ia32_sfence (void)
21439 The following built-in functions are available when `-msse' is used.
21440 All of them generate the machine instruction that is part of the name.
21442 int __builtin_ia32_comieq (v4sf, v4sf)
21443 int __builtin_ia32_comineq (v4sf, v4sf)
21444 int __builtin_ia32_comilt (v4sf, v4sf)
21445 int __builtin_ia32_comile (v4sf, v4sf)
21446 int __builtin_ia32_comigt (v4sf, v4sf)
21447 int __builtin_ia32_comige (v4sf, v4sf)
21448 int __builtin_ia32_ucomieq (v4sf, v4sf)
21449 int __builtin_ia32_ucomineq (v4sf, v4sf)
21450 int __builtin_ia32_ucomilt (v4sf, v4sf)
21451 int __builtin_ia32_ucomile (v4sf, v4sf)
21452 int __builtin_ia32_ucomigt (v4sf, v4sf)
21453 int __builtin_ia32_ucomige (v4sf, v4sf)
21454 v4sf __builtin_ia32_addps (v4sf, v4sf)
21455 v4sf __builtin_ia32_subps (v4sf, v4sf)
21456 v4sf __builtin_ia32_mulps (v4sf, v4sf)
21457 v4sf __builtin_ia32_divps (v4sf, v4sf)
21458 v4sf __builtin_ia32_addss (v4sf, v4sf)
21459 v4sf __builtin_ia32_subss (v4sf, v4sf)
21460 v4sf __builtin_ia32_mulss (v4sf, v4sf)
21461 v4sf __builtin_ia32_divss (v4sf, v4sf)
21462 v4si __builtin_ia32_cmpeqps (v4sf, v4sf)
21463 v4si __builtin_ia32_cmpltps (v4sf, v4sf)
21464 v4si __builtin_ia32_cmpleps (v4sf, v4sf)
21465 v4si __builtin_ia32_cmpgtps (v4sf, v4sf)
21466 v4si __builtin_ia32_cmpgeps (v4sf, v4sf)
21467 v4si __builtin_ia32_cmpunordps (v4sf, v4sf)
21468 v4si __builtin_ia32_cmpneqps (v4sf, v4sf)
21469 v4si __builtin_ia32_cmpnltps (v4sf, v4sf)
21470 v4si __builtin_ia32_cmpnleps (v4sf, v4sf)
21471 v4si __builtin_ia32_cmpngtps (v4sf, v4sf)
21472 v4si __builtin_ia32_cmpngeps (v4sf, v4sf)
21473 v4si __builtin_ia32_cmpordps (v4sf, v4sf)
21474 v4si __builtin_ia32_cmpeqss (v4sf, v4sf)
21475 v4si __builtin_ia32_cmpltss (v4sf, v4sf)
21476 v4si __builtin_ia32_cmpless (v4sf, v4sf)
21477 v4si __builtin_ia32_cmpunordss (v4sf, v4sf)
21478 v4si __builtin_ia32_cmpneqss (v4sf, v4sf)
21479 v4si __builtin_ia32_cmpnlts (v4sf, v4sf)
21480 v4si __builtin_ia32_cmpnless (v4sf, v4sf)
21481 v4si __builtin_ia32_cmpordss (v4sf, v4sf)
21482 v4sf __builtin_ia32_maxps (v4sf, v4sf)
21483 v4sf __builtin_ia32_maxss (v4sf, v4sf)
21484 v4sf __builtin_ia32_minps (v4sf, v4sf)
21485 v4sf __builtin_ia32_minss (v4sf, v4sf)
21486 v4sf __builtin_ia32_andps (v4sf, v4sf)
21487 v4sf __builtin_ia32_andnps (v4sf, v4sf)
21488 v4sf __builtin_ia32_orps (v4sf, v4sf)
21489 v4sf __builtin_ia32_xorps (v4sf, v4sf)
21490 v4sf __builtin_ia32_movss (v4sf, v4sf)
21491 v4sf __builtin_ia32_movhlps (v4sf, v4sf)
21492 v4sf __builtin_ia32_movlhps (v4sf, v4sf)
21493 v4sf __builtin_ia32_unpckhps (v4sf, v4sf)
21494 v4sf __builtin_ia32_unpcklps (v4sf, v4sf)
21495 v4sf __builtin_ia32_cvtpi2ps (v4sf, v2si)
21496 v4sf __builtin_ia32_cvtsi2ss (v4sf, int)
21497 v2si __builtin_ia32_cvtps2pi (v4sf)
21498 int __builtin_ia32_cvtss2si (v4sf)
21499 v2si __builtin_ia32_cvttps2pi (v4sf)
21500 int __builtin_ia32_cvttss2si (v4sf)
21501 v4sf __builtin_ia32_rcpps (v4sf)
21502 v4sf __builtin_ia32_rsqrtps (v4sf)
21503 v4sf __builtin_ia32_sqrtps (v4sf)
21504 v4sf __builtin_ia32_rcpss (v4sf)
21505 v4sf __builtin_ia32_rsqrtss (v4sf)
21506 v4sf __builtin_ia32_sqrtss (v4sf)
21507 v4sf __builtin_ia32_shufps (v4sf, v4sf, int)
21508 void __builtin_ia32_movntps (float *, v4sf)
21509 int __builtin_ia32_movmskps (v4sf)
21511 The following built-in functions are available when `-msse' is used.
21513 `v4sf __builtin_ia32_loadaps (float *)'
21514 Generates the `movaps' machine instruction as a load from memory.
21516 `void __builtin_ia32_storeaps (float *, v4sf)'
21517 Generates the `movaps' machine instruction as a store to memory.
21519 `v4sf __builtin_ia32_loadups (float *)'
21520 Generates the `movups' machine instruction as a load from memory.
21522 `void __builtin_ia32_storeups (float *, v4sf)'
21523 Generates the `movups' machine instruction as a store to memory.
21525 `v4sf __builtin_ia32_loadsss (float *)'
21526 Generates the `movss' machine instruction as a load from memory.
21528 `void __builtin_ia32_storess (float *, v4sf)'
21529 Generates the `movss' machine instruction as a store to memory.
21531 `v4sf __builtin_ia32_loadhps (v4sf, v2si *)'
21532 Generates the `movhps' machine instruction as a load from memory.
21534 `v4sf __builtin_ia32_loadlps (v4sf, v2si *)'
21535 Generates the `movlps' machine instruction as a load from memory
21537 `void __builtin_ia32_storehps (v4sf, v2si *)'
21538 Generates the `movhps' machine instruction as a store to memory.
21540 `void __builtin_ia32_storelps (v4sf, v2si *)'
21541 Generates the `movlps' machine instruction as a store to memory.
21543 The following built-in functions are available when `-msse2' is used.
21544 All of them generate the machine instruction that is part of the name.
21546 int __builtin_ia32_comisdeq (v2df, v2df)
21547 int __builtin_ia32_comisdlt (v2df, v2df)
21548 int __builtin_ia32_comisdle (v2df, v2df)
21549 int __builtin_ia32_comisdgt (v2df, v2df)
21550 int __builtin_ia32_comisdge (v2df, v2df)
21551 int __builtin_ia32_comisdneq (v2df, v2df)
21552 int __builtin_ia32_ucomisdeq (v2df, v2df)
21553 int __builtin_ia32_ucomisdlt (v2df, v2df)
21554 int __builtin_ia32_ucomisdle (v2df, v2df)
21555 int __builtin_ia32_ucomisdgt (v2df, v2df)
21556 int __builtin_ia32_ucomisdge (v2df, v2df)
21557 int __builtin_ia32_ucomisdneq (v2df, v2df)
21558 v2df __builtin_ia32_cmpeqpd (v2df, v2df)
21559 v2df __builtin_ia32_cmpltpd (v2df, v2df)
21560 v2df __builtin_ia32_cmplepd (v2df, v2df)
21561 v2df __builtin_ia32_cmpgtpd (v2df, v2df)
21562 v2df __builtin_ia32_cmpgepd (v2df, v2df)
21563 v2df __builtin_ia32_cmpunordpd (v2df, v2df)
21564 v2df __builtin_ia32_cmpneqpd (v2df, v2df)
21565 v2df __builtin_ia32_cmpnltpd (v2df, v2df)
21566 v2df __builtin_ia32_cmpnlepd (v2df, v2df)
21567 v2df __builtin_ia32_cmpngtpd (v2df, v2df)
21568 v2df __builtin_ia32_cmpngepd (v2df, v2df)
21569 v2df __builtin_ia32_cmpordpd (v2df, v2df)
21570 v2df __builtin_ia32_cmpeqsd (v2df, v2df)
21571 v2df __builtin_ia32_cmpltsd (v2df, v2df)
21572 v2df __builtin_ia32_cmplesd (v2df, v2df)
21573 v2df __builtin_ia32_cmpunordsd (v2df, v2df)
21574 v2df __builtin_ia32_cmpneqsd (v2df, v2df)
21575 v2df __builtin_ia32_cmpnltsd (v2df, v2df)
21576 v2df __builtin_ia32_cmpnlesd (v2df, v2df)
21577 v2df __builtin_ia32_cmpordsd (v2df, v2df)
21578 v2di __builtin_ia32_paddq (v2di, v2di)
21579 v2di __builtin_ia32_psubq (v2di, v2di)
21580 v2df __builtin_ia32_addpd (v2df, v2df)
21581 v2df __builtin_ia32_subpd (v2df, v2df)
21582 v2df __builtin_ia32_mulpd (v2df, v2df)
21583 v2df __builtin_ia32_divpd (v2df, v2df)
21584 v2df __builtin_ia32_addsd (v2df, v2df)
21585 v2df __builtin_ia32_subsd (v2df, v2df)
21586 v2df __builtin_ia32_mulsd (v2df, v2df)
21587 v2df __builtin_ia32_divsd (v2df, v2df)
21588 v2df __builtin_ia32_minpd (v2df, v2df)
21589 v2df __builtin_ia32_maxpd (v2df, v2df)
21590 v2df __builtin_ia32_minsd (v2df, v2df)
21591 v2df __builtin_ia32_maxsd (v2df, v2df)
21592 v2df __builtin_ia32_andpd (v2df, v2df)
21593 v2df __builtin_ia32_andnpd (v2df, v2df)
21594 v2df __builtin_ia32_orpd (v2df, v2df)
21595 v2df __builtin_ia32_xorpd (v2df, v2df)
21596 v2df __builtin_ia32_movsd (v2df, v2df)
21597 v2df __builtin_ia32_unpckhpd (v2df, v2df)
21598 v2df __builtin_ia32_unpcklpd (v2df, v2df)
21599 v16qi __builtin_ia32_paddb128 (v16qi, v16qi)
21600 v8hi __builtin_ia32_paddw128 (v8hi, v8hi)
21601 v4si __builtin_ia32_paddd128 (v4si, v4si)
21602 v2di __builtin_ia32_paddq128 (v2di, v2di)
21603 v16qi __builtin_ia32_psubb128 (v16qi, v16qi)
21604 v8hi __builtin_ia32_psubw128 (v8hi, v8hi)
21605 v4si __builtin_ia32_psubd128 (v4si, v4si)
21606 v2di __builtin_ia32_psubq128 (v2di, v2di)
21607 v8hi __builtin_ia32_pmullw128 (v8hi, v8hi)
21608 v8hi __builtin_ia32_pmulhw128 (v8hi, v8hi)
21609 v2di __builtin_ia32_pand128 (v2di, v2di)
21610 v2di __builtin_ia32_pandn128 (v2di, v2di)
21611 v2di __builtin_ia32_por128 (v2di, v2di)
21612 v2di __builtin_ia32_pxor128 (v2di, v2di)
21613 v16qi __builtin_ia32_pavgb128 (v16qi, v16qi)
21614 v8hi __builtin_ia32_pavgw128 (v8hi, v8hi)
21615 v16qi __builtin_ia32_pcmpeqb128 (v16qi, v16qi)
21616 v8hi __builtin_ia32_pcmpeqw128 (v8hi, v8hi)
21617 v4si __builtin_ia32_pcmpeqd128 (v4si, v4si)
21618 v16qi __builtin_ia32_pcmpgtb128 (v16qi, v16qi)
21619 v8hi __builtin_ia32_pcmpgtw128 (v8hi, v8hi)
21620 v4si __builtin_ia32_pcmpgtd128 (v4si, v4si)
21621 v16qi __builtin_ia32_pmaxub128 (v16qi, v16qi)
21622 v8hi __builtin_ia32_pmaxsw128 (v8hi, v8hi)
21623 v16qi __builtin_ia32_pminub128 (v16qi, v16qi)
21624 v8hi __builtin_ia32_pminsw128 (v8hi, v8hi)
21625 v16qi __builtin_ia32_punpckhbw128 (v16qi, v16qi)
21626 v8hi __builtin_ia32_punpckhwd128 (v8hi, v8hi)
21627 v4si __builtin_ia32_punpckhdq128 (v4si, v4si)
21628 v2di __builtin_ia32_punpckhqdq128 (v2di, v2di)
21629 v16qi __builtin_ia32_punpcklbw128 (v16qi, v16qi)
21630 v8hi __builtin_ia32_punpcklwd128 (v8hi, v8hi)
21631 v4si __builtin_ia32_punpckldq128 (v4si, v4si)
21632 v2di __builtin_ia32_punpcklqdq128 (v2di, v2di)
21633 v16qi __builtin_ia32_packsswb128 (v16qi, v16qi)
21634 v8hi __builtin_ia32_packssdw128 (v8hi, v8hi)
21635 v16qi __builtin_ia32_packuswb128 (v16qi, v16qi)
21636 v8hi __builtin_ia32_pmulhuw128 (v8hi, v8hi)
21637 void __builtin_ia32_maskmovdqu (v16qi, v16qi)
21638 v2df __builtin_ia32_loadupd (double *)
21639 void __builtin_ia32_storeupd (double *, v2df)
21640 v2df __builtin_ia32_loadhpd (v2df, double *)
21641 v2df __builtin_ia32_loadlpd (v2df, double *)
21642 int __builtin_ia32_movmskpd (v2df)
21643 int __builtin_ia32_pmovmskb128 (v16qi)
21644 void __builtin_ia32_movnti (int *, int)
21645 void __builtin_ia32_movntpd (double *, v2df)
21646 void __builtin_ia32_movntdq (v2df *, v2df)
21647 v4si __builtin_ia32_pshufd (v4si, int)
21648 v8hi __builtin_ia32_pshuflw (v8hi, int)
21649 v8hi __builtin_ia32_pshufhw (v8hi, int)
21650 v2di __builtin_ia32_psadbw128 (v16qi, v16qi)
21651 v2df __builtin_ia32_sqrtpd (v2df)
21652 v2df __builtin_ia32_sqrtsd (v2df)
21653 v2df __builtin_ia32_shufpd (v2df, v2df, int)
21654 v2df __builtin_ia32_cvtdq2pd (v4si)
21655 v4sf __builtin_ia32_cvtdq2ps (v4si)
21656 v4si __builtin_ia32_cvtpd2dq (v2df)
21657 v2si __builtin_ia32_cvtpd2pi (v2df)
21658 v4sf __builtin_ia32_cvtpd2ps (v2df)
21659 v4si __builtin_ia32_cvttpd2dq (v2df)
21660 v2si __builtin_ia32_cvttpd2pi (v2df)
21661 v2df __builtin_ia32_cvtpi2pd (v2si)
21662 int __builtin_ia32_cvtsd2si (v2df)
21663 int __builtin_ia32_cvttsd2si (v2df)
21664 long long __builtin_ia32_cvtsd2si64 (v2df)
21665 long long __builtin_ia32_cvttsd2si64 (v2df)
21666 v4si __builtin_ia32_cvtps2dq (v4sf)
21667 v2df __builtin_ia32_cvtps2pd (v4sf)
21668 v4si __builtin_ia32_cvttps2dq (v4sf)
21669 v2df __builtin_ia32_cvtsi2sd (v2df, int)
21670 v2df __builtin_ia32_cvtsi642sd (v2df, long long)
21671 v4sf __builtin_ia32_cvtsd2ss (v4sf, v2df)
21672 v2df __builtin_ia32_cvtss2sd (v2df, v4sf)
21673 void __builtin_ia32_clflush (const void *)
21674 void __builtin_ia32_lfence (void)
21675 void __builtin_ia32_mfence (void)
21676 v16qi __builtin_ia32_loaddqu (const char *)
21677 void __builtin_ia32_storedqu (char *, v16qi)
21678 unsigned long long __builtin_ia32_pmuludq (v2si, v2si)
21679 v2di __builtin_ia32_pmuludq128 (v4si, v4si)
21680 v8hi __builtin_ia32_psllw128 (v8hi, v2di)
21681 v4si __builtin_ia32_pslld128 (v4si, v2di)
21682 v2di __builtin_ia32_psllq128 (v4si, v2di)
21683 v8hi __builtin_ia32_psrlw128 (v8hi, v2di)
21684 v4si __builtin_ia32_psrld128 (v4si, v2di)
21685 v2di __builtin_ia32_psrlq128 (v2di, v2di)
21686 v8hi __builtin_ia32_psraw128 (v8hi, v2di)
21687 v4si __builtin_ia32_psrad128 (v4si, v2di)
21688 v2di __builtin_ia32_pslldqi128 (v2di, int)
21689 v8hi __builtin_ia32_psllwi128 (v8hi, int)
21690 v4si __builtin_ia32_pslldi128 (v4si, int)
21691 v2di __builtin_ia32_psllqi128 (v2di, int)
21692 v2di __builtin_ia32_psrldqi128 (v2di, int)
21693 v8hi __builtin_ia32_psrlwi128 (v8hi, int)
21694 v4si __builtin_ia32_psrldi128 (v4si, int)
21695 v2di __builtin_ia32_psrlqi128 (v2di, int)
21696 v8hi __builtin_ia32_psrawi128 (v8hi, int)
21697 v4si __builtin_ia32_psradi128 (v4si, int)
21698 v4si __builtin_ia32_pmaddwd128 (v8hi, v8hi)
21700 The following built-in functions are available when `-msse3' is used.
21701 All of them generate the machine instruction that is part of the name.
21703 v2df __builtin_ia32_addsubpd (v2df, v2df)
21704 v4sf __builtin_ia32_addsubps (v4sf, v4sf)
21705 v2df __builtin_ia32_haddpd (v2df, v2df)
21706 v4sf __builtin_ia32_haddps (v4sf, v4sf)
21707 v2df __builtin_ia32_hsubpd (v2df, v2df)
21708 v4sf __builtin_ia32_hsubps (v4sf, v4sf)
21709 v16qi __builtin_ia32_lddqu (char const *)
21710 void __builtin_ia32_monitor (void *, unsigned int, unsigned int)
21711 v2df __builtin_ia32_movddup (v2df)
21712 v4sf __builtin_ia32_movshdup (v4sf)
21713 v4sf __builtin_ia32_movsldup (v4sf)
21714 void __builtin_ia32_mwait (unsigned int, unsigned int)
21716 The following built-in functions are available when `-msse3' is used.
21718 `v2df __builtin_ia32_loadddup (double const *)'
21719 Generates the `movddup' machine instruction as a load from memory.
21721 The following built-in functions are available when `-m3dnow' is used.
21722 All of them generate the machine instruction that is part of the name.
21724 void __builtin_ia32_femms (void)
21725 v8qi __builtin_ia32_pavgusb (v8qi, v8qi)
21726 v2si __builtin_ia32_pf2id (v2sf)
21727 v2sf __builtin_ia32_pfacc (v2sf, v2sf)
21728 v2sf __builtin_ia32_pfadd (v2sf, v2sf)
21729 v2si __builtin_ia32_pfcmpeq (v2sf, v2sf)
21730 v2si __builtin_ia32_pfcmpge (v2sf, v2sf)
21731 v2si __builtin_ia32_pfcmpgt (v2sf, v2sf)
21732 v2sf __builtin_ia32_pfmax (v2sf, v2sf)
21733 v2sf __builtin_ia32_pfmin (v2sf, v2sf)
21734 v2sf __builtin_ia32_pfmul (v2sf, v2sf)
21735 v2sf __builtin_ia32_pfrcp (v2sf)
21736 v2sf __builtin_ia32_pfrcpit1 (v2sf, v2sf)
21737 v2sf __builtin_ia32_pfrcpit2 (v2sf, v2sf)
21738 v2sf __builtin_ia32_pfrsqrt (v2sf)
21739 v2sf __builtin_ia32_pfrsqrtit1 (v2sf, v2sf)
21740 v2sf __builtin_ia32_pfsub (v2sf, v2sf)
21741 v2sf __builtin_ia32_pfsubr (v2sf, v2sf)
21742 v2sf __builtin_ia32_pi2fd (v2si)
21743 v4hi __builtin_ia32_pmulhrw (v4hi, v4hi)
21745 The following built-in functions are available when both `-m3dnow' and
21746 `-march=athlon' are used. All of them generate the machine instruction
21747 that is part of the name.
21749 v2si __builtin_ia32_pf2iw (v2sf)
21750 v2sf __builtin_ia32_pfnacc (v2sf, v2sf)
21751 v2sf __builtin_ia32_pfpnacc (v2sf, v2sf)
21752 v2sf __builtin_ia32_pi2fw (v2si)
21753 v2sf __builtin_ia32_pswapdsf (v2sf)
21754 v2si __builtin_ia32_pswapdsi (v2si)
21757 File: gcc.info, Node: MIPS DSP Built-in Functions, Next: MIPS Paired-Single Support, Prev: X86 Built-in Functions, Up: Target Builtins
21759 5.48.6 MIPS DSP Built-in Functions
21760 ----------------------------------
21762 The MIPS DSP Application-Specific Extension (ASE) includes new
21763 instructions that are designed to improve the performance of DSP and
21764 media applications. It provides instructions that operate on packed
21765 8-bit integer data, Q15 fractional data and Q31 fractional data.
21767 GCC supports MIPS DSP operations using both the generic vector
21768 extensions (*note Vector Extensions::) and a collection of
21769 MIPS-specific built-in functions. Both kinds of support are enabled by
21770 the `-mdsp' command-line option.
21772 At present, GCC only provides support for operations on 32-bit
21773 vectors. The vector type associated with 8-bit integer data is usually
21774 called `v4i8' and the vector type associated with Q15 is usually called
21775 `v2q15'. They can be defined in C as follows:
21777 typedef char v4i8 __attribute__ ((vector_size(4)));
21778 typedef short v2q15 __attribute__ ((vector_size(4)));
21780 `v4i8' and `v2q15' values are initialized in the same way as
21781 aggregates. For example:
21783 v4i8 a = {1, 2, 3, 4};
21785 b = (v4i8) {5, 6, 7, 8};
21787 v2q15 c = {0x0fcb, 0x3a75};
21789 d = (v2q15) {0.1234 * 0x1.0p15, 0.4567 * 0x1.0p15};
21791 _Note:_ The CPU's endianness determines the order in which values are
21792 packed. On little-endian targets, the first value is the least
21793 significant and the last value is the most significant. The opposite
21794 order applies to big-endian targets. For example, the code above will
21795 set the lowest byte of `a' to `1' on little-endian targets and `4' on
21796 big-endian targets.
21798 _Note:_ Q15 and Q31 values must be initialized with their integer
21799 representation. As shown in this example, the integer representation
21800 of a Q15 value can be obtained by multiplying the fractional value by
21801 `0x1.0p15'. The equivalent for Q31 values is to multiply by `0x1.0p31'.
21803 The table below lists the `v4i8' and `v2q15' operations for which
21804 hardware support exists. `a' and `b' are `v4i8' values, and `c' and
21805 `d' are `v2q15' values.
21807 C code MIPS instruction
21813 It is easier to describe the DSP built-in functions if we first define
21814 the following types:
21818 typedef long long a64;
21820 `q31' and `i32' are actually the same as `int', but we use `q31' to
21821 indicate a Q31 fractional value and `i32' to indicate a 32-bit integer
21822 value. Similarly, `a64' is the same as `long long', but we use `a64'
21823 to indicate values that will be placed in one of the four DSP
21824 accumulators (`$ac0', `$ac1', `$ac2' or `$ac3').
21826 Also, some built-in functions prefer or require immediate numbers as
21827 parameters, because the corresponding DSP instructions accept both
21828 immediate numbers and register operands, or accept immediate numbers
21829 only. The immediate parameters are listed as follows.
21835 imm0_255: 0 to 255.
21836 imm_n32_31: -32 to 31.
21837 imm_n512_511: -512 to 511.
21839 The following built-in functions map directly to a particular MIPS DSP
21840 instruction. Please refer to the architecture specification for
21841 details on what each instruction does.
21843 v2q15 __builtin_mips_addq_ph (v2q15, v2q15)
21844 v2q15 __builtin_mips_addq_s_ph (v2q15, v2q15)
21845 q31 __builtin_mips_addq_s_w (q31, q31)
21846 v4i8 __builtin_mips_addu_qb (v4i8, v4i8)
21847 v4i8 __builtin_mips_addu_s_qb (v4i8, v4i8)
21848 v2q15 __builtin_mips_subq_ph (v2q15, v2q15)
21849 v2q15 __builtin_mips_subq_s_ph (v2q15, v2q15)
21850 q31 __builtin_mips_subq_s_w (q31, q31)
21851 v4i8 __builtin_mips_subu_qb (v4i8, v4i8)
21852 v4i8 __builtin_mips_subu_s_qb (v4i8, v4i8)
21853 i32 __builtin_mips_addsc (i32, i32)
21854 i32 __builtin_mips_addwc (i32, i32)
21855 i32 __builtin_mips_modsub (i32, i32)
21856 i32 __builtin_mips_raddu_w_qb (v4i8)
21857 v2q15 __builtin_mips_absq_s_ph (v2q15)
21858 q31 __builtin_mips_absq_s_w (q31)
21859 v4i8 __builtin_mips_precrq_qb_ph (v2q15, v2q15)
21860 v2q15 __builtin_mips_precrq_ph_w (q31, q31)
21861 v2q15 __builtin_mips_precrq_rs_ph_w (q31, q31)
21862 v4i8 __builtin_mips_precrqu_s_qb_ph (v2q15, v2q15)
21863 q31 __builtin_mips_preceq_w_phl (v2q15)
21864 q31 __builtin_mips_preceq_w_phr (v2q15)
21865 v2q15 __builtin_mips_precequ_ph_qbl (v4i8)
21866 v2q15 __builtin_mips_precequ_ph_qbr (v4i8)
21867 v2q15 __builtin_mips_precequ_ph_qbla (v4i8)
21868 v2q15 __builtin_mips_precequ_ph_qbra (v4i8)
21869 v2q15 __builtin_mips_preceu_ph_qbl (v4i8)
21870 v2q15 __builtin_mips_preceu_ph_qbr (v4i8)
21871 v2q15 __builtin_mips_preceu_ph_qbla (v4i8)
21872 v2q15 __builtin_mips_preceu_ph_qbra (v4i8)
21873 v4i8 __builtin_mips_shll_qb (v4i8, imm0_7)
21874 v4i8 __builtin_mips_shll_qb (v4i8, i32)
21875 v2q15 __builtin_mips_shll_ph (v2q15, imm0_15)
21876 v2q15 __builtin_mips_shll_ph (v2q15, i32)
21877 v2q15 __builtin_mips_shll_s_ph (v2q15, imm0_15)
21878 v2q15 __builtin_mips_shll_s_ph (v2q15, i32)
21879 q31 __builtin_mips_shll_s_w (q31, imm0_31)
21880 q31 __builtin_mips_shll_s_w (q31, i32)
21881 v4i8 __builtin_mips_shrl_qb (v4i8, imm0_7)
21882 v4i8 __builtin_mips_shrl_qb (v4i8, i32)
21883 v2q15 __builtin_mips_shra_ph (v2q15, imm0_15)
21884 v2q15 __builtin_mips_shra_ph (v2q15, i32)
21885 v2q15 __builtin_mips_shra_r_ph (v2q15, imm0_15)
21886 v2q15 __builtin_mips_shra_r_ph (v2q15, i32)
21887 q31 __builtin_mips_shra_r_w (q31, imm0_31)
21888 q31 __builtin_mips_shra_r_w (q31, i32)
21889 v2q15 __builtin_mips_muleu_s_ph_qbl (v4i8, v2q15)
21890 v2q15 __builtin_mips_muleu_s_ph_qbr (v4i8, v2q15)
21891 v2q15 __builtin_mips_mulq_rs_ph (v2q15, v2q15)
21892 q31 __builtin_mips_muleq_s_w_phl (v2q15, v2q15)
21893 q31 __builtin_mips_muleq_s_w_phr (v2q15, v2q15)
21894 a64 __builtin_mips_dpau_h_qbl (a64, v4i8, v4i8)
21895 a64 __builtin_mips_dpau_h_qbr (a64, v4i8, v4i8)
21896 a64 __builtin_mips_dpsu_h_qbl (a64, v4i8, v4i8)
21897 a64 __builtin_mips_dpsu_h_qbr (a64, v4i8, v4i8)
21898 a64 __builtin_mips_dpaq_s_w_ph (a64, v2q15, v2q15)
21899 a64 __builtin_mips_dpaq_sa_l_w (a64, q31, q31)
21900 a64 __builtin_mips_dpsq_s_w_ph (a64, v2q15, v2q15)
21901 a64 __builtin_mips_dpsq_sa_l_w (a64, q31, q31)
21902 a64 __builtin_mips_mulsaq_s_w_ph (a64, v2q15, v2q15)
21903 a64 __builtin_mips_maq_s_w_phl (a64, v2q15, v2q15)
21904 a64 __builtin_mips_maq_s_w_phr (a64, v2q15, v2q15)
21905 a64 __builtin_mips_maq_sa_w_phl (a64, v2q15, v2q15)
21906 a64 __builtin_mips_maq_sa_w_phr (a64, v2q15, v2q15)
21907 i32 __builtin_mips_bitrev (i32)
21908 i32 __builtin_mips_insv (i32, i32)
21909 v4i8 __builtin_mips_repl_qb (imm0_255)
21910 v4i8 __builtin_mips_repl_qb (i32)
21911 v2q15 __builtin_mips_repl_ph (imm_n512_511)
21912 v2q15 __builtin_mips_repl_ph (i32)
21913 void __builtin_mips_cmpu_eq_qb (v4i8, v4i8)
21914 void __builtin_mips_cmpu_lt_qb (v4i8, v4i8)
21915 void __builtin_mips_cmpu_le_qb (v4i8, v4i8)
21916 i32 __builtin_mips_cmpgu_eq_qb (v4i8, v4i8)
21917 i32 __builtin_mips_cmpgu_lt_qb (v4i8, v4i8)
21918 i32 __builtin_mips_cmpgu_le_qb (v4i8, v4i8)
21919 void __builtin_mips_cmp_eq_ph (v2q15, v2q15)
21920 void __builtin_mips_cmp_lt_ph (v2q15, v2q15)
21921 void __builtin_mips_cmp_le_ph (v2q15, v2q15)
21922 v4i8 __builtin_mips_pick_qb (v4i8, v4i8)
21923 v2q15 __builtin_mips_pick_ph (v2q15, v2q15)
21924 v2q15 __builtin_mips_packrl_ph (v2q15, v2q15)
21925 i32 __builtin_mips_extr_w (a64, imm0_31)
21926 i32 __builtin_mips_extr_w (a64, i32)
21927 i32 __builtin_mips_extr_r_w (a64, imm0_31)
21928 i32 __builtin_mips_extr_s_h (a64, i32)
21929 i32 __builtin_mips_extr_rs_w (a64, imm0_31)
21930 i32 __builtin_mips_extr_rs_w (a64, i32)
21931 i32 __builtin_mips_extr_s_h (a64, imm0_31)
21932 i32 __builtin_mips_extr_r_w (a64, i32)
21933 i32 __builtin_mips_extp (a64, imm0_31)
21934 i32 __builtin_mips_extp (a64, i32)
21935 i32 __builtin_mips_extpdp (a64, imm0_31)
21936 i32 __builtin_mips_extpdp (a64, i32)
21937 a64 __builtin_mips_shilo (a64, imm_n32_31)
21938 a64 __builtin_mips_shilo (a64, i32)
21939 a64 __builtin_mips_mthlip (a64, i32)
21940 void __builtin_mips_wrdsp (i32, imm0_63)
21941 i32 __builtin_mips_rddsp (imm0_63)
21942 i32 __builtin_mips_lbux (void *, i32)
21943 i32 __builtin_mips_lhx (void *, i32)
21944 i32 __builtin_mips_lwx (void *, i32)
21945 i32 __builtin_mips_bposge32 (void)
21948 File: gcc.info, Node: MIPS Paired-Single Support, Next: PowerPC AltiVec Built-in Functions, Prev: MIPS DSP Built-in Functions, Up: Target Builtins
21950 5.48.7 MIPS Paired-Single Support
21951 ---------------------------------
21953 The MIPS64 architecture includes a number of instructions that operate
21954 on pairs of single-precision floating-point values. Each pair is
21955 packed into a 64-bit floating-point register, with one element being
21956 designated the "upper half" and the other being designated the "lower
21959 GCC supports paired-single operations using both the generic vector
21960 extensions (*note Vector Extensions::) and a collection of
21961 MIPS-specific built-in functions. Both kinds of support are enabled by
21962 the `-mpaired-single' command-line option.
21964 The vector type associated with paired-single values is usually called
21965 `v2sf'. It can be defined in C as follows:
21967 typedef float v2sf __attribute__ ((vector_size (8)));
21969 `v2sf' values are initialized in the same way as aggregates. For
21972 v2sf a = {1.5, 9.1};
21977 _Note:_ The CPU's endianness determines which value is stored in the
21978 upper half of a register and which value is stored in the lower half.
21979 On little-endian targets, the first value is the lower one and the
21980 second value is the upper one. The opposite order applies to
21981 big-endian targets. For example, the code above will set the lower
21982 half of `a' to `1.5' on little-endian targets and `9.1' on big-endian
21987 * Paired-Single Arithmetic::
21988 * Paired-Single Built-in Functions::
21989 * MIPS-3D Built-in Functions::
21992 File: gcc.info, Node: Paired-Single Arithmetic, Next: Paired-Single Built-in Functions, Up: MIPS Paired-Single Support
21994 5.48.7.1 Paired-Single Arithmetic
21995 .................................
21997 The table below lists the `v2sf' operations for which hardware support
21998 exists. `a', `b' and `c' are `v2sf' values and `x' is an integral
22001 C code MIPS instruction
22006 `a * b + c' `madd.ps'
22007 `a * b - c' `msub.ps'
22008 `-(a * b + c)' `nmadd.ps'
22009 `-(a * b - c)' `nmsub.ps'
22010 `x ? a : b' `movn.ps'/`movz.ps'
22012 Note that the multiply-accumulate instructions can be disabled using
22013 the command-line option `-mno-fused-madd'.
22016 File: gcc.info, Node: Paired-Single Built-in Functions, Next: MIPS-3D Built-in Functions, Prev: Paired-Single Arithmetic, Up: MIPS Paired-Single Support
22018 5.48.7.2 Paired-Single Built-in Functions
22019 .........................................
22021 The following paired-single functions map directly to a particular MIPS
22022 instruction. Please refer to the architecture specification for
22023 details on what each instruction does.
22025 `v2sf __builtin_mips_pll_ps (v2sf, v2sf)'
22026 Pair lower lower (`pll.ps').
22028 `v2sf __builtin_mips_pul_ps (v2sf, v2sf)'
22029 Pair upper lower (`pul.ps').
22031 `v2sf __builtin_mips_plu_ps (v2sf, v2sf)'
22032 Pair lower upper (`plu.ps').
22034 `v2sf __builtin_mips_puu_ps (v2sf, v2sf)'
22035 Pair upper upper (`puu.ps').
22037 `v2sf __builtin_mips_cvt_ps_s (float, float)'
22038 Convert pair to paired single (`cvt.ps.s').
22040 `float __builtin_mips_cvt_s_pl (v2sf)'
22041 Convert pair lower to single (`cvt.s.pl').
22043 `float __builtin_mips_cvt_s_pu (v2sf)'
22044 Convert pair upper to single (`cvt.s.pu').
22046 `v2sf __builtin_mips_abs_ps (v2sf)'
22047 Absolute value (`abs.ps').
22049 `v2sf __builtin_mips_alnv_ps (v2sf, v2sf, int)'
22050 Align variable (`alnv.ps').
22052 _Note:_ The value of the third parameter must be 0 or 4 modulo 8,
22053 otherwise the result will be unpredictable. Please read the
22054 instruction description for details.
22056 The following multi-instruction functions are also available. In each
22057 case, COND can be any of the 16 floating-point conditions: `f', `un',
22058 `eq', `ueq', `olt', `ult', `ole', `ule', `sf', `ngle', `seq', `ngl',
22059 `lt', `nge', `le' or `ngt'.
22061 `v2sf __builtin_mips_movt_c_COND_ps (v2sf A, v2sf B, v2sf C, v2sf D)'
22062 `v2sf __builtin_mips_movf_c_COND_ps (v2sf A, v2sf B, v2sf C, v2sf D)'
22063 Conditional move based on floating point comparison (`c.COND.ps',
22064 `movt.ps'/`movf.ps').
22066 The `movt' functions return the value X computed by:
22072 The `movf' functions are similar but use `movf.ps' instead of
22075 `int __builtin_mips_upper_c_COND_ps (v2sf A, v2sf B)'
22076 `int __builtin_mips_lower_c_COND_ps (v2sf A, v2sf B)'
22077 Comparison of two paired-single values (`c.COND.ps',
22080 These functions compare A and B using `c.COND.ps' and return
22081 either the upper or lower half of the result. For example:
22084 if (__builtin_mips_upper_c_eq_ps (a, b))
22085 upper_halves_are_equal ();
22087 upper_halves_are_unequal ();
22089 if (__builtin_mips_lower_c_eq_ps (a, b))
22090 lower_halves_are_equal ();
22092 lower_halves_are_unequal ();
22095 File: gcc.info, Node: MIPS-3D Built-in Functions, Prev: Paired-Single Built-in Functions, Up: MIPS Paired-Single Support
22097 5.48.7.3 MIPS-3D Built-in Functions
22098 ...................................
22100 The MIPS-3D Application-Specific Extension (ASE) includes additional
22101 paired-single instructions that are designed to improve the performance
22102 of 3D graphics operations. Support for these instructions is controlled
22103 by the `-mips3d' command-line option.
22105 The functions listed below map directly to a particular MIPS-3D
22106 instruction. Please refer to the architecture specification for more
22107 details on what each instruction does.
22109 `v2sf __builtin_mips_addr_ps (v2sf, v2sf)'
22110 Reduction add (`addr.ps').
22112 `v2sf __builtin_mips_mulr_ps (v2sf, v2sf)'
22113 Reduction multiply (`mulr.ps').
22115 `v2sf __builtin_mips_cvt_pw_ps (v2sf)'
22116 Convert paired single to paired word (`cvt.pw.ps').
22118 `v2sf __builtin_mips_cvt_ps_pw (v2sf)'
22119 Convert paired word to paired single (`cvt.ps.pw').
22121 `float __builtin_mips_recip1_s (float)'
22122 `double __builtin_mips_recip1_d (double)'
22123 `v2sf __builtin_mips_recip1_ps (v2sf)'
22124 Reduced precision reciprocal (sequence step 1) (`recip1.FMT').
22126 `float __builtin_mips_recip2_s (float, float)'
22127 `double __builtin_mips_recip2_d (double, double)'
22128 `v2sf __builtin_mips_recip2_ps (v2sf, v2sf)'
22129 Reduced precision reciprocal (sequence step 2) (`recip2.FMT').
22131 `float __builtin_mips_rsqrt1_s (float)'
22132 `double __builtin_mips_rsqrt1_d (double)'
22133 `v2sf __builtin_mips_rsqrt1_ps (v2sf)'
22134 Reduced precision reciprocal square root (sequence step 1)
22137 `float __builtin_mips_rsqrt2_s (float, float)'
22138 `double __builtin_mips_rsqrt2_d (double, double)'
22139 `v2sf __builtin_mips_rsqrt2_ps (v2sf, v2sf)'
22140 Reduced precision reciprocal square root (sequence step 2)
22143 The following multi-instruction functions are also available. In each
22144 case, COND can be any of the 16 floating-point conditions: `f', `un',
22145 `eq', `ueq', `olt', `ult', `ole', `ule', `sf', `ngle', `seq', `ngl',
22146 `lt', `nge', `le' or `ngt'.
22148 `int __builtin_mips_cabs_COND_s (float A, float B)'
22149 `int __builtin_mips_cabs_COND_d (double A, double B)'
22150 Absolute comparison of two scalar values (`cabs.COND.FMT',
22153 These functions compare A and B using `cabs.COND.s' or
22154 `cabs.COND.d' and return the result as a boolean value. For
22158 if (__builtin_mips_cabs_eq_s (a, b))
22163 `int __builtin_mips_upper_cabs_COND_ps (v2sf A, v2sf B)'
22164 `int __builtin_mips_lower_cabs_COND_ps (v2sf A, v2sf B)'
22165 Absolute comparison of two paired-single values (`cabs.COND.ps',
22168 These functions compare A and B using `cabs.COND.ps' and return
22169 either the upper or lower half of the result. For example:
22172 if (__builtin_mips_upper_cabs_eq_ps (a, b))
22173 upper_halves_are_equal ();
22175 upper_halves_are_unequal ();
22177 if (__builtin_mips_lower_cabs_eq_ps (a, b))
22178 lower_halves_are_equal ();
22180 lower_halves_are_unequal ();
22182 `v2sf __builtin_mips_movt_cabs_COND_ps (v2sf A, v2sf B, v2sf C, v2sf D)'
22183 `v2sf __builtin_mips_movf_cabs_COND_ps (v2sf A, v2sf B, v2sf C, v2sf D)'
22184 Conditional move based on absolute comparison (`cabs.COND.ps',
22185 `movt.ps'/`movf.ps').
22187 The `movt' functions return the value X computed by:
22189 cabs.COND.ps CC,A,B
22193 The `movf' functions are similar but use `movf.ps' instead of
22196 `int __builtin_mips_any_c_COND_ps (v2sf A, v2sf B)'
22197 `int __builtin_mips_all_c_COND_ps (v2sf A, v2sf B)'
22198 `int __builtin_mips_any_cabs_COND_ps (v2sf A, v2sf B)'
22199 `int __builtin_mips_all_cabs_COND_ps (v2sf A, v2sf B)'
22200 Comparison of two paired-single values (`c.COND.ps'/`cabs.COND.ps',
22201 `bc1any2t'/`bc1any2f').
22203 These functions compare A and B using `c.COND.ps' or
22204 `cabs.COND.ps'. The `any' forms return true if either result is
22205 true and the `all' forms return true if both results are true.
22209 if (__builtin_mips_any_c_eq_ps (a, b))
22214 if (__builtin_mips_all_c_eq_ps (a, b))
22219 `int __builtin_mips_any_c_COND_4s (v2sf A, v2sf B, v2sf C, v2sf D)'
22220 `int __builtin_mips_all_c_COND_4s (v2sf A, v2sf B, v2sf C, v2sf D)'
22221 `int __builtin_mips_any_cabs_COND_4s (v2sf A, v2sf B, v2sf C, v2sf D)'
22222 `int __builtin_mips_all_cabs_COND_4s (v2sf A, v2sf B, v2sf C, v2sf D)'
22223 Comparison of four paired-single values
22224 (`c.COND.ps'/`cabs.COND.ps', `bc1any4t'/`bc1any4f').
22226 These functions use `c.COND.ps' or `cabs.COND.ps' to compare A
22227 with B and to compare C with D. The `any' forms return true if
22228 any of the four results are true and the `all' forms return true
22229 if all four results are true. For example:
22232 if (__builtin_mips_any_c_eq_4s (a, b, c, d))
22237 if (__builtin_mips_all_c_eq_4s (a, b, c, d))
22243 File: gcc.info, Node: PowerPC AltiVec Built-in Functions, Next: SPARC VIS Built-in Functions, Prev: MIPS Paired-Single Support, Up: Target Builtins
22245 5.48.8 PowerPC AltiVec Built-in Functions
22246 -----------------------------------------
22248 GCC provides an interface for the PowerPC family of processors to access
22249 the AltiVec operations described in Motorola's AltiVec Programming
22250 Interface Manual. The interface is made available by including
22251 `<altivec.h>' and using `-maltivec' and `-mabi=altivec'. The interface
22252 supports the following vector types.
22254 vector unsigned char
22258 vector unsigned short
22259 vector signed short
22263 vector unsigned int
22268 GCC's implementation of the high-level language interface available
22269 from C and C++ code differs from Motorola's documentation in several
22272 * A vector constant is a list of constant expressions within curly
22275 * A vector initializer requires no cast if the vector constant is of
22276 the same type as the variable it is initializing.
22278 * If `signed' or `unsigned' is omitted, the signedness of the vector
22279 type is the default signedness of the base type. The default
22280 varies depending on the operating system, so a portable program
22281 should always specify the signedness.
22283 * Compiling with `-maltivec' adds keywords `__vector', `__pixel',
22284 and `__bool'. Macros `vector', `pixel', and `bool' are defined in
22285 `<altivec.h>' and can be undefined.
22287 * GCC allows using a `typedef' name as the type specifier for a
22290 * For C, overloaded functions are implemented with macros so the
22291 following does not work:
22293 vec_add ((vector signed int){1, 2, 3, 4}, foo);
22295 Since `vec_add' is a macro, the vector constant in the example is
22296 treated as four separate arguments. Wrap the entire argument in
22297 parentheses for this to work.
22299 _Note:_ Only the `<altivec.h>' interface is supported. Internally,
22300 GCC uses built-in functions to achieve the functionality in the
22301 aforementioned header file, but they are not supported and are subject
22302 to change without notice.
22304 The following interfaces are supported for the generic and specific
22305 AltiVec operations and the AltiVec predicates. In cases where there is
22306 a direct mapping between generic and specific operations, only the
22307 generic names are shown here, although the specific operations can also
22310 Arguments that are documented as `const int' require literal integral
22311 values within the range required for that operation.
22313 vector signed char vec_abs (vector signed char);
22314 vector signed short vec_abs (vector signed short);
22315 vector signed int vec_abs (vector signed int);
22316 vector float vec_abs (vector float);
22318 vector signed char vec_abss (vector signed char);
22319 vector signed short vec_abss (vector signed short);
22320 vector signed int vec_abss (vector signed int);
22322 vector signed char vec_add (vector bool char, vector signed char);
22323 vector signed char vec_add (vector signed char, vector bool char);
22324 vector signed char vec_add (vector signed char, vector signed char);
22325 vector unsigned char vec_add (vector bool char, vector unsigned char);
22326 vector unsigned char vec_add (vector unsigned char, vector bool char);
22327 vector unsigned char vec_add (vector unsigned char,
22328 vector unsigned char);
22329 vector signed short vec_add (vector bool short, vector signed short);
22330 vector signed short vec_add (vector signed short, vector bool short);
22331 vector signed short vec_add (vector signed short, vector signed short);
22332 vector unsigned short vec_add (vector bool short,
22333 vector unsigned short);
22334 vector unsigned short vec_add (vector unsigned short,
22335 vector bool short);
22336 vector unsigned short vec_add (vector unsigned short,
22337 vector unsigned short);
22338 vector signed int vec_add (vector bool int, vector signed int);
22339 vector signed int vec_add (vector signed int, vector bool int);
22340 vector signed int vec_add (vector signed int, vector signed int);
22341 vector unsigned int vec_add (vector bool int, vector unsigned int);
22342 vector unsigned int vec_add (vector unsigned int, vector bool int);
22343 vector unsigned int vec_add (vector unsigned int, vector unsigned int);
22344 vector float vec_add (vector float, vector float);
22346 vector float vec_vaddfp (vector float, vector float);
22348 vector signed int vec_vadduwm (vector bool int, vector signed int);
22349 vector signed int vec_vadduwm (vector signed int, vector bool int);
22350 vector signed int vec_vadduwm (vector signed int, vector signed int);
22351 vector unsigned int vec_vadduwm (vector bool int, vector unsigned int);
22352 vector unsigned int vec_vadduwm (vector unsigned int, vector bool int);
22353 vector unsigned int vec_vadduwm (vector unsigned int,
22354 vector unsigned int);
22356 vector signed short vec_vadduhm (vector bool short,
22357 vector signed short);
22358 vector signed short vec_vadduhm (vector signed short,
22359 vector bool short);
22360 vector signed short vec_vadduhm (vector signed short,
22361 vector signed short);
22362 vector unsigned short vec_vadduhm (vector bool short,
22363 vector unsigned short);
22364 vector unsigned short vec_vadduhm (vector unsigned short,
22365 vector bool short);
22366 vector unsigned short vec_vadduhm (vector unsigned short,
22367 vector unsigned short);
22369 vector signed char vec_vaddubm (vector bool char, vector signed char);
22370 vector signed char vec_vaddubm (vector signed char, vector bool char);
22371 vector signed char vec_vaddubm (vector signed char, vector signed char);
22372 vector unsigned char vec_vaddubm (vector bool char,
22373 vector unsigned char);
22374 vector unsigned char vec_vaddubm (vector unsigned char,
22376 vector unsigned char vec_vaddubm (vector unsigned char,
22377 vector unsigned char);
22379 vector unsigned int vec_addc (vector unsigned int, vector unsigned int);
22381 vector unsigned char vec_adds (vector bool char, vector unsigned char);
22382 vector unsigned char vec_adds (vector unsigned char, vector bool char);
22383 vector unsigned char vec_adds (vector unsigned char,
22384 vector unsigned char);
22385 vector signed char vec_adds (vector bool char, vector signed char);
22386 vector signed char vec_adds (vector signed char, vector bool char);
22387 vector signed char vec_adds (vector signed char, vector signed char);
22388 vector unsigned short vec_adds (vector bool short,
22389 vector unsigned short);
22390 vector unsigned short vec_adds (vector unsigned short,
22391 vector bool short);
22392 vector unsigned short vec_adds (vector unsigned short,
22393 vector unsigned short);
22394 vector signed short vec_adds (vector bool short, vector signed short);
22395 vector signed short vec_adds (vector signed short, vector bool short);
22396 vector signed short vec_adds (vector signed short, vector signed short);
22397 vector unsigned int vec_adds (vector bool int, vector unsigned int);
22398 vector unsigned int vec_adds (vector unsigned int, vector bool int);
22399 vector unsigned int vec_adds (vector unsigned int, vector unsigned int);
22400 vector signed int vec_adds (vector bool int, vector signed int);
22401 vector signed int vec_adds (vector signed int, vector bool int);
22402 vector signed int vec_adds (vector signed int, vector signed int);
22404 vector signed int vec_vaddsws (vector bool int, vector signed int);
22405 vector signed int vec_vaddsws (vector signed int, vector bool int);
22406 vector signed int vec_vaddsws (vector signed int, vector signed int);
22408 vector unsigned int vec_vadduws (vector bool int, vector unsigned int);
22409 vector unsigned int vec_vadduws (vector unsigned int, vector bool int);
22410 vector unsigned int vec_vadduws (vector unsigned int,
22411 vector unsigned int);
22413 vector signed short vec_vaddshs (vector bool short,
22414 vector signed short);
22415 vector signed short vec_vaddshs (vector signed short,
22416 vector bool short);
22417 vector signed short vec_vaddshs (vector signed short,
22418 vector signed short);
22420 vector unsigned short vec_vadduhs (vector bool short,
22421 vector unsigned short);
22422 vector unsigned short vec_vadduhs (vector unsigned short,
22423 vector bool short);
22424 vector unsigned short vec_vadduhs (vector unsigned short,
22425 vector unsigned short);
22427 vector signed char vec_vaddsbs (vector bool char, vector signed char);
22428 vector signed char vec_vaddsbs (vector signed char, vector bool char);
22429 vector signed char vec_vaddsbs (vector signed char, vector signed char);
22431 vector unsigned char vec_vaddubs (vector bool char,
22432 vector unsigned char);
22433 vector unsigned char vec_vaddubs (vector unsigned char,
22435 vector unsigned char vec_vaddubs (vector unsigned char,
22436 vector unsigned char);
22438 vector float vec_and (vector float, vector float);
22439 vector float vec_and (vector float, vector bool int);
22440 vector float vec_and (vector bool int, vector float);
22441 vector bool int vec_and (vector bool int, vector bool int);
22442 vector signed int vec_and (vector bool int, vector signed int);
22443 vector signed int vec_and (vector signed int, vector bool int);
22444 vector signed int vec_and (vector signed int, vector signed int);
22445 vector unsigned int vec_and (vector bool int, vector unsigned int);
22446 vector unsigned int vec_and (vector unsigned int, vector bool int);
22447 vector unsigned int vec_and (vector unsigned int, vector unsigned int);
22448 vector bool short vec_and (vector bool short, vector bool short);
22449 vector signed short vec_and (vector bool short, vector signed short);
22450 vector signed short vec_and (vector signed short, vector bool short);
22451 vector signed short vec_and (vector signed short, vector signed short);
22452 vector unsigned short vec_and (vector bool short,
22453 vector unsigned short);
22454 vector unsigned short vec_and (vector unsigned short,
22455 vector bool short);
22456 vector unsigned short vec_and (vector unsigned short,
22457 vector unsigned short);
22458 vector signed char vec_and (vector bool char, vector signed char);
22459 vector bool char vec_and (vector bool char, vector bool char);
22460 vector signed char vec_and (vector signed char, vector bool char);
22461 vector signed char vec_and (vector signed char, vector signed char);
22462 vector unsigned char vec_and (vector bool char, vector unsigned char);
22463 vector unsigned char vec_and (vector unsigned char, vector bool char);
22464 vector unsigned char vec_and (vector unsigned char,
22465 vector unsigned char);
22467 vector float vec_andc (vector float, vector float);
22468 vector float vec_andc (vector float, vector bool int);
22469 vector float vec_andc (vector bool int, vector float);
22470 vector bool int vec_andc (vector bool int, vector bool int);
22471 vector signed int vec_andc (vector bool int, vector signed int);
22472 vector signed int vec_andc (vector signed int, vector bool int);
22473 vector signed int vec_andc (vector signed int, vector signed int);
22474 vector unsigned int vec_andc (vector bool int, vector unsigned int);
22475 vector unsigned int vec_andc (vector unsigned int, vector bool int);
22476 vector unsigned int vec_andc (vector unsigned int, vector unsigned int);
22477 vector bool short vec_andc (vector bool short, vector bool short);
22478 vector signed short vec_andc (vector bool short, vector signed short);
22479 vector signed short vec_andc (vector signed short, vector bool short);
22480 vector signed short vec_andc (vector signed short, vector signed short);
22481 vector unsigned short vec_andc (vector bool short,
22482 vector unsigned short);
22483 vector unsigned short vec_andc (vector unsigned short,
22484 vector bool short);
22485 vector unsigned short vec_andc (vector unsigned short,
22486 vector unsigned short);
22487 vector signed char vec_andc (vector bool char, vector signed char);
22488 vector bool char vec_andc (vector bool char, vector bool char);
22489 vector signed char vec_andc (vector signed char, vector bool char);
22490 vector signed char vec_andc (vector signed char, vector signed char);
22491 vector unsigned char vec_andc (vector bool char, vector unsigned char);
22492 vector unsigned char vec_andc (vector unsigned char, vector bool char);
22493 vector unsigned char vec_andc (vector unsigned char,
22494 vector unsigned char);
22496 vector unsigned char vec_avg (vector unsigned char,
22497 vector unsigned char);
22498 vector signed char vec_avg (vector signed char, vector signed char);
22499 vector unsigned short vec_avg (vector unsigned short,
22500 vector unsigned short);
22501 vector signed short vec_avg (vector signed short, vector signed short);
22502 vector unsigned int vec_avg (vector unsigned int, vector unsigned int);
22503 vector signed int vec_avg (vector signed int, vector signed int);
22505 vector signed int vec_vavgsw (vector signed int, vector signed int);
22507 vector unsigned int vec_vavguw (vector unsigned int,
22508 vector unsigned int);
22510 vector signed short vec_vavgsh (vector signed short,
22511 vector signed short);
22513 vector unsigned short vec_vavguh (vector unsigned short,
22514 vector unsigned short);
22516 vector signed char vec_vavgsb (vector signed char, vector signed char);
22518 vector unsigned char vec_vavgub (vector unsigned char,
22519 vector unsigned char);
22521 vector float vec_ceil (vector float);
22523 vector signed int vec_cmpb (vector float, vector float);
22525 vector bool char vec_cmpeq (vector signed char, vector signed char);
22526 vector bool char vec_cmpeq (vector unsigned char, vector unsigned char);
22527 vector bool short vec_cmpeq (vector signed short, vector signed short);
22528 vector bool short vec_cmpeq (vector unsigned short,
22529 vector unsigned short);
22530 vector bool int vec_cmpeq (vector signed int, vector signed int);
22531 vector bool int vec_cmpeq (vector unsigned int, vector unsigned int);
22532 vector bool int vec_cmpeq (vector float, vector float);
22534 vector bool int vec_vcmpeqfp (vector float, vector float);
22536 vector bool int vec_vcmpequw (vector signed int, vector signed int);
22537 vector bool int vec_vcmpequw (vector unsigned int, vector unsigned int);
22539 vector bool short vec_vcmpequh (vector signed short,
22540 vector signed short);
22541 vector bool short vec_vcmpequh (vector unsigned short,
22542 vector unsigned short);
22544 vector bool char vec_vcmpequb (vector signed char, vector signed char);
22545 vector bool char vec_vcmpequb (vector unsigned char,
22546 vector unsigned char);
22548 vector bool int vec_cmpge (vector float, vector float);
22550 vector bool char vec_cmpgt (vector unsigned char, vector unsigned char);
22551 vector bool char vec_cmpgt (vector signed char, vector signed char);
22552 vector bool short vec_cmpgt (vector unsigned short,
22553 vector unsigned short);
22554 vector bool short vec_cmpgt (vector signed short, vector signed short);
22555 vector bool int vec_cmpgt (vector unsigned int, vector unsigned int);
22556 vector bool int vec_cmpgt (vector signed int, vector signed int);
22557 vector bool int vec_cmpgt (vector float, vector float);
22559 vector bool int vec_vcmpgtfp (vector float, vector float);
22561 vector bool int vec_vcmpgtsw (vector signed int, vector signed int);
22563 vector bool int vec_vcmpgtuw (vector unsigned int, vector unsigned int);
22565 vector bool short vec_vcmpgtsh (vector signed short,
22566 vector signed short);
22568 vector bool short vec_vcmpgtuh (vector unsigned short,
22569 vector unsigned short);
22571 vector bool char vec_vcmpgtsb (vector signed char, vector signed char);
22573 vector bool char vec_vcmpgtub (vector unsigned char,
22574 vector unsigned char);
22576 vector bool int vec_cmple (vector float, vector float);
22578 vector bool char vec_cmplt (vector unsigned char, vector unsigned char);
22579 vector bool char vec_cmplt (vector signed char, vector signed char);
22580 vector bool short vec_cmplt (vector unsigned short,
22581 vector unsigned short);
22582 vector bool short vec_cmplt (vector signed short, vector signed short);
22583 vector bool int vec_cmplt (vector unsigned int, vector unsigned int);
22584 vector bool int vec_cmplt (vector signed int, vector signed int);
22585 vector bool int vec_cmplt (vector float, vector float);
22587 vector float vec_ctf (vector unsigned int, const int);
22588 vector float vec_ctf (vector signed int, const int);
22590 vector float vec_vcfsx (vector signed int, const int);
22592 vector float vec_vcfux (vector unsigned int, const int);
22594 vector signed int vec_cts (vector float, const int);
22596 vector unsigned int vec_ctu (vector float, const int);
22598 void vec_dss (const int);
22600 void vec_dssall (void);
22602 void vec_dst (const vector unsigned char *, int, const int);
22603 void vec_dst (const vector signed char *, int, const int);
22604 void vec_dst (const vector bool char *, int, const int);
22605 void vec_dst (const vector unsigned short *, int, const int);
22606 void vec_dst (const vector signed short *, int, const int);
22607 void vec_dst (const vector bool short *, int, const int);
22608 void vec_dst (const vector pixel *, int, const int);
22609 void vec_dst (const vector unsigned int *, int, const int);
22610 void vec_dst (const vector signed int *, int, const int);
22611 void vec_dst (const vector bool int *, int, const int);
22612 void vec_dst (const vector float *, int, const int);
22613 void vec_dst (const unsigned char *, int, const int);
22614 void vec_dst (const signed char *, int, const int);
22615 void vec_dst (const unsigned short *, int, const int);
22616 void vec_dst (const short *, int, const int);
22617 void vec_dst (const unsigned int *, int, const int);
22618 void vec_dst (const int *, int, const int);
22619 void vec_dst (const unsigned long *, int, const int);
22620 void vec_dst (const long *, int, const int);
22621 void vec_dst (const float *, int, const int);
22623 void vec_dstst (const vector unsigned char *, int, const int);
22624 void vec_dstst (const vector signed char *, int, const int);
22625 void vec_dstst (const vector bool char *, int, const int);
22626 void vec_dstst (const vector unsigned short *, int, const int);
22627 void vec_dstst (const vector signed short *, int, const int);
22628 void vec_dstst (const vector bool short *, int, const int);
22629 void vec_dstst (const vector pixel *, int, const int);
22630 void vec_dstst (const vector unsigned int *, int, const int);
22631 void vec_dstst (const vector signed int *, int, const int);
22632 void vec_dstst (const vector bool int *, int, const int);
22633 void vec_dstst (const vector float *, int, const int);
22634 void vec_dstst (const unsigned char *, int, const int);
22635 void vec_dstst (const signed char *, int, const int);
22636 void vec_dstst (const unsigned short *, int, const int);
22637 void vec_dstst (const short *, int, const int);
22638 void vec_dstst (const unsigned int *, int, const int);
22639 void vec_dstst (const int *, int, const int);
22640 void vec_dstst (const unsigned long *, int, const int);
22641 void vec_dstst (const long *, int, const int);
22642 void vec_dstst (const float *, int, const int);
22644 void vec_dststt (const vector unsigned char *, int, const int);
22645 void vec_dststt (const vector signed char *, int, const int);
22646 void vec_dststt (const vector bool char *, int, const int);
22647 void vec_dststt (const vector unsigned short *, int, const int);
22648 void vec_dststt (const vector signed short *, int, const int);
22649 void vec_dststt (const vector bool short *, int, const int);
22650 void vec_dststt (const vector pixel *, int, const int);
22651 void vec_dststt (const vector unsigned int *, int, const int);
22652 void vec_dststt (const vector signed int *, int, const int);
22653 void vec_dststt (const vector bool int *, int, const int);
22654 void vec_dststt (const vector float *, int, const int);
22655 void vec_dststt (const unsigned char *, int, const int);
22656 void vec_dststt (const signed char *, int, const int);
22657 void vec_dststt (const unsigned short *, int, const int);
22658 void vec_dststt (const short *, int, const int);
22659 void vec_dststt (const unsigned int *, int, const int);
22660 void vec_dststt (const int *, int, const int);
22661 void vec_dststt (const unsigned long *, int, const int);
22662 void vec_dststt (const long *, int, const int);
22663 void vec_dststt (const float *, int, const int);
22665 void vec_dstt (const vector unsigned char *, int, const int);
22666 void vec_dstt (const vector signed char *, int, const int);
22667 void vec_dstt (const vector bool char *, int, const int);
22668 void vec_dstt (const vector unsigned short *, int, const int);
22669 void vec_dstt (const vector signed short *, int, const int);
22670 void vec_dstt (const vector bool short *, int, const int);
22671 void vec_dstt (const vector pixel *, int, const int);
22672 void vec_dstt (const vector unsigned int *, int, const int);
22673 void vec_dstt (const vector signed int *, int, const int);
22674 void vec_dstt (const vector bool int *, int, const int);
22675 void vec_dstt (const vector float *, int, const int);
22676 void vec_dstt (const unsigned char *, int, const int);
22677 void vec_dstt (const signed char *, int, const int);
22678 void vec_dstt (const unsigned short *, int, const int);
22679 void vec_dstt (const short *, int, const int);
22680 void vec_dstt (const unsigned int *, int, const int);
22681 void vec_dstt (const int *, int, const int);
22682 void vec_dstt (const unsigned long *, int, const int);
22683 void vec_dstt (const long *, int, const int);
22684 void vec_dstt (const float *, int, const int);
22686 vector float vec_expte (vector float);
22688 vector float vec_floor (vector float);
22690 vector float vec_ld (int, const vector float *);
22691 vector float vec_ld (int, const float *);
22692 vector bool int vec_ld (int, const vector bool int *);
22693 vector signed int vec_ld (int, const vector signed int *);
22694 vector signed int vec_ld (int, const int *);
22695 vector signed int vec_ld (int, const long *);
22696 vector unsigned int vec_ld (int, const vector unsigned int *);
22697 vector unsigned int vec_ld (int, const unsigned int *);
22698 vector unsigned int vec_ld (int, const unsigned long *);
22699 vector bool short vec_ld (int, const vector bool short *);
22700 vector pixel vec_ld (int, const vector pixel *);
22701 vector signed short vec_ld (int, const vector signed short *);
22702 vector signed short vec_ld (int, const short *);
22703 vector unsigned short vec_ld (int, const vector unsigned short *);
22704 vector unsigned short vec_ld (int, const unsigned short *);
22705 vector bool char vec_ld (int, const vector bool char *);
22706 vector signed char vec_ld (int, const vector signed char *);
22707 vector signed char vec_ld (int, const signed char *);
22708 vector unsigned char vec_ld (int, const vector unsigned char *);
22709 vector unsigned char vec_ld (int, const unsigned char *);
22711 vector signed char vec_lde (int, const signed char *);
22712 vector unsigned char vec_lde (int, const unsigned char *);
22713 vector signed short vec_lde (int, const short *);
22714 vector unsigned short vec_lde (int, const unsigned short *);
22715 vector float vec_lde (int, const float *);
22716 vector signed int vec_lde (int, const int *);
22717 vector unsigned int vec_lde (int, const unsigned int *);
22718 vector signed int vec_lde (int, const long *);
22719 vector unsigned int vec_lde (int, const unsigned long *);
22721 vector float vec_lvewx (int, float *);
22722 vector signed int vec_lvewx (int, int *);
22723 vector unsigned int vec_lvewx (int, unsigned int *);
22724 vector signed int vec_lvewx (int, long *);
22725 vector unsigned int vec_lvewx (int, unsigned long *);
22727 vector signed short vec_lvehx (int, short *);
22728 vector unsigned short vec_lvehx (int, unsigned short *);
22730 vector signed char vec_lvebx (int, char *);
22731 vector unsigned char vec_lvebx (int, unsigned char *);
22733 vector float vec_ldl (int, const vector float *);
22734 vector float vec_ldl (int, const float *);
22735 vector bool int vec_ldl (int, const vector bool int *);
22736 vector signed int vec_ldl (int, const vector signed int *);
22737 vector signed int vec_ldl (int, const int *);
22738 vector signed int vec_ldl (int, const long *);
22739 vector unsigned int vec_ldl (int, const vector unsigned int *);
22740 vector unsigned int vec_ldl (int, const unsigned int *);
22741 vector unsigned int vec_ldl (int, const unsigned long *);
22742 vector bool short vec_ldl (int, const vector bool short *);
22743 vector pixel vec_ldl (int, const vector pixel *);
22744 vector signed short vec_ldl (int, const vector signed short *);
22745 vector signed short vec_ldl (int, const short *);
22746 vector unsigned short vec_ldl (int, const vector unsigned short *);
22747 vector unsigned short vec_ldl (int, const unsigned short *);
22748 vector bool char vec_ldl (int, const vector bool char *);
22749 vector signed char vec_ldl (int, const vector signed char *);
22750 vector signed char vec_ldl (int, const signed char *);
22751 vector unsigned char vec_ldl (int, const vector unsigned char *);
22752 vector unsigned char vec_ldl (int, const unsigned char *);
22754 vector float vec_loge (vector float);
22756 vector unsigned char vec_lvsl (int, const volatile unsigned char *);
22757 vector unsigned char vec_lvsl (int, const volatile signed char *);
22758 vector unsigned char vec_lvsl (int, const volatile unsigned short *);
22759 vector unsigned char vec_lvsl (int, const volatile short *);
22760 vector unsigned char vec_lvsl (int, const volatile unsigned int *);
22761 vector unsigned char vec_lvsl (int, const volatile int *);
22762 vector unsigned char vec_lvsl (int, const volatile unsigned long *);
22763 vector unsigned char vec_lvsl (int, const volatile long *);
22764 vector unsigned char vec_lvsl (int, const volatile float *);
22766 vector unsigned char vec_lvsr (int, const volatile unsigned char *);
22767 vector unsigned char vec_lvsr (int, const volatile signed char *);
22768 vector unsigned char vec_lvsr (int, const volatile unsigned short *);
22769 vector unsigned char vec_lvsr (int, const volatile short *);
22770 vector unsigned char vec_lvsr (int, const volatile unsigned int *);
22771 vector unsigned char vec_lvsr (int, const volatile int *);
22772 vector unsigned char vec_lvsr (int, const volatile unsigned long *);
22773 vector unsigned char vec_lvsr (int, const volatile long *);
22774 vector unsigned char vec_lvsr (int, const volatile float *);
22776 vector float vec_madd (vector float, vector float, vector float);
22778 vector signed short vec_madds (vector signed short,
22779 vector signed short,
22780 vector signed short);
22782 vector unsigned char vec_max (vector bool char, vector unsigned char);
22783 vector unsigned char vec_max (vector unsigned char, vector bool char);
22784 vector unsigned char vec_max (vector unsigned char,
22785 vector unsigned char);
22786 vector signed char vec_max (vector bool char, vector signed char);
22787 vector signed char vec_max (vector signed char, vector bool char);
22788 vector signed char vec_max (vector signed char, vector signed char);
22789 vector unsigned short vec_max (vector bool short,
22790 vector unsigned short);
22791 vector unsigned short vec_max (vector unsigned short,
22792 vector bool short);
22793 vector unsigned short vec_max (vector unsigned short,
22794 vector unsigned short);
22795 vector signed short vec_max (vector bool short, vector signed short);
22796 vector signed short vec_max (vector signed short, vector bool short);
22797 vector signed short vec_max (vector signed short, vector signed short);
22798 vector unsigned int vec_max (vector bool int, vector unsigned int);
22799 vector unsigned int vec_max (vector unsigned int, vector bool int);
22800 vector unsigned int vec_max (vector unsigned int, vector unsigned int);
22801 vector signed int vec_max (vector bool int, vector signed int);
22802 vector signed int vec_max (vector signed int, vector bool int);
22803 vector signed int vec_max (vector signed int, vector signed int);
22804 vector float vec_max (vector float, vector float);
22806 vector float vec_vmaxfp (vector float, vector float);
22808 vector signed int vec_vmaxsw (vector bool int, vector signed int);
22809 vector signed int vec_vmaxsw (vector signed int, vector bool int);
22810 vector signed int vec_vmaxsw (vector signed int, vector signed int);
22812 vector unsigned int vec_vmaxuw (vector bool int, vector unsigned int);
22813 vector unsigned int vec_vmaxuw (vector unsigned int, vector bool int);
22814 vector unsigned int vec_vmaxuw (vector unsigned int,
22815 vector unsigned int);
22817 vector signed short vec_vmaxsh (vector bool short, vector signed short);
22818 vector signed short vec_vmaxsh (vector signed short, vector bool short);
22819 vector signed short vec_vmaxsh (vector signed short,
22820 vector signed short);
22822 vector unsigned short vec_vmaxuh (vector bool short,
22823 vector unsigned short);
22824 vector unsigned short vec_vmaxuh (vector unsigned short,
22825 vector bool short);
22826 vector unsigned short vec_vmaxuh (vector unsigned short,
22827 vector unsigned short);
22829 vector signed char vec_vmaxsb (vector bool char, vector signed char);
22830 vector signed char vec_vmaxsb (vector signed char, vector bool char);
22831 vector signed char vec_vmaxsb (vector signed char, vector signed char);
22833 vector unsigned char vec_vmaxub (vector bool char,
22834 vector unsigned char);
22835 vector unsigned char vec_vmaxub (vector unsigned char,
22837 vector unsigned char vec_vmaxub (vector unsigned char,
22838 vector unsigned char);
22840 vector bool char vec_mergeh (vector bool char, vector bool char);
22841 vector signed char vec_mergeh (vector signed char, vector signed char);
22842 vector unsigned char vec_mergeh (vector unsigned char,
22843 vector unsigned char);
22844 vector bool short vec_mergeh (vector bool short, vector bool short);
22845 vector pixel vec_mergeh (vector pixel, vector pixel);
22846 vector signed short vec_mergeh (vector signed short,
22847 vector signed short);
22848 vector unsigned short vec_mergeh (vector unsigned short,
22849 vector unsigned short);
22850 vector float vec_mergeh (vector float, vector float);
22851 vector bool int vec_mergeh (vector bool int, vector bool int);
22852 vector signed int vec_mergeh (vector signed int, vector signed int);
22853 vector unsigned int vec_mergeh (vector unsigned int,
22854 vector unsigned int);
22856 vector float vec_vmrghw (vector float, vector float);
22857 vector bool int vec_vmrghw (vector bool int, vector bool int);
22858 vector signed int vec_vmrghw (vector signed int, vector signed int);
22859 vector unsigned int vec_vmrghw (vector unsigned int,
22860 vector unsigned int);
22862 vector bool short vec_vmrghh (vector bool short, vector bool short);
22863 vector signed short vec_vmrghh (vector signed short,
22864 vector signed short);
22865 vector unsigned short vec_vmrghh (vector unsigned short,
22866 vector unsigned short);
22867 vector pixel vec_vmrghh (vector pixel, vector pixel);
22869 vector bool char vec_vmrghb (vector bool char, vector bool char);
22870 vector signed char vec_vmrghb (vector signed char, vector signed char);
22871 vector unsigned char vec_vmrghb (vector unsigned char,
22872 vector unsigned char);
22874 vector bool char vec_mergel (vector bool char, vector bool char);
22875 vector signed char vec_mergel (vector signed char, vector signed char);
22876 vector unsigned char vec_mergel (vector unsigned char,
22877 vector unsigned char);
22878 vector bool short vec_mergel (vector bool short, vector bool short);
22879 vector pixel vec_mergel (vector pixel, vector pixel);
22880 vector signed short vec_mergel (vector signed short,
22881 vector signed short);
22882 vector unsigned short vec_mergel (vector unsigned short,
22883 vector unsigned short);
22884 vector float vec_mergel (vector float, vector float);
22885 vector bool int vec_mergel (vector bool int, vector bool int);
22886 vector signed int vec_mergel (vector signed int, vector signed int);
22887 vector unsigned int vec_mergel (vector unsigned int,
22888 vector unsigned int);
22890 vector float vec_vmrglw (vector float, vector float);
22891 vector signed int vec_vmrglw (vector signed int, vector signed int);
22892 vector unsigned int vec_vmrglw (vector unsigned int,
22893 vector unsigned int);
22894 vector bool int vec_vmrglw (vector bool int, vector bool int);
22896 vector bool short vec_vmrglh (vector bool short, vector bool short);
22897 vector signed short vec_vmrglh (vector signed short,
22898 vector signed short);
22899 vector unsigned short vec_vmrglh (vector unsigned short,
22900 vector unsigned short);
22901 vector pixel vec_vmrglh (vector pixel, vector pixel);
22903 vector bool char vec_vmrglb (vector bool char, vector bool char);
22904 vector signed char vec_vmrglb (vector signed char, vector signed char);
22905 vector unsigned char vec_vmrglb (vector unsigned char,
22906 vector unsigned char);
22908 vector unsigned short vec_mfvscr (void);
22910 vector unsigned char vec_min (vector bool char, vector unsigned char);
22911 vector unsigned char vec_min (vector unsigned char, vector bool char);
22912 vector unsigned char vec_min (vector unsigned char,
22913 vector unsigned char);
22914 vector signed char vec_min (vector bool char, vector signed char);
22915 vector signed char vec_min (vector signed char, vector bool char);
22916 vector signed char vec_min (vector signed char, vector signed char);
22917 vector unsigned short vec_min (vector bool short,
22918 vector unsigned short);
22919 vector unsigned short vec_min (vector unsigned short,
22920 vector bool short);
22921 vector unsigned short vec_min (vector unsigned short,
22922 vector unsigned short);
22923 vector signed short vec_min (vector bool short, vector signed short);
22924 vector signed short vec_min (vector signed short, vector bool short);
22925 vector signed short vec_min (vector signed short, vector signed short);
22926 vector unsigned int vec_min (vector bool int, vector unsigned int);
22927 vector unsigned int vec_min (vector unsigned int, vector bool int);
22928 vector unsigned int vec_min (vector unsigned int, vector unsigned int);
22929 vector signed int vec_min (vector bool int, vector signed int);
22930 vector signed int vec_min (vector signed int, vector bool int);
22931 vector signed int vec_min (vector signed int, vector signed int);
22932 vector float vec_min (vector float, vector float);
22934 vector float vec_vminfp (vector float, vector float);
22936 vector signed int vec_vminsw (vector bool int, vector signed int);
22937 vector signed int vec_vminsw (vector signed int, vector bool int);
22938 vector signed int vec_vminsw (vector signed int, vector signed int);
22940 vector unsigned int vec_vminuw (vector bool int, vector unsigned int);
22941 vector unsigned int vec_vminuw (vector unsigned int, vector bool int);
22942 vector unsigned int vec_vminuw (vector unsigned int,
22943 vector unsigned int);
22945 vector signed short vec_vminsh (vector bool short, vector signed short);
22946 vector signed short vec_vminsh (vector signed short, vector bool short);
22947 vector signed short vec_vminsh (vector signed short,
22948 vector signed short);
22950 vector unsigned short vec_vminuh (vector bool short,
22951 vector unsigned short);
22952 vector unsigned short vec_vminuh (vector unsigned short,
22953 vector bool short);
22954 vector unsigned short vec_vminuh (vector unsigned short,
22955 vector unsigned short);
22957 vector signed char vec_vminsb (vector bool char, vector signed char);
22958 vector signed char vec_vminsb (vector signed char, vector bool char);
22959 vector signed char vec_vminsb (vector signed char, vector signed char);
22961 vector unsigned char vec_vminub (vector bool char,
22962 vector unsigned char);
22963 vector unsigned char vec_vminub (vector unsigned char,
22965 vector unsigned char vec_vminub (vector unsigned char,
22966 vector unsigned char);
22968 vector signed short vec_mladd (vector signed short,
22969 vector signed short,
22970 vector signed short);
22971 vector signed short vec_mladd (vector signed short,
22972 vector unsigned short,
22973 vector unsigned short);
22974 vector signed short vec_mladd (vector unsigned short,
22975 vector signed short,
22976 vector signed short);
22977 vector unsigned short vec_mladd (vector unsigned short,
22978 vector unsigned short,
22979 vector unsigned short);
22981 vector signed short vec_mradds (vector signed short,
22982 vector signed short,
22983 vector signed short);
22985 vector unsigned int vec_msum (vector unsigned char,
22986 vector unsigned char,
22987 vector unsigned int);
22988 vector signed int vec_msum (vector signed char,
22989 vector unsigned char,
22990 vector signed int);
22991 vector unsigned int vec_msum (vector unsigned short,
22992 vector unsigned short,
22993 vector unsigned int);
22994 vector signed int vec_msum (vector signed short,
22995 vector signed short,
22996 vector signed int);
22998 vector signed int vec_vmsumshm (vector signed short,
22999 vector signed short,
23000 vector signed int);
23002 vector unsigned int vec_vmsumuhm (vector unsigned short,
23003 vector unsigned short,
23004 vector unsigned int);
23006 vector signed int vec_vmsummbm (vector signed char,
23007 vector unsigned char,
23008 vector signed int);
23010 vector unsigned int vec_vmsumubm (vector unsigned char,
23011 vector unsigned char,
23012 vector unsigned int);
23014 vector unsigned int vec_msums (vector unsigned short,
23015 vector unsigned short,
23016 vector unsigned int);
23017 vector signed int vec_msums (vector signed short,
23018 vector signed short,
23019 vector signed int);
23021 vector signed int vec_vmsumshs (vector signed short,
23022 vector signed short,
23023 vector signed int);
23025 vector unsigned int vec_vmsumuhs (vector unsigned short,
23026 vector unsigned short,
23027 vector unsigned int);
23029 void vec_mtvscr (vector signed int);
23030 void vec_mtvscr (vector unsigned int);
23031 void vec_mtvscr (vector bool int);
23032 void vec_mtvscr (vector signed short);
23033 void vec_mtvscr (vector unsigned short);
23034 void vec_mtvscr (vector bool short);
23035 void vec_mtvscr (vector pixel);
23036 void vec_mtvscr (vector signed char);
23037 void vec_mtvscr (vector unsigned char);
23038 void vec_mtvscr (vector bool char);
23040 vector unsigned short vec_mule (vector unsigned char,
23041 vector unsigned char);
23042 vector signed short vec_mule (vector signed char,
23043 vector signed char);
23044 vector unsigned int vec_mule (vector unsigned short,
23045 vector unsigned short);
23046 vector signed int vec_mule (vector signed short, vector signed short);
23048 vector signed int vec_vmulesh (vector signed short,
23049 vector signed short);
23051 vector unsigned int vec_vmuleuh (vector unsigned short,
23052 vector unsigned short);
23054 vector signed short vec_vmulesb (vector signed char,
23055 vector signed char);
23057 vector unsigned short vec_vmuleub (vector unsigned char,
23058 vector unsigned char);
23060 vector unsigned short vec_mulo (vector unsigned char,
23061 vector unsigned char);
23062 vector signed short vec_mulo (vector signed char, vector signed char);
23063 vector unsigned int vec_mulo (vector unsigned short,
23064 vector unsigned short);
23065 vector signed int vec_mulo (vector signed short, vector signed short);
23067 vector signed int vec_vmulosh (vector signed short,
23068 vector signed short);
23070 vector unsigned int vec_vmulouh (vector unsigned short,
23071 vector unsigned short);
23073 vector signed short vec_vmulosb (vector signed char,
23074 vector signed char);
23076 vector unsigned short vec_vmuloub (vector unsigned char,
23077 vector unsigned char);
23079 vector float vec_nmsub (vector float, vector float, vector float);
23081 vector float vec_nor (vector float, vector float);
23082 vector signed int vec_nor (vector signed int, vector signed int);
23083 vector unsigned int vec_nor (vector unsigned int, vector unsigned int);
23084 vector bool int vec_nor (vector bool int, vector bool int);
23085 vector signed short vec_nor (vector signed short, vector signed short);
23086 vector unsigned short vec_nor (vector unsigned short,
23087 vector unsigned short);
23088 vector bool short vec_nor (vector bool short, vector bool short);
23089 vector signed char vec_nor (vector signed char, vector signed char);
23090 vector unsigned char vec_nor (vector unsigned char,
23091 vector unsigned char);
23092 vector bool char vec_nor (vector bool char, vector bool char);
23094 vector float vec_or (vector float, vector float);
23095 vector float vec_or (vector float, vector bool int);
23096 vector float vec_or (vector bool int, vector float);
23097 vector bool int vec_or (vector bool int, vector bool int);
23098 vector signed int vec_or (vector bool int, vector signed int);
23099 vector signed int vec_or (vector signed int, vector bool int);
23100 vector signed int vec_or (vector signed int, vector signed int);
23101 vector unsigned int vec_or (vector bool int, vector unsigned int);
23102 vector unsigned int vec_or (vector unsigned int, vector bool int);
23103 vector unsigned int vec_or (vector unsigned int, vector unsigned int);
23104 vector bool short vec_or (vector bool short, vector bool short);
23105 vector signed short vec_or (vector bool short, vector signed short);
23106 vector signed short vec_or (vector signed short, vector bool short);
23107 vector signed short vec_or (vector signed short, vector signed short);
23108 vector unsigned short vec_or (vector bool short, vector unsigned short);
23109 vector unsigned short vec_or (vector unsigned short, vector bool short);
23110 vector unsigned short vec_or (vector unsigned short,
23111 vector unsigned short);
23112 vector signed char vec_or (vector bool char, vector signed char);
23113 vector bool char vec_or (vector bool char, vector bool char);
23114 vector signed char vec_or (vector signed char, vector bool char);
23115 vector signed char vec_or (vector signed char, vector signed char);
23116 vector unsigned char vec_or (vector bool char, vector unsigned char);
23117 vector unsigned char vec_or (vector unsigned char, vector bool char);
23118 vector unsigned char vec_or (vector unsigned char,
23119 vector unsigned char);
23121 vector signed char vec_pack (vector signed short, vector signed short);
23122 vector unsigned char vec_pack (vector unsigned short,
23123 vector unsigned short);
23124 vector bool char vec_pack (vector bool short, vector bool short);
23125 vector signed short vec_pack (vector signed int, vector signed int);
23126 vector unsigned short vec_pack (vector unsigned int,
23127 vector unsigned int);
23128 vector bool short vec_pack (vector bool int, vector bool int);
23130 vector bool short vec_vpkuwum (vector bool int, vector bool int);
23131 vector signed short vec_vpkuwum (vector signed int, vector signed int);
23132 vector unsigned short vec_vpkuwum (vector unsigned int,
23133 vector unsigned int);
23135 vector bool char vec_vpkuhum (vector bool short, vector bool short);
23136 vector signed char vec_vpkuhum (vector signed short,
23137 vector signed short);
23138 vector unsigned char vec_vpkuhum (vector unsigned short,
23139 vector unsigned short);
23141 vector pixel vec_packpx (vector unsigned int, vector unsigned int);
23143 vector unsigned char vec_packs (vector unsigned short,
23144 vector unsigned short);
23145 vector signed char vec_packs (vector signed short, vector signed short);
23146 vector unsigned short vec_packs (vector unsigned int,
23147 vector unsigned int);
23148 vector signed short vec_packs (vector signed int, vector signed int);
23150 vector signed short vec_vpkswss (vector signed int, vector signed int);
23152 vector unsigned short vec_vpkuwus (vector unsigned int,
23153 vector unsigned int);
23155 vector signed char vec_vpkshss (vector signed short,
23156 vector signed short);
23158 vector unsigned char vec_vpkuhus (vector unsigned short,
23159 vector unsigned short);
23161 vector unsigned char vec_packsu (vector unsigned short,
23162 vector unsigned short);
23163 vector unsigned char vec_packsu (vector signed short,
23164 vector signed short);
23165 vector unsigned short vec_packsu (vector unsigned int,
23166 vector unsigned int);
23167 vector unsigned short vec_packsu (vector signed int, vector signed int);
23169 vector unsigned short vec_vpkswus (vector signed int,
23170 vector signed int);
23172 vector unsigned char vec_vpkshus (vector signed short,
23173 vector signed short);
23175 vector float vec_perm (vector float,
23177 vector unsigned char);
23178 vector signed int vec_perm (vector signed int,
23180 vector unsigned char);
23181 vector unsigned int vec_perm (vector unsigned int,
23182 vector unsigned int,
23183 vector unsigned char);
23184 vector bool int vec_perm (vector bool int,
23186 vector unsigned char);
23187 vector signed short vec_perm (vector signed short,
23188 vector signed short,
23189 vector unsigned char);
23190 vector unsigned short vec_perm (vector unsigned short,
23191 vector unsigned short,
23192 vector unsigned char);
23193 vector bool short vec_perm (vector bool short,
23195 vector unsigned char);
23196 vector pixel vec_perm (vector pixel,
23198 vector unsigned char);
23199 vector signed char vec_perm (vector signed char,
23200 vector signed char,
23201 vector unsigned char);
23202 vector unsigned char vec_perm (vector unsigned char,
23203 vector unsigned char,
23204 vector unsigned char);
23205 vector bool char vec_perm (vector bool char,
23207 vector unsigned char);
23209 vector float vec_re (vector float);
23211 vector signed char vec_rl (vector signed char,
23212 vector unsigned char);
23213 vector unsigned char vec_rl (vector unsigned char,
23214 vector unsigned char);
23215 vector signed short vec_rl (vector signed short, vector unsigned short);
23216 vector unsigned short vec_rl (vector unsigned short,
23217 vector unsigned short);
23218 vector signed int vec_rl (vector signed int, vector unsigned int);
23219 vector unsigned int vec_rl (vector unsigned int, vector unsigned int);
23221 vector signed int vec_vrlw (vector signed int, vector unsigned int);
23222 vector unsigned int vec_vrlw (vector unsigned int, vector unsigned int);
23224 vector signed short vec_vrlh (vector signed short,
23225 vector unsigned short);
23226 vector unsigned short vec_vrlh (vector unsigned short,
23227 vector unsigned short);
23229 vector signed char vec_vrlb (vector signed char, vector unsigned char);
23230 vector unsigned char vec_vrlb (vector unsigned char,
23231 vector unsigned char);
23233 vector float vec_round (vector float);
23235 vector float vec_rsqrte (vector float);
23237 vector float vec_sel (vector float, vector float, vector bool int);
23238 vector float vec_sel (vector float, vector float, vector unsigned int);
23239 vector signed int vec_sel (vector signed int,
23242 vector signed int vec_sel (vector signed int,
23244 vector unsigned int);
23245 vector unsigned int vec_sel (vector unsigned int,
23246 vector unsigned int,
23248 vector unsigned int vec_sel (vector unsigned int,
23249 vector unsigned int,
23250 vector unsigned int);
23251 vector bool int vec_sel (vector bool int,
23254 vector bool int vec_sel (vector bool int,
23256 vector unsigned int);
23257 vector signed short vec_sel (vector signed short,
23258 vector signed short,
23259 vector bool short);
23260 vector signed short vec_sel (vector signed short,
23261 vector signed short,
23262 vector unsigned short);
23263 vector unsigned short vec_sel (vector unsigned short,
23264 vector unsigned short,
23265 vector bool short);
23266 vector unsigned short vec_sel (vector unsigned short,
23267 vector unsigned short,
23268 vector unsigned short);
23269 vector bool short vec_sel (vector bool short,
23271 vector bool short);
23272 vector bool short vec_sel (vector bool short,
23274 vector unsigned short);
23275 vector signed char vec_sel (vector signed char,
23276 vector signed char,
23278 vector signed char vec_sel (vector signed char,
23279 vector signed char,
23280 vector unsigned char);
23281 vector unsigned char vec_sel (vector unsigned char,
23282 vector unsigned char,
23284 vector unsigned char vec_sel (vector unsigned char,
23285 vector unsigned char,
23286 vector unsigned char);
23287 vector bool char vec_sel (vector bool char,
23290 vector bool char vec_sel (vector bool char,
23292 vector unsigned char);
23294 vector signed char vec_sl (vector signed char,
23295 vector unsigned char);
23296 vector unsigned char vec_sl (vector unsigned char,
23297 vector unsigned char);
23298 vector signed short vec_sl (vector signed short, vector unsigned short);
23299 vector unsigned short vec_sl (vector unsigned short,
23300 vector unsigned short);
23301 vector signed int vec_sl (vector signed int, vector unsigned int);
23302 vector unsigned int vec_sl (vector unsigned int, vector unsigned int);
23304 vector signed int vec_vslw (vector signed int, vector unsigned int);
23305 vector unsigned int vec_vslw (vector unsigned int, vector unsigned int);
23307 vector signed short vec_vslh (vector signed short,
23308 vector unsigned short);
23309 vector unsigned short vec_vslh (vector unsigned short,
23310 vector unsigned short);
23312 vector signed char vec_vslb (vector signed char, vector unsigned char);
23313 vector unsigned char vec_vslb (vector unsigned char,
23314 vector unsigned char);
23316 vector float vec_sld (vector float, vector float, const int);
23317 vector signed int vec_sld (vector signed int,
23320 vector unsigned int vec_sld (vector unsigned int,
23321 vector unsigned int,
23323 vector bool int vec_sld (vector bool int,
23326 vector signed short vec_sld (vector signed short,
23327 vector signed short,
23329 vector unsigned short vec_sld (vector unsigned short,
23330 vector unsigned short,
23332 vector bool short vec_sld (vector bool short,
23335 vector pixel vec_sld (vector pixel,
23338 vector signed char vec_sld (vector signed char,
23339 vector signed char,
23341 vector unsigned char vec_sld (vector unsigned char,
23342 vector unsigned char,
23344 vector bool char vec_sld (vector bool char,
23348 vector signed int vec_sll (vector signed int,
23349 vector unsigned int);
23350 vector signed int vec_sll (vector signed int,
23351 vector unsigned short);
23352 vector signed int vec_sll (vector signed int,
23353 vector unsigned char);
23354 vector unsigned int vec_sll (vector unsigned int,
23355 vector unsigned int);
23356 vector unsigned int vec_sll (vector unsigned int,
23357 vector unsigned short);
23358 vector unsigned int vec_sll (vector unsigned int,
23359 vector unsigned char);
23360 vector bool int vec_sll (vector bool int,
23361 vector unsigned int);
23362 vector bool int vec_sll (vector bool int,
23363 vector unsigned short);
23364 vector bool int vec_sll (vector bool int,
23365 vector unsigned char);
23366 vector signed short vec_sll (vector signed short,
23367 vector unsigned int);
23368 vector signed short vec_sll (vector signed short,
23369 vector unsigned short);
23370 vector signed short vec_sll (vector signed short,
23371 vector unsigned char);
23372 vector unsigned short vec_sll (vector unsigned short,
23373 vector unsigned int);
23374 vector unsigned short vec_sll (vector unsigned short,
23375 vector unsigned short);
23376 vector unsigned short vec_sll (vector unsigned short,
23377 vector unsigned char);
23378 vector bool short vec_sll (vector bool short, vector unsigned int);
23379 vector bool short vec_sll (vector bool short, vector unsigned short);
23380 vector bool short vec_sll (vector bool short, vector unsigned char);
23381 vector pixel vec_sll (vector pixel, vector unsigned int);
23382 vector pixel vec_sll (vector pixel, vector unsigned short);
23383 vector pixel vec_sll (vector pixel, vector unsigned char);
23384 vector signed char vec_sll (vector signed char, vector unsigned int);
23385 vector signed char vec_sll (vector signed char, vector unsigned short);
23386 vector signed char vec_sll (vector signed char, vector unsigned char);
23387 vector unsigned char vec_sll (vector unsigned char,
23388 vector unsigned int);
23389 vector unsigned char vec_sll (vector unsigned char,
23390 vector unsigned short);
23391 vector unsigned char vec_sll (vector unsigned char,
23392 vector unsigned char);
23393 vector bool char vec_sll (vector bool char, vector unsigned int);
23394 vector bool char vec_sll (vector bool char, vector unsigned short);
23395 vector bool char vec_sll (vector bool char, vector unsigned char);
23397 vector float vec_slo (vector float, vector signed char);
23398 vector float vec_slo (vector float, vector unsigned char);
23399 vector signed int vec_slo (vector signed int, vector signed char);
23400 vector signed int vec_slo (vector signed int, vector unsigned char);
23401 vector unsigned int vec_slo (vector unsigned int, vector signed char);
23402 vector unsigned int vec_slo (vector unsigned int, vector unsigned char);
23403 vector signed short vec_slo (vector signed short, vector signed char);
23404 vector signed short vec_slo (vector signed short, vector unsigned char);
23405 vector unsigned short vec_slo (vector unsigned short,
23406 vector signed char);
23407 vector unsigned short vec_slo (vector unsigned short,
23408 vector unsigned char);
23409 vector pixel vec_slo (vector pixel, vector signed char);
23410 vector pixel vec_slo (vector pixel, vector unsigned char);
23411 vector signed char vec_slo (vector signed char, vector signed char);
23412 vector signed char vec_slo (vector signed char, vector unsigned char);
23413 vector unsigned char vec_slo (vector unsigned char, vector signed char);
23414 vector unsigned char vec_slo (vector unsigned char,
23415 vector unsigned char);
23417 vector signed char vec_splat (vector signed char, const int);
23418 vector unsigned char vec_splat (vector unsigned char, const int);
23419 vector bool char vec_splat (vector bool char, const int);
23420 vector signed short vec_splat (vector signed short, const int);
23421 vector unsigned short vec_splat (vector unsigned short, const int);
23422 vector bool short vec_splat (vector bool short, const int);
23423 vector pixel vec_splat (vector pixel, const int);
23424 vector float vec_splat (vector float, const int);
23425 vector signed int vec_splat (vector signed int, const int);
23426 vector unsigned int vec_splat (vector unsigned int, const int);
23427 vector bool int vec_splat (vector bool int, const int);
23429 vector float vec_vspltw (vector float, const int);
23430 vector signed int vec_vspltw (vector signed int, const int);
23431 vector unsigned int vec_vspltw (vector unsigned int, const int);
23432 vector bool int vec_vspltw (vector bool int, const int);
23434 vector bool short vec_vsplth (vector bool short, const int);
23435 vector signed short vec_vsplth (vector signed short, const int);
23436 vector unsigned short vec_vsplth (vector unsigned short, const int);
23437 vector pixel vec_vsplth (vector pixel, const int);
23439 vector signed char vec_vspltb (vector signed char, const int);
23440 vector unsigned char vec_vspltb (vector unsigned char, const int);
23441 vector bool char vec_vspltb (vector bool char, const int);
23443 vector signed char vec_splat_s8 (const int);
23445 vector signed short vec_splat_s16 (const int);
23447 vector signed int vec_splat_s32 (const int);
23449 vector unsigned char vec_splat_u8 (const int);
23451 vector unsigned short vec_splat_u16 (const int);
23453 vector unsigned int vec_splat_u32 (const int);
23455 vector signed char vec_sr (vector signed char, vector unsigned char);
23456 vector unsigned char vec_sr (vector unsigned char,
23457 vector unsigned char);
23458 vector signed short vec_sr (vector signed short,
23459 vector unsigned short);
23460 vector unsigned short vec_sr (vector unsigned short,
23461 vector unsigned short);
23462 vector signed int vec_sr (vector signed int, vector unsigned int);
23463 vector unsigned int vec_sr (vector unsigned int, vector unsigned int);
23465 vector signed int vec_vsrw (vector signed int, vector unsigned int);
23466 vector unsigned int vec_vsrw (vector unsigned int, vector unsigned int);
23468 vector signed short vec_vsrh (vector signed short,
23469 vector unsigned short);
23470 vector unsigned short vec_vsrh (vector unsigned short,
23471 vector unsigned short);
23473 vector signed char vec_vsrb (vector signed char, vector unsigned char);
23474 vector unsigned char vec_vsrb (vector unsigned char,
23475 vector unsigned char);
23477 vector signed char vec_sra (vector signed char, vector unsigned char);
23478 vector unsigned char vec_sra (vector unsigned char,
23479 vector unsigned char);
23480 vector signed short vec_sra (vector signed short,
23481 vector unsigned short);
23482 vector unsigned short vec_sra (vector unsigned short,
23483 vector unsigned short);
23484 vector signed int vec_sra (vector signed int, vector unsigned int);
23485 vector unsigned int vec_sra (vector unsigned int, vector unsigned int);
23487 vector signed int vec_vsraw (vector signed int, vector unsigned int);
23488 vector unsigned int vec_vsraw (vector unsigned int,
23489 vector unsigned int);
23491 vector signed short vec_vsrah (vector signed short,
23492 vector unsigned short);
23493 vector unsigned short vec_vsrah (vector unsigned short,
23494 vector unsigned short);
23496 vector signed char vec_vsrab (vector signed char, vector unsigned char);
23497 vector unsigned char vec_vsrab (vector unsigned char,
23498 vector unsigned char);
23500 vector signed int vec_srl (vector signed int, vector unsigned int);
23501 vector signed int vec_srl (vector signed int, vector unsigned short);
23502 vector signed int vec_srl (vector signed int, vector unsigned char);
23503 vector unsigned int vec_srl (vector unsigned int, vector unsigned int);
23504 vector unsigned int vec_srl (vector unsigned int,
23505 vector unsigned short);
23506 vector unsigned int vec_srl (vector unsigned int, vector unsigned char);
23507 vector bool int vec_srl (vector bool int, vector unsigned int);
23508 vector bool int vec_srl (vector bool int, vector unsigned short);
23509 vector bool int vec_srl (vector bool int, vector unsigned char);
23510 vector signed short vec_srl (vector signed short, vector unsigned int);
23511 vector signed short vec_srl (vector signed short,
23512 vector unsigned short);
23513 vector signed short vec_srl (vector signed short, vector unsigned char);
23514 vector unsigned short vec_srl (vector unsigned short,
23515 vector unsigned int);
23516 vector unsigned short vec_srl (vector unsigned short,
23517 vector unsigned short);
23518 vector unsigned short vec_srl (vector unsigned short,
23519 vector unsigned char);
23520 vector bool short vec_srl (vector bool short, vector unsigned int);
23521 vector bool short vec_srl (vector bool short, vector unsigned short);
23522 vector bool short vec_srl (vector bool short, vector unsigned char);
23523 vector pixel vec_srl (vector pixel, vector unsigned int);
23524 vector pixel vec_srl (vector pixel, vector unsigned short);
23525 vector pixel vec_srl (vector pixel, vector unsigned char);
23526 vector signed char vec_srl (vector signed char, vector unsigned int);
23527 vector signed char vec_srl (vector signed char, vector unsigned short);
23528 vector signed char vec_srl (vector signed char, vector unsigned char);
23529 vector unsigned char vec_srl (vector unsigned char,
23530 vector unsigned int);
23531 vector unsigned char vec_srl (vector unsigned char,
23532 vector unsigned short);
23533 vector unsigned char vec_srl (vector unsigned char,
23534 vector unsigned char);
23535 vector bool char vec_srl (vector bool char, vector unsigned int);
23536 vector bool char vec_srl (vector bool char, vector unsigned short);
23537 vector bool char vec_srl (vector bool char, vector unsigned char);
23539 vector float vec_sro (vector float, vector signed char);
23540 vector float vec_sro (vector float, vector unsigned char);
23541 vector signed int vec_sro (vector signed int, vector signed char);
23542 vector signed int vec_sro (vector signed int, vector unsigned char);
23543 vector unsigned int vec_sro (vector unsigned int, vector signed char);
23544 vector unsigned int vec_sro (vector unsigned int, vector unsigned char);
23545 vector signed short vec_sro (vector signed short, vector signed char);
23546 vector signed short vec_sro (vector signed short, vector unsigned char);
23547 vector unsigned short vec_sro (vector unsigned short,
23548 vector signed char);
23549 vector unsigned short vec_sro (vector unsigned short,
23550 vector unsigned char);
23551 vector pixel vec_sro (vector pixel, vector signed char);
23552 vector pixel vec_sro (vector pixel, vector unsigned char);
23553 vector signed char vec_sro (vector signed char, vector signed char);
23554 vector signed char vec_sro (vector signed char, vector unsigned char);
23555 vector unsigned char vec_sro (vector unsigned char, vector signed char);
23556 vector unsigned char vec_sro (vector unsigned char,
23557 vector unsigned char);
23559 void vec_st (vector float, int, vector float *);
23560 void vec_st (vector float, int, float *);
23561 void vec_st (vector signed int, int, vector signed int *);
23562 void vec_st (vector signed int, int, int *);
23563 void vec_st (vector unsigned int, int, vector unsigned int *);
23564 void vec_st (vector unsigned int, int, unsigned int *);
23565 void vec_st (vector bool int, int, vector bool int *);
23566 void vec_st (vector bool int, int, unsigned int *);
23567 void vec_st (vector bool int, int, int *);
23568 void vec_st (vector signed short, int, vector signed short *);
23569 void vec_st (vector signed short, int, short *);
23570 void vec_st (vector unsigned short, int, vector unsigned short *);
23571 void vec_st (vector unsigned short, int, unsigned short *);
23572 void vec_st (vector bool short, int, vector bool short *);
23573 void vec_st (vector bool short, int, unsigned short *);
23574 void vec_st (vector pixel, int, vector pixel *);
23575 void vec_st (vector pixel, int, unsigned short *);
23576 void vec_st (vector pixel, int, short *);
23577 void vec_st (vector bool short, int, short *);
23578 void vec_st (vector signed char, int, vector signed char *);
23579 void vec_st (vector signed char, int, signed char *);
23580 void vec_st (vector unsigned char, int, vector unsigned char *);
23581 void vec_st (vector unsigned char, int, unsigned char *);
23582 void vec_st (vector bool char, int, vector bool char *);
23583 void vec_st (vector bool char, int, unsigned char *);
23584 void vec_st (vector bool char, int, signed char *);
23586 void vec_ste (vector signed char, int, signed char *);
23587 void vec_ste (vector unsigned char, int, unsigned char *);
23588 void vec_ste (vector bool char, int, signed char *);
23589 void vec_ste (vector bool char, int, unsigned char *);
23590 void vec_ste (vector signed short, int, short *);
23591 void vec_ste (vector unsigned short, int, unsigned short *);
23592 void vec_ste (vector bool short, int, short *);
23593 void vec_ste (vector bool short, int, unsigned short *);
23594 void vec_ste (vector pixel, int, short *);
23595 void vec_ste (vector pixel, int, unsigned short *);
23596 void vec_ste (vector float, int, float *);
23597 void vec_ste (vector signed int, int, int *);
23598 void vec_ste (vector unsigned int, int, unsigned int *);
23599 void vec_ste (vector bool int, int, int *);
23600 void vec_ste (vector bool int, int, unsigned int *);
23602 void vec_stvewx (vector float, int, float *);
23603 void vec_stvewx (vector signed int, int, int *);
23604 void vec_stvewx (vector unsigned int, int, unsigned int *);
23605 void vec_stvewx (vector bool int, int, int *);
23606 void vec_stvewx (vector bool int, int, unsigned int *);
23608 void vec_stvehx (vector signed short, int, short *);
23609 void vec_stvehx (vector unsigned short, int, unsigned short *);
23610 void vec_stvehx (vector bool short, int, short *);
23611 void vec_stvehx (vector bool short, int, unsigned short *);
23612 void vec_stvehx (vector pixel, int, short *);
23613 void vec_stvehx (vector pixel, int, unsigned short *);
23615 void vec_stvebx (vector signed char, int, signed char *);
23616 void vec_stvebx (vector unsigned char, int, unsigned char *);
23617 void vec_stvebx (vector bool char, int, signed char *);
23618 void vec_stvebx (vector bool char, int, unsigned char *);
23620 void vec_stl (vector float, int, vector float *);
23621 void vec_stl (vector float, int, float *);
23622 void vec_stl (vector signed int, int, vector signed int *);
23623 void vec_stl (vector signed int, int, int *);
23624 void vec_stl (vector unsigned int, int, vector unsigned int *);
23625 void vec_stl (vector unsigned int, int, unsigned int *);
23626 void vec_stl (vector bool int, int, vector bool int *);
23627 void vec_stl (vector bool int, int, unsigned int *);
23628 void vec_stl (vector bool int, int, int *);
23629 void vec_stl (vector signed short, int, vector signed short *);
23630 void vec_stl (vector signed short, int, short *);
23631 void vec_stl (vector unsigned short, int, vector unsigned short *);
23632 void vec_stl (vector unsigned short, int, unsigned short *);
23633 void vec_stl (vector bool short, int, vector bool short *);
23634 void vec_stl (vector bool short, int, unsigned short *);
23635 void vec_stl (vector bool short, int, short *);
23636 void vec_stl (vector pixel, int, vector pixel *);
23637 void vec_stl (vector pixel, int, unsigned short *);
23638 void vec_stl (vector pixel, int, short *);
23639 void vec_stl (vector signed char, int, vector signed char *);
23640 void vec_stl (vector signed char, int, signed char *);
23641 void vec_stl (vector unsigned char, int, vector unsigned char *);
23642 void vec_stl (vector unsigned char, int, unsigned char *);
23643 void vec_stl (vector bool char, int, vector bool char *);
23644 void vec_stl (vector bool char, int, unsigned char *);
23645 void vec_stl (vector bool char, int, signed char *);
23647 vector signed char vec_sub (vector bool char, vector signed char);
23648 vector signed char vec_sub (vector signed char, vector bool char);
23649 vector signed char vec_sub (vector signed char, vector signed char);
23650 vector unsigned char vec_sub (vector bool char, vector unsigned char);
23651 vector unsigned char vec_sub (vector unsigned char, vector bool char);
23652 vector unsigned char vec_sub (vector unsigned char,
23653 vector unsigned char);
23654 vector signed short vec_sub (vector bool short, vector signed short);
23655 vector signed short vec_sub (vector signed short, vector bool short);
23656 vector signed short vec_sub (vector signed short, vector signed short);
23657 vector unsigned short vec_sub (vector bool short,
23658 vector unsigned short);
23659 vector unsigned short vec_sub (vector unsigned short,
23660 vector bool short);
23661 vector unsigned short vec_sub (vector unsigned short,
23662 vector unsigned short);
23663 vector signed int vec_sub (vector bool int, vector signed int);
23664 vector signed int vec_sub (vector signed int, vector bool int);
23665 vector signed int vec_sub (vector signed int, vector signed int);
23666 vector unsigned int vec_sub (vector bool int, vector unsigned int);
23667 vector unsigned int vec_sub (vector unsigned int, vector bool int);
23668 vector unsigned int vec_sub (vector unsigned int, vector unsigned int);
23669 vector float vec_sub (vector float, vector float);
23671 vector float vec_vsubfp (vector float, vector float);
23673 vector signed int vec_vsubuwm (vector bool int, vector signed int);
23674 vector signed int vec_vsubuwm (vector signed int, vector bool int);
23675 vector signed int vec_vsubuwm (vector signed int, vector signed int);
23676 vector unsigned int vec_vsubuwm (vector bool int, vector unsigned int);
23677 vector unsigned int vec_vsubuwm (vector unsigned int, vector bool int);
23678 vector unsigned int vec_vsubuwm (vector unsigned int,
23679 vector unsigned int);
23681 vector signed short vec_vsubuhm (vector bool short,
23682 vector signed short);
23683 vector signed short vec_vsubuhm (vector signed short,
23684 vector bool short);
23685 vector signed short vec_vsubuhm (vector signed short,
23686 vector signed short);
23687 vector unsigned short vec_vsubuhm (vector bool short,
23688 vector unsigned short);
23689 vector unsigned short vec_vsubuhm (vector unsigned short,
23690 vector bool short);
23691 vector unsigned short vec_vsubuhm (vector unsigned short,
23692 vector unsigned short);
23694 vector signed char vec_vsububm (vector bool char, vector signed char);
23695 vector signed char vec_vsububm (vector signed char, vector bool char);
23696 vector signed char vec_vsububm (vector signed char, vector signed char);
23697 vector unsigned char vec_vsububm (vector bool char,
23698 vector unsigned char);
23699 vector unsigned char vec_vsububm (vector unsigned char,
23701 vector unsigned char vec_vsububm (vector unsigned char,
23702 vector unsigned char);
23704 vector unsigned int vec_subc (vector unsigned int, vector unsigned int);
23706 vector unsigned char vec_subs (vector bool char, vector unsigned char);
23707 vector unsigned char vec_subs (vector unsigned char, vector bool char);
23708 vector unsigned char vec_subs (vector unsigned char,
23709 vector unsigned char);
23710 vector signed char vec_subs (vector bool char, vector signed char);
23711 vector signed char vec_subs (vector signed char, vector bool char);
23712 vector signed char vec_subs (vector signed char, vector signed char);
23713 vector unsigned short vec_subs (vector bool short,
23714 vector unsigned short);
23715 vector unsigned short vec_subs (vector unsigned short,
23716 vector bool short);
23717 vector unsigned short vec_subs (vector unsigned short,
23718 vector unsigned short);
23719 vector signed short vec_subs (vector bool short, vector signed short);
23720 vector signed short vec_subs (vector signed short, vector bool short);
23721 vector signed short vec_subs (vector signed short, vector signed short);
23722 vector unsigned int vec_subs (vector bool int, vector unsigned int);
23723 vector unsigned int vec_subs (vector unsigned int, vector bool int);
23724 vector unsigned int vec_subs (vector unsigned int, vector unsigned int);
23725 vector signed int vec_subs (vector bool int, vector signed int);
23726 vector signed int vec_subs (vector signed int, vector bool int);
23727 vector signed int vec_subs (vector signed int, vector signed int);
23729 vector signed int vec_vsubsws (vector bool int, vector signed int);
23730 vector signed int vec_vsubsws (vector signed int, vector bool int);
23731 vector signed int vec_vsubsws (vector signed int, vector signed int);
23733 vector unsigned int vec_vsubuws (vector bool int, vector unsigned int);
23734 vector unsigned int vec_vsubuws (vector unsigned int, vector bool int);
23735 vector unsigned int vec_vsubuws (vector unsigned int,
23736 vector unsigned int);
23738 vector signed short vec_vsubshs (vector bool short,
23739 vector signed short);
23740 vector signed short vec_vsubshs (vector signed short,
23741 vector bool short);
23742 vector signed short vec_vsubshs (vector signed short,
23743 vector signed short);
23745 vector unsigned short vec_vsubuhs (vector bool short,
23746 vector unsigned short);
23747 vector unsigned short vec_vsubuhs (vector unsigned short,
23748 vector bool short);
23749 vector unsigned short vec_vsubuhs (vector unsigned short,
23750 vector unsigned short);
23752 vector signed char vec_vsubsbs (vector bool char, vector signed char);
23753 vector signed char vec_vsubsbs (vector signed char, vector bool char);
23754 vector signed char vec_vsubsbs (vector signed char, vector signed char);
23756 vector unsigned char vec_vsububs (vector bool char,
23757 vector unsigned char);
23758 vector unsigned char vec_vsububs (vector unsigned char,
23760 vector unsigned char vec_vsububs (vector unsigned char,
23761 vector unsigned char);
23763 vector unsigned int vec_sum4s (vector unsigned char,
23764 vector unsigned int);
23765 vector signed int vec_sum4s (vector signed char, vector signed int);
23766 vector signed int vec_sum4s (vector signed short, vector signed int);
23768 vector signed int vec_vsum4shs (vector signed short, vector signed int);
23770 vector signed int vec_vsum4sbs (vector signed char, vector signed int);
23772 vector unsigned int vec_vsum4ubs (vector unsigned char,
23773 vector unsigned int);
23775 vector signed int vec_sum2s (vector signed int, vector signed int);
23777 vector signed int vec_sums (vector signed int, vector signed int);
23779 vector float vec_trunc (vector float);
23781 vector signed short vec_unpackh (vector signed char);
23782 vector bool short vec_unpackh (vector bool char);
23783 vector signed int vec_unpackh (vector signed short);
23784 vector bool int vec_unpackh (vector bool short);
23785 vector unsigned int vec_unpackh (vector pixel);
23787 vector bool int vec_vupkhsh (vector bool short);
23788 vector signed int vec_vupkhsh (vector signed short);
23790 vector unsigned int vec_vupkhpx (vector pixel);
23792 vector bool short vec_vupkhsb (vector bool char);
23793 vector signed short vec_vupkhsb (vector signed char);
23795 vector signed short vec_unpackl (vector signed char);
23796 vector bool short vec_unpackl (vector bool char);
23797 vector unsigned int vec_unpackl (vector pixel);
23798 vector signed int vec_unpackl (vector signed short);
23799 vector bool int vec_unpackl (vector bool short);
23801 vector unsigned int vec_vupklpx (vector pixel);
23803 vector bool int vec_vupklsh (vector bool short);
23804 vector signed int vec_vupklsh (vector signed short);
23806 vector bool short vec_vupklsb (vector bool char);
23807 vector signed short vec_vupklsb (vector signed char);
23809 vector float vec_xor (vector float, vector float);
23810 vector float vec_xor (vector float, vector bool int);
23811 vector float vec_xor (vector bool int, vector float);
23812 vector bool int vec_xor (vector bool int, vector bool int);
23813 vector signed int vec_xor (vector bool int, vector signed int);
23814 vector signed int vec_xor (vector signed int, vector bool int);
23815 vector signed int vec_xor (vector signed int, vector signed int);
23816 vector unsigned int vec_xor (vector bool int, vector unsigned int);
23817 vector unsigned int vec_xor (vector unsigned int, vector bool int);
23818 vector unsigned int vec_xor (vector unsigned int, vector unsigned int);
23819 vector bool short vec_xor (vector bool short, vector bool short);
23820 vector signed short vec_xor (vector bool short, vector signed short);
23821 vector signed short vec_xor (vector signed short, vector bool short);
23822 vector signed short vec_xor (vector signed short, vector signed short);
23823 vector unsigned short vec_xor (vector bool short,
23824 vector unsigned short);
23825 vector unsigned short vec_xor (vector unsigned short,
23826 vector bool short);
23827 vector unsigned short vec_xor (vector unsigned short,
23828 vector unsigned short);
23829 vector signed char vec_xor (vector bool char, vector signed char);
23830 vector bool char vec_xor (vector bool char, vector bool char);
23831 vector signed char vec_xor (vector signed char, vector bool char);
23832 vector signed char vec_xor (vector signed char, vector signed char);
23833 vector unsigned char vec_xor (vector bool char, vector unsigned char);
23834 vector unsigned char vec_xor (vector unsigned char, vector bool char);
23835 vector unsigned char vec_xor (vector unsigned char,
23836 vector unsigned char);
23838 int vec_all_eq (vector signed char, vector bool char);
23839 int vec_all_eq (vector signed char, vector signed char);
23840 int vec_all_eq (vector unsigned char, vector bool char);
23841 int vec_all_eq (vector unsigned char, vector unsigned char);
23842 int vec_all_eq (vector bool char, vector bool char);
23843 int vec_all_eq (vector bool char, vector unsigned char);
23844 int vec_all_eq (vector bool char, vector signed char);
23845 int vec_all_eq (vector signed short, vector bool short);
23846 int vec_all_eq (vector signed short, vector signed short);
23847 int vec_all_eq (vector unsigned short, vector bool short);
23848 int vec_all_eq (vector unsigned short, vector unsigned short);
23849 int vec_all_eq (vector bool short, vector bool short);
23850 int vec_all_eq (vector bool short, vector unsigned short);
23851 int vec_all_eq (vector bool short, vector signed short);
23852 int vec_all_eq (vector pixel, vector pixel);
23853 int vec_all_eq (vector signed int, vector bool int);
23854 int vec_all_eq (vector signed int, vector signed int);
23855 int vec_all_eq (vector unsigned int, vector bool int);
23856 int vec_all_eq (vector unsigned int, vector unsigned int);
23857 int vec_all_eq (vector bool int, vector bool int);
23858 int vec_all_eq (vector bool int, vector unsigned int);
23859 int vec_all_eq (vector bool int, vector signed int);
23860 int vec_all_eq (vector float, vector float);
23862 int vec_all_ge (vector bool char, vector unsigned char);
23863 int vec_all_ge (vector unsigned char, vector bool char);
23864 int vec_all_ge (vector unsigned char, vector unsigned char);
23865 int vec_all_ge (vector bool char, vector signed char);
23866 int vec_all_ge (vector signed char, vector bool char);
23867 int vec_all_ge (vector signed char, vector signed char);
23868 int vec_all_ge (vector bool short, vector unsigned short);
23869 int vec_all_ge (vector unsigned short, vector bool short);
23870 int vec_all_ge (vector unsigned short, vector unsigned short);
23871 int vec_all_ge (vector signed short, vector signed short);
23872 int vec_all_ge (vector bool short, vector signed short);
23873 int vec_all_ge (vector signed short, vector bool short);
23874 int vec_all_ge (vector bool int, vector unsigned int);
23875 int vec_all_ge (vector unsigned int, vector bool int);
23876 int vec_all_ge (vector unsigned int, vector unsigned int);
23877 int vec_all_ge (vector bool int, vector signed int);
23878 int vec_all_ge (vector signed int, vector bool int);
23879 int vec_all_ge (vector signed int, vector signed int);
23880 int vec_all_ge (vector float, vector float);
23882 int vec_all_gt (vector bool char, vector unsigned char);
23883 int vec_all_gt (vector unsigned char, vector bool char);
23884 int vec_all_gt (vector unsigned char, vector unsigned char);
23885 int vec_all_gt (vector bool char, vector signed char);
23886 int vec_all_gt (vector signed char, vector bool char);
23887 int vec_all_gt (vector signed char, vector signed char);
23888 int vec_all_gt (vector bool short, vector unsigned short);
23889 int vec_all_gt (vector unsigned short, vector bool short);
23890 int vec_all_gt (vector unsigned short, vector unsigned short);
23891 int vec_all_gt (vector bool short, vector signed short);
23892 int vec_all_gt (vector signed short, vector bool short);
23893 int vec_all_gt (vector signed short, vector signed short);
23894 int vec_all_gt (vector bool int, vector unsigned int);
23895 int vec_all_gt (vector unsigned int, vector bool int);
23896 int vec_all_gt (vector unsigned int, vector unsigned int);
23897 int vec_all_gt (vector bool int, vector signed int);
23898 int vec_all_gt (vector signed int, vector bool int);
23899 int vec_all_gt (vector signed int, vector signed int);
23900 int vec_all_gt (vector float, vector float);
23902 int vec_all_in (vector float, vector float);
23904 int vec_all_le (vector bool char, vector unsigned char);
23905 int vec_all_le (vector unsigned char, vector bool char);
23906 int vec_all_le (vector unsigned char, vector unsigned char);
23907 int vec_all_le (vector bool char, vector signed char);
23908 int vec_all_le (vector signed char, vector bool char);
23909 int vec_all_le (vector signed char, vector signed char);
23910 int vec_all_le (vector bool short, vector unsigned short);
23911 int vec_all_le (vector unsigned short, vector bool short);
23912 int vec_all_le (vector unsigned short, vector unsigned short);
23913 int vec_all_le (vector bool short, vector signed short);
23914 int vec_all_le (vector signed short, vector bool short);
23915 int vec_all_le (vector signed short, vector signed short);
23916 int vec_all_le (vector bool int, vector unsigned int);
23917 int vec_all_le (vector unsigned int, vector bool int);
23918 int vec_all_le (vector unsigned int, vector unsigned int);
23919 int vec_all_le (vector bool int, vector signed int);
23920 int vec_all_le (vector signed int, vector bool int);
23921 int vec_all_le (vector signed int, vector signed int);
23922 int vec_all_le (vector float, vector float);
23924 int vec_all_lt (vector bool char, vector unsigned char);
23925 int vec_all_lt (vector unsigned char, vector bool char);
23926 int vec_all_lt (vector unsigned char, vector unsigned char);
23927 int vec_all_lt (vector bool char, vector signed char);
23928 int vec_all_lt (vector signed char, vector bool char);
23929 int vec_all_lt (vector signed char, vector signed char);
23930 int vec_all_lt (vector bool short, vector unsigned short);
23931 int vec_all_lt (vector unsigned short, vector bool short);
23932 int vec_all_lt (vector unsigned short, vector unsigned short);
23933 int vec_all_lt (vector bool short, vector signed short);
23934 int vec_all_lt (vector signed short, vector bool short);
23935 int vec_all_lt (vector signed short, vector signed short);
23936 int vec_all_lt (vector bool int, vector unsigned int);
23937 int vec_all_lt (vector unsigned int, vector bool int);
23938 int vec_all_lt (vector unsigned int, vector unsigned int);
23939 int vec_all_lt (vector bool int, vector signed int);
23940 int vec_all_lt (vector signed int, vector bool int);
23941 int vec_all_lt (vector signed int, vector signed int);
23942 int vec_all_lt (vector float, vector float);
23944 int vec_all_nan (vector float);
23946 int vec_all_ne (vector signed char, vector bool char);
23947 int vec_all_ne (vector signed char, vector signed char);
23948 int vec_all_ne (vector unsigned char, vector bool char);
23949 int vec_all_ne (vector unsigned char, vector unsigned char);
23950 int vec_all_ne (vector bool char, vector bool char);
23951 int vec_all_ne (vector bool char, vector unsigned char);
23952 int vec_all_ne (vector bool char, vector signed char);
23953 int vec_all_ne (vector signed short, vector bool short);
23954 int vec_all_ne (vector signed short, vector signed short);
23955 int vec_all_ne (vector unsigned short, vector bool short);
23956 int vec_all_ne (vector unsigned short, vector unsigned short);
23957 int vec_all_ne (vector bool short, vector bool short);
23958 int vec_all_ne (vector bool short, vector unsigned short);
23959 int vec_all_ne (vector bool short, vector signed short);
23960 int vec_all_ne (vector pixel, vector pixel);
23961 int vec_all_ne (vector signed int, vector bool int);
23962 int vec_all_ne (vector signed int, vector signed int);
23963 int vec_all_ne (vector unsigned int, vector bool int);
23964 int vec_all_ne (vector unsigned int, vector unsigned int);
23965 int vec_all_ne (vector bool int, vector bool int);
23966 int vec_all_ne (vector bool int, vector unsigned int);
23967 int vec_all_ne (vector bool int, vector signed int);
23968 int vec_all_ne (vector float, vector float);
23970 int vec_all_nge (vector float, vector float);
23972 int vec_all_ngt (vector float, vector float);
23974 int vec_all_nle (vector float, vector float);
23976 int vec_all_nlt (vector float, vector float);
23978 int vec_all_numeric (vector float);
23980 int vec_any_eq (vector signed char, vector bool char);
23981 int vec_any_eq (vector signed char, vector signed char);
23982 int vec_any_eq (vector unsigned char, vector bool char);
23983 int vec_any_eq (vector unsigned char, vector unsigned char);
23984 int vec_any_eq (vector bool char, vector bool char);
23985 int vec_any_eq (vector bool char, vector unsigned char);
23986 int vec_any_eq (vector bool char, vector signed char);
23987 int vec_any_eq (vector signed short, vector bool short);
23988 int vec_any_eq (vector signed short, vector signed short);
23989 int vec_any_eq (vector unsigned short, vector bool short);
23990 int vec_any_eq (vector unsigned short, vector unsigned short);
23991 int vec_any_eq (vector bool short, vector bool short);
23992 int vec_any_eq (vector bool short, vector unsigned short);
23993 int vec_any_eq (vector bool short, vector signed short);
23994 int vec_any_eq (vector pixel, vector pixel);
23995 int vec_any_eq (vector signed int, vector bool int);
23996 int vec_any_eq (vector signed int, vector signed int);
23997 int vec_any_eq (vector unsigned int, vector bool int);
23998 int vec_any_eq (vector unsigned int, vector unsigned int);
23999 int vec_any_eq (vector bool int, vector bool int);
24000 int vec_any_eq (vector bool int, vector unsigned int);
24001 int vec_any_eq (vector bool int, vector signed int);
24002 int vec_any_eq (vector float, vector float);
24004 int vec_any_ge (vector signed char, vector bool char);
24005 int vec_any_ge (vector unsigned char, vector bool char);
24006 int vec_any_ge (vector unsigned char, vector unsigned char);
24007 int vec_any_ge (vector signed char, vector signed char);
24008 int vec_any_ge (vector bool char, vector unsigned char);
24009 int vec_any_ge (vector bool char, vector signed char);
24010 int vec_any_ge (vector unsigned short, vector bool short);
24011 int vec_any_ge (vector unsigned short, vector unsigned short);
24012 int vec_any_ge (vector signed short, vector signed short);
24013 int vec_any_ge (vector signed short, vector bool short);
24014 int vec_any_ge (vector bool short, vector unsigned short);
24015 int vec_any_ge (vector bool short, vector signed short);
24016 int vec_any_ge (vector signed int, vector bool int);
24017 int vec_any_ge (vector unsigned int, vector bool int);
24018 int vec_any_ge (vector unsigned int, vector unsigned int);
24019 int vec_any_ge (vector signed int, vector signed int);
24020 int vec_any_ge (vector bool int, vector unsigned int);
24021 int vec_any_ge (vector bool int, vector signed int);
24022 int vec_any_ge (vector float, vector float);
24024 int vec_any_gt (vector bool char, vector unsigned char);
24025 int vec_any_gt (vector unsigned char, vector bool char);
24026 int vec_any_gt (vector unsigned char, vector unsigned char);
24027 int vec_any_gt (vector bool char, vector signed char);
24028 int vec_any_gt (vector signed char, vector bool char);
24029 int vec_any_gt (vector signed char, vector signed char);
24030 int vec_any_gt (vector bool short, vector unsigned short);
24031 int vec_any_gt (vector unsigned short, vector bool short);
24032 int vec_any_gt (vector unsigned short, vector unsigned short);
24033 int vec_any_gt (vector bool short, vector signed short);
24034 int vec_any_gt (vector signed short, vector bool short);
24035 int vec_any_gt (vector signed short, vector signed short);
24036 int vec_any_gt (vector bool int, vector unsigned int);
24037 int vec_any_gt (vector unsigned int, vector bool int);
24038 int vec_any_gt (vector unsigned int, vector unsigned int);
24039 int vec_any_gt (vector bool int, vector signed int);
24040 int vec_any_gt (vector signed int, vector bool int);
24041 int vec_any_gt (vector signed int, vector signed int);
24042 int vec_any_gt (vector float, vector float);
24044 int vec_any_le (vector bool char, vector unsigned char);
24045 int vec_any_le (vector unsigned char, vector bool char);
24046 int vec_any_le (vector unsigned char, vector unsigned char);
24047 int vec_any_le (vector bool char, vector signed char);
24048 int vec_any_le (vector signed char, vector bool char);
24049 int vec_any_le (vector signed char, vector signed char);
24050 int vec_any_le (vector bool short, vector unsigned short);
24051 int vec_any_le (vector unsigned short, vector bool short);
24052 int vec_any_le (vector unsigned short, vector unsigned short);
24053 int vec_any_le (vector bool short, vector signed short);
24054 int vec_any_le (vector signed short, vector bool short);
24055 int vec_any_le (vector signed short, vector signed short);
24056 int vec_any_le (vector bool int, vector unsigned int);
24057 int vec_any_le (vector unsigned int, vector bool int);
24058 int vec_any_le (vector unsigned int, vector unsigned int);
24059 int vec_any_le (vector bool int, vector signed int);
24060 int vec_any_le (vector signed int, vector bool int);
24061 int vec_any_le (vector signed int, vector signed int);
24062 int vec_any_le (vector float, vector float);
24064 int vec_any_lt (vector bool char, vector unsigned char);
24065 int vec_any_lt (vector unsigned char, vector bool char);
24066 int vec_any_lt (vector unsigned char, vector unsigned char);
24067 int vec_any_lt (vector bool char, vector signed char);
24068 int vec_any_lt (vector signed char, vector bool char);
24069 int vec_any_lt (vector signed char, vector signed char);
24070 int vec_any_lt (vector bool short, vector unsigned short);
24071 int vec_any_lt (vector unsigned short, vector bool short);
24072 int vec_any_lt (vector unsigned short, vector unsigned short);
24073 int vec_any_lt (vector bool short, vector signed short);
24074 int vec_any_lt (vector signed short, vector bool short);
24075 int vec_any_lt (vector signed short, vector signed short);
24076 int vec_any_lt (vector bool int, vector unsigned int);
24077 int vec_any_lt (vector unsigned int, vector bool int);
24078 int vec_any_lt (vector unsigned int, vector unsigned int);
24079 int vec_any_lt (vector bool int, vector signed int);
24080 int vec_any_lt (vector signed int, vector bool int);
24081 int vec_any_lt (vector signed int, vector signed int);
24082 int vec_any_lt (vector float, vector float);
24084 int vec_any_nan (vector float);
24086 int vec_any_ne (vector signed char, vector bool char);
24087 int vec_any_ne (vector signed char, vector signed char);
24088 int vec_any_ne (vector unsigned char, vector bool char);
24089 int vec_any_ne (vector unsigned char, vector unsigned char);
24090 int vec_any_ne (vector bool char, vector bool char);
24091 int vec_any_ne (vector bool char, vector unsigned char);
24092 int vec_any_ne (vector bool char, vector signed char);
24093 int vec_any_ne (vector signed short, vector bool short);
24094 int vec_any_ne (vector signed short, vector signed short);
24095 int vec_any_ne (vector unsigned short, vector bool short);
24096 int vec_any_ne (vector unsigned short, vector unsigned short);
24097 int vec_any_ne (vector bool short, vector bool short);
24098 int vec_any_ne (vector bool short, vector unsigned short);
24099 int vec_any_ne (vector bool short, vector signed short);
24100 int vec_any_ne (vector pixel, vector pixel);
24101 int vec_any_ne (vector signed int, vector bool int);
24102 int vec_any_ne (vector signed int, vector signed int);
24103 int vec_any_ne (vector unsigned int, vector bool int);
24104 int vec_any_ne (vector unsigned int, vector unsigned int);
24105 int vec_any_ne (vector bool int, vector bool int);
24106 int vec_any_ne (vector bool int, vector unsigned int);
24107 int vec_any_ne (vector bool int, vector signed int);
24108 int vec_any_ne (vector float, vector float);
24110 int vec_any_nge (vector float, vector float);
24112 int vec_any_ngt (vector float, vector float);
24114 int vec_any_nle (vector float, vector float);
24116 int vec_any_nlt (vector float, vector float);
24118 int vec_any_numeric (vector float);
24120 int vec_any_out (vector float, vector float);
24123 File: gcc.info, Node: SPARC VIS Built-in Functions, Prev: PowerPC AltiVec Built-in Functions, Up: Target Builtins
24125 5.48.9 SPARC VIS Built-in Functions
24126 -----------------------------------
24128 GCC supports SIMD operations on the SPARC using both the generic vector
24129 extensions (*note Vector Extensions::) as well as built-in functions for
24130 the SPARC Visual Instruction Set (VIS). When you use the `-mvis'
24131 switch, the VIS extension is exposed as the following built-in
24134 typedef int v2si __attribute__ ((vector_size (8)));
24135 typedef short v4hi __attribute__ ((vector_size (8)));
24136 typedef short v2hi __attribute__ ((vector_size (4)));
24137 typedef char v8qi __attribute__ ((vector_size (8)));
24138 typedef char v4qi __attribute__ ((vector_size (4)));
24140 void * __builtin_vis_alignaddr (void *, long);
24141 int64_t __builtin_vis_faligndatadi (int64_t, int64_t);
24142 v2si __builtin_vis_faligndatav2si (v2si, v2si);
24143 v4hi __builtin_vis_faligndatav4hi (v4si, v4si);
24144 v8qi __builtin_vis_faligndatav8qi (v8qi, v8qi);
24146 v4hi __builtin_vis_fexpand (v4qi);
24148 v4hi __builtin_vis_fmul8x16 (v4qi, v4hi);
24149 v4hi __builtin_vis_fmul8x16au (v4qi, v4hi);
24150 v4hi __builtin_vis_fmul8x16al (v4qi, v4hi);
24151 v4hi __builtin_vis_fmul8sux16 (v8qi, v4hi);
24152 v4hi __builtin_vis_fmul8ulx16 (v8qi, v4hi);
24153 v2si __builtin_vis_fmuld8sux16 (v4qi, v2hi);
24154 v2si __builtin_vis_fmuld8ulx16 (v4qi, v2hi);
24156 v4qi __builtin_vis_fpack16 (v4hi);
24157 v8qi __builtin_vis_fpack32 (v2si, v2si);
24158 v2hi __builtin_vis_fpackfix (v2si);
24159 v8qi __builtin_vis_fpmerge (v4qi, v4qi);
24161 int64_t __builtin_vis_pdist (v8qi, v8qi, int64_t);
24164 File: gcc.info, Node: Target Format Checks, Next: Pragmas, Prev: Target Builtins, Up: C Extensions
24166 5.49 Format Checks Specific to Particular Target Machines
24167 =========================================================
24169 For some target machines, GCC supports additional options to the format
24170 attribute (*note Declaring Attributes of Functions: Function
24175 * Solaris Format Checks::
24178 File: gcc.info, Node: Solaris Format Checks, Up: Target Format Checks
24180 5.49.1 Solaris Format Checks
24181 ----------------------------
24183 Solaris targets support the `cmn_err' (or `__cmn_err__') format check.
24184 `cmn_err' accepts a subset of the standard `printf' conversions, and
24185 the two-argument `%b' conversion for displaying bit-fields. See the
24186 Solaris man page for `cmn_err' for more information.
24189 File: gcc.info, Node: Pragmas, Next: Unnamed Fields, Prev: Target Format Checks, Up: C Extensions
24191 5.50 Pragmas Accepted by GCC
24192 ============================
24194 GCC supports several types of pragmas, primarily in order to compile
24195 code originally written for other compilers. Note that in general we
24196 do not recommend the use of pragmas; *Note Function Attributes::, for
24197 further explanation.
24203 * RS/6000 and PowerPC Pragmas::
24205 * Solaris Pragmas::
24206 * Symbol-Renaming Pragmas::
24207 * Structure-Packing Pragmas::
24209 * Diagnostic Pragmas::
24210 * Visibility Pragmas::
24213 File: gcc.info, Node: ARM Pragmas, Next: M32C Pragmas, Up: Pragmas
24218 The ARM target defines pragmas for controlling the default addition of
24219 `long_call' and `short_call' attributes to functions. *Note Function
24220 Attributes::, for information about the effects of these attributes.
24223 Set all subsequent functions to have the `long_call' attribute.
24226 Set all subsequent functions to have the `short_call' attribute.
24229 Do not affect the `long_call' or `short_call' attributes of
24230 subsequent functions.
24233 File: gcc.info, Node: M32C Pragmas, Next: RS/6000 and PowerPC Pragmas, Prev: ARM Pragmas, Up: Pragmas
24235 5.50.2 M32C Pragmas
24236 -------------------
24239 Overrides the command line option `-memregs=' for the current
24240 file. Use with care! This pragma must be before any function in
24241 the file, and mixing different memregs values in different objects
24242 may make them incompatible. This pragma is useful when a
24243 performance-critical function uses a memreg for temporary values,
24244 as it may allow you to reduce the number of memregs used.
24248 File: gcc.info, Node: RS/6000 and PowerPC Pragmas, Next: Darwin Pragmas, Prev: M32C Pragmas, Up: Pragmas
24250 5.50.3 RS/6000 and PowerPC Pragmas
24251 ----------------------------------
24253 The RS/6000 and PowerPC targets define one pragma for controlling
24254 whether or not the `longcall' attribute is added to function
24255 declarations by default. This pragma overrides the `-mlongcall'
24256 option, but not the `longcall' and `shortcall' attributes. *Note
24257 RS/6000 and PowerPC Options::, for more information about when long
24258 calls are and are not necessary.
24261 Apply the `longcall' attribute to all subsequent function
24265 Do not apply the `longcall' attribute to subsequent function
24269 File: gcc.info, Node: Darwin Pragmas, Next: Solaris Pragmas, Prev: RS/6000 and PowerPC Pragmas, Up: Pragmas
24271 5.50.4 Darwin Pragmas
24272 ---------------------
24274 The following pragmas are available for all architectures running the
24275 Darwin operating system. These are useful for compatibility with other
24279 This pragma is accepted, but has no effect.
24281 `options align=ALIGNMENT'
24282 This pragma sets the alignment of fields in structures. The
24283 values of ALIGNMENT may be `mac68k', to emulate m68k alignment, or
24284 `power', to emulate PowerPC alignment. Uses of this pragma nest
24285 properly; to restore the previous setting, use `reset' for the
24288 `segment TOKENS...'
24289 This pragma is accepted, but has no effect.
24291 `unused (VAR [, VAR]...)'
24292 This pragma declares variables to be possibly unused. GCC will not
24293 produce warnings for the listed variables. The effect is similar
24294 to that of the `unused' attribute, except that this pragma may
24295 appear anywhere within the variables' scopes.
24298 File: gcc.info, Node: Solaris Pragmas, Next: Symbol-Renaming Pragmas, Prev: Darwin Pragmas, Up: Pragmas
24300 5.50.5 Solaris Pragmas
24301 ----------------------
24303 The Solaris target supports `#pragma redefine_extname' (*note
24304 Symbol-Renaming Pragmas::). It also supports additional `#pragma'
24305 directives for compatibility with the system compiler.
24307 `align ALIGNMENT (VARIABLE [, VARIABLE]...)'
24308 Increase the minimum alignment of each VARIABLE to ALIGNMENT.
24309 This is the same as GCC's `aligned' attribute *note Variable
24310 Attributes::). Macro expansion occurs on the arguments to this
24311 pragma when compiling C and Objective-C. It does not currently
24312 occur when compiling C++, but this is a bug which may be fixed in
24315 `fini (FUNCTION [, FUNCTION]...)'
24316 This pragma causes each listed FUNCTION to be called after main,
24317 or during shared module unloading, by adding a call to the `.fini'
24320 `init (FUNCTION [, FUNCTION]...)'
24321 This pragma causes each listed FUNCTION to be called during
24322 initialization (before `main') or during shared module loading, by
24323 adding a call to the `.init' section.
24327 File: gcc.info, Node: Symbol-Renaming Pragmas, Next: Structure-Packing Pragmas, Prev: Solaris Pragmas, Up: Pragmas
24329 5.50.6 Symbol-Renaming Pragmas
24330 ------------------------------
24332 For compatibility with the Solaris and Tru64 UNIX system headers, GCC
24333 supports two `#pragma' directives which change the name used in
24334 assembly for a given declaration. These pragmas are only available on
24335 platforms whose system headers need them. To get this effect on all
24336 platforms supported by GCC, use the asm labels extension (*note Asm
24339 `redefine_extname OLDNAME NEWNAME'
24340 This pragma gives the C function OLDNAME the assembly symbol
24341 NEWNAME. The preprocessor macro `__PRAGMA_REDEFINE_EXTNAME' will
24342 be defined if this pragma is available (currently only on Solaris).
24344 `extern_prefix STRING'
24345 This pragma causes all subsequent external function and variable
24346 declarations to have STRING prepended to their assembly symbols.
24347 This effect may be terminated with another `extern_prefix' pragma
24348 whose argument is an empty string. The preprocessor macro
24349 `__PRAGMA_EXTERN_PREFIX' will be defined if this pragma is
24350 available (currently only on Tru64 UNIX).
24352 These pragmas and the asm labels extension interact in a complicated
24353 manner. Here are some corner cases you may want to be aware of.
24355 1. Both pragmas silently apply only to declarations with external
24356 linkage. Asm labels do not have this restriction.
24358 2. In C++, both pragmas silently apply only to declarations with "C"
24359 linkage. Again, asm labels do not have this restriction.
24361 3. If any of the three ways of changing the assembly name of a
24362 declaration is applied to a declaration whose assembly name has
24363 already been determined (either by a previous use of one of these
24364 features, or because the compiler needed the assembly name in
24365 order to generate code), and the new name is different, a warning
24366 issues and the name does not change.
24368 4. The OLDNAME used by `#pragma redefine_extname' is always the
24371 5. If `#pragma extern_prefix' is in effect, and a declaration occurs
24372 with an asm label attached, the prefix is silently ignored for
24375 6. If `#pragma extern_prefix' and `#pragma redefine_extname' apply to
24376 the same declaration, whichever triggered first wins, and a
24377 warning issues if they contradict each other. (We would like to
24378 have `#pragma redefine_extname' always win, for consistency with
24379 asm labels, but if `#pragma extern_prefix' triggers first we have
24380 no way of knowing that that happened.)
24383 File: gcc.info, Node: Structure-Packing Pragmas, Next: Weak Pragmas, Prev: Symbol-Renaming Pragmas, Up: Pragmas
24385 5.50.7 Structure-Packing Pragmas
24386 --------------------------------
24388 For compatibility with Win32, GCC supports a set of `#pragma'
24389 directives which change the maximum alignment of members of structures
24390 (other than zero-width bitfields), unions, and classes subsequently
24391 defined. The N value below always is required to be a small power of
24392 two and specifies the new alignment in bytes.
24394 1. `#pragma pack(N)' simply sets the new alignment.
24396 2. `#pragma pack()' sets the alignment to the one that was in effect
24397 when compilation started (see also command line option
24398 `-fpack-struct[=<n>]' *note Code Gen Options::).
24400 3. `#pragma pack(push[,N])' pushes the current alignment setting on
24401 an internal stack and then optionally sets the new alignment.
24403 4. `#pragma pack(pop)' restores the alignment setting to the one
24404 saved at the top of the internal stack (and removes that stack
24405 entry). Note that `#pragma pack([N])' does not influence this
24406 internal stack; thus it is possible to have `#pragma pack(push)'
24407 followed by multiple `#pragma pack(N)' instances and finalized by
24408 a single `#pragma pack(pop)'.
24410 Some targets, e.g. i386 and powerpc, support the `ms_struct' `#pragma'
24411 which lays out a structure as the documented `__attribute__
24413 1. `#pragma ms_struct on' turns on the layout for structures declared.
24415 2. `#pragma ms_struct off' turns off the layout for structures
24418 3. `#pragma ms_struct reset' goes back to the default layout.
24421 File: gcc.info, Node: Weak Pragmas, Next: Diagnostic Pragmas, Prev: Structure-Packing Pragmas, Up: Pragmas
24423 5.50.8 Weak Pragmas
24424 -------------------
24426 For compatibility with SVR4, GCC supports a set of `#pragma' directives
24427 for declaring symbols to be weak, and defining weak aliases.
24429 `#pragma weak SYMBOL'
24430 This pragma declares SYMBOL to be weak, as if the declaration had
24431 the attribute of the same name. The pragma may appear before or
24432 after the declaration of SYMBOL, but must appear before either its
24433 first use or its definition. It is not an error for SYMBOL to
24434 never be defined at all.
24436 `#pragma weak SYMBOL1 = SYMBOL2'
24437 This pragma declares SYMBOL1 to be a weak alias of SYMBOL2. It is
24438 an error if SYMBOL2 is not defined in the current translation unit.
24441 File: gcc.info, Node: Diagnostic Pragmas, Next: Visibility Pragmas, Prev: Weak Pragmas, Up: Pragmas
24443 5.50.9 Diagnostic Pragmas
24444 -------------------------
24446 GCC allows the user to selectively enable or disable certain types of
24447 diagnostics, and change the kind of the diagnostic. For example, a
24448 project's policy might require that all sources compile with `-Werror'
24449 but certain files might have exceptions allowing specific types of
24450 warnings. Or, a project might selectively enable diagnostics and treat
24451 them as errors depending on which preprocessor macros are defined.
24453 `#pragma GCC diagnostic KIND OPTION'
24454 Modifies the disposition of a diagnostic. Note that not all
24455 diagnostics are modifiable; at the moment only warnings (normally
24456 controlled by `-W...') can be controlled, and not all of them.
24457 Use `-fdiagnostics-show-option' to determine which diagnostics are
24458 controllable and which option controls them.
24460 KIND is `error' to treat this diagnostic as an error, `warning' to
24461 treat it like a warning (even if `-Werror' is in effect), or
24462 `ignored' if the diagnostic is to be ignored. OPTION is a double
24463 quoted string which matches the command line option.
24465 #pragma GCC diagnostic warning "-Wformat"
24466 #pragma GCC diagnostic error "-Wformat"
24467 #pragma GCC diagnostic ignored "-Wformat"
24469 Note that these pragmas override any command line options. Also,
24470 while it is syntactically valid to put these pragmas anywhere in
24471 your sources, the only supported location for them is before any
24472 data or functions are defined. Doing otherwise may result in
24473 unpredictable results depending on how the optimizer manages your
24474 sources. If the same option is listed multiple times, the last
24475 one specified is the one that is in effect. This pragma is not
24476 intended to be a general purpose replacement for command line
24477 options, but for implementing strict control over project policies.
24481 File: gcc.info, Node: Visibility Pragmas, Prev: Diagnostic Pragmas, Up: Pragmas
24483 5.50.10 Visibility Pragmas
24484 --------------------------
24486 `#pragma GCC visibility push(VISIBILITY)'
24487 `#pragma GCC visibility pop'
24488 This pragma allows the user to set the visibility for multiple
24489 declarations without having to give each a visibility attribute
24490 *Note Function Attributes::, for more information about visibility
24491 and the attribute syntax.
24493 In C++, `#pragma GCC visibility' affects only namespace-scope
24494 declarations. Class members and template specializations are not
24495 affected; if you want to override the visibility for a particular
24496 member or instantiation, you must use an attribute.
24500 File: gcc.info, Node: Unnamed Fields, Next: Thread-Local, Prev: Pragmas, Up: C Extensions
24502 5.51 Unnamed struct/union fields within structs/unions
24503 ======================================================
24505 For compatibility with other compilers, GCC allows you to define a
24506 structure or union that contains, as fields, structures and unions
24507 without names. For example:
24518 In this example, the user would be able to access members of the
24519 unnamed union with code like `foo.b'. Note that only unnamed structs
24520 and unions are allowed, you may not have, for example, an unnamed `int'.
24522 You must never create such structures that cause ambiguous field
24523 definitions. For example, this structure:
24532 It is ambiguous which `a' is being referred to with `foo.a'. Such
24533 constructs are not supported and must be avoided. In the future, such
24534 constructs may be detected and treated as compilation errors.
24536 Unless `-fms-extensions' is used, the unnamed field must be a
24537 structure or union definition without a tag (for example, `struct { int
24538 a; };'). If `-fms-extensions' is used, the field may also be a
24539 definition with a tag such as `struct foo { int a; };', a reference to
24540 a previously defined structure or union such as `struct foo;', or a
24541 reference to a `typedef' name for a previously defined structure or
24545 File: gcc.info, Node: Thread-Local, Prev: Unnamed Fields, Up: C Extensions
24547 5.52 Thread-Local Storage
24548 =========================
24550 Thread-local storage (TLS) is a mechanism by which variables are
24551 allocated such that there is one instance of the variable per extant
24552 thread. The run-time model GCC uses to implement this originates in
24553 the IA-64 processor-specific ABI, but has since been migrated to other
24554 processors as well. It requires significant support from the linker
24555 (`ld'), dynamic linker (`ld.so'), and system libraries (`libc.so' and
24556 `libpthread.so'), so it is not available everywhere.
24558 At the user level, the extension is visible with a new storage class
24559 keyword: `__thread'. For example:
24562 extern __thread struct state s;
24563 static __thread char *p;
24565 The `__thread' specifier may be used alone, with the `extern' or
24566 `static' specifiers, but with no other storage class specifier. When
24567 used with `extern' or `static', `__thread' must appear immediately
24568 after the other storage class specifier.
24570 The `__thread' specifier may be applied to any global, file-scoped
24571 static, function-scoped static, or static data member of a class. It
24572 may not be applied to block-scoped automatic or non-static data member.
24574 When the address-of operator is applied to a thread-local variable, it
24575 is evaluated at run-time and returns the address of the current thread's
24576 instance of that variable. An address so obtained may be used by any
24577 thread. When a thread terminates, any pointers to thread-local
24578 variables in that thread become invalid.
24580 No static initialization may refer to the address of a thread-local
24583 In C++, if an initializer is present for a thread-local variable, it
24584 must be a CONSTANT-EXPRESSION, as defined in 5.19.2 of the ANSI/ISO C++
24587 See ELF Handling For Thread-Local Storage
24588 (http://people.redhat.com/drepper/tls.pdf) for a detailed explanation of
24589 the four thread-local storage addressing models, and how the run-time
24590 is expected to function.
24594 * C99 Thread-Local Edits::
24595 * C++98 Thread-Local Edits::
24598 File: gcc.info, Node: C99 Thread-Local Edits, Next: C++98 Thread-Local Edits, Up: Thread-Local
24600 5.52.1 ISO/IEC 9899:1999 Edits for Thread-Local Storage
24601 -------------------------------------------------------
24603 The following are a set of changes to ISO/IEC 9899:1999 (aka C99) that
24604 document the exact semantics of the language extension.
24606 * `5.1.2 Execution environments'
24608 Add new text after paragraph 1
24610 Within either execution environment, a "thread" is a flow of
24611 control within a program. It is implementation defined
24612 whether or not there may be more than one thread associated
24613 with a program. It is implementation defined how threads
24614 beyond the first are created, the name and type of the
24615 function called at thread startup, and how threads may be
24616 terminated. However, objects with thread storage duration
24617 shall be initialized before thread startup.
24619 * `6.2.4 Storage durations of objects'
24621 Add new text before paragraph 3
24623 An object whose identifier is declared with the storage-class
24624 specifier `__thread' has "thread storage duration". Its
24625 lifetime is the entire execution of the thread, and its
24626 stored value is initialized only once, prior to thread
24633 * `6.7.1 Storage-class specifiers'
24635 Add `__thread' to the list of storage class specifiers in
24638 Change paragraph 2 to
24640 With the exception of `__thread', at most one storage-class
24641 specifier may be given [...]. The `__thread' specifier may
24642 be used alone, or immediately following `extern' or `static'.
24644 Add new text after paragraph 6
24646 The declaration of an identifier for a variable that has
24647 block scope that specifies `__thread' shall also specify
24648 either `extern' or `static'.
24650 The `__thread' specifier shall be used only with variables.
24653 File: gcc.info, Node: C++98 Thread-Local Edits, Prev: C99 Thread-Local Edits, Up: Thread-Local
24655 5.52.2 ISO/IEC 14882:1998 Edits for Thread-Local Storage
24656 --------------------------------------------------------
24658 The following are a set of changes to ISO/IEC 14882:1998 (aka C++98)
24659 that document the exact semantics of the language extension.
24661 * [intro.execution]
24663 New text after paragraph 4
24665 A "thread" is a flow of control within the abstract machine.
24666 It is implementation defined whether or not there may be more
24669 New text after paragraph 7
24671 It is unspecified whether additional action must be taken to
24672 ensure when and whether side effects are visible to other
24679 * [basic.start.main]
24681 Add after paragraph 5
24683 The thread that begins execution at the `main' function is
24684 called the "main thread". It is implementation defined how
24685 functions beginning threads other than the main thread are
24686 designated or typed. A function so designated, as well as
24687 the `main' function, is called a "thread startup function".
24688 It is implementation defined what happens if a thread startup
24689 function returns. It is implementation defined what happens
24690 to other threads when any thread calls `exit'.
24692 * [basic.start.init]
24694 Add after paragraph 4
24696 The storage for an object of thread storage duration shall be
24697 statically initialized before the first statement of the
24698 thread startup function. An object of thread storage
24699 duration shall not require dynamic initialization.
24701 * [basic.start.term]
24703 Add after paragraph 3
24705 The type of an object with thread storage duration shall not
24706 have a non-trivial destructor, nor shall it be an array type
24707 whose elements (directly or indirectly) have non-trivial
24712 Add "thread storage duration" to the list in paragraph 1.
24716 Thread, static, and automatic storage durations are
24717 associated with objects introduced by declarations [...].
24719 Add `__thread' to the list of specifiers in paragraph 3.
24721 * [basic.stc.thread]
24723 New section before [basic.stc.static]
24725 The keyword `__thread' applied to a non-local object gives the
24726 object thread storage duration.
24728 A local variable or class data member declared both `static'
24729 and `__thread' gives the variable or member thread storage
24732 * [basic.stc.static]
24736 All objects which have neither thread storage duration,
24737 dynamic storage duration nor are local [...].
24741 Add `__thread' to the list in paragraph 1.
24745 With the exception of `__thread', at most one
24746 STORAGE-CLASS-SPECIFIER shall appear in a given
24747 DECL-SPECIFIER-SEQ. The `__thread' specifier may be used
24748 alone, or immediately following the `extern' or `static'
24751 Add after paragraph 5
24753 The `__thread' specifier can be applied only to the names of
24754 objects and to anonymous unions.
24758 Add after paragraph 6
24760 Non-`static' members shall not be `__thread'.
24763 File: gcc.info, Node: C++ Extensions, Next: Objective-C, Prev: C Extensions, Up: Top
24765 6 Extensions to the C++ Language
24766 ********************************
24768 The GNU compiler provides these extensions to the C++ language (and you
24769 can also use most of the C language extensions in your C++ programs).
24770 If you want to write code that checks whether these features are
24771 available, you can test for the GNU compiler the same way as for C
24772 programs: check for a predefined macro `__GNUC__'. You can also use
24773 `__GNUG__' to test specifically for GNU C++ (*note Predefined Macros:
24774 (cpp)Common Predefined Macros.).
24778 * Volatiles:: What constitutes an access to a volatile object.
24779 * Restricted Pointers:: C99 restricted pointers and references.
24780 * Vague Linkage:: Where G++ puts inlines, vtables and such.
24781 * C++ Interface:: You can use a single C++ header file for both
24782 declarations and definitions.
24783 * Template Instantiation:: Methods for ensuring that exactly one copy of
24784 each needed template instantiation is emitted.
24785 * Bound member functions:: You can extract a function pointer to the
24786 method denoted by a `->*' or `.*' expression.
24787 * C++ Attributes:: Variable, function, and type attributes for C++ only.
24788 * Namespace Association:: Strong using-directives for namespace association.
24789 * Java Exceptions:: Tweaking exception handling to work with Java.
24790 * Deprecated Features:: Things will disappear from g++.
24791 * Backwards Compatibility:: Compatibilities with earlier definitions of C++.
24794 File: gcc.info, Node: Volatiles, Next: Restricted Pointers, Up: C++ Extensions
24796 6.1 When is a Volatile Object Accessed?
24797 =======================================
24799 Both the C and C++ standard have the concept of volatile objects. These
24800 are normally accessed by pointers and used for accessing hardware. The
24801 standards encourage compilers to refrain from optimizations concerning
24802 accesses to volatile objects. The C standard leaves it implementation
24803 defined as to what constitutes a volatile access. The C++ standard
24804 omits to specify this, except to say that C++ should behave in a
24805 similar manner to C with respect to volatiles, where possible. The
24806 minimum either standard specifies is that at a sequence point all
24807 previous accesses to volatile objects have stabilized and no subsequent
24808 accesses have occurred. Thus an implementation is free to reorder and
24809 combine volatile accesses which occur between sequence points, but
24810 cannot do so for accesses across a sequence point. The use of
24811 volatiles does not allow you to violate the restriction on updating
24812 objects multiple times within a sequence point.
24814 *Note Volatile qualifier and the C compiler: Qualifiers implementation.
24816 The behavior differs slightly between C and C++ in the non-obvious
24819 volatile int *src = SOMEVALUE;
24822 With C, such expressions are rvalues, and GCC interprets this either
24823 as a read of the volatile object being pointed to or only as request to
24824 evaluate the side-effects. The C++ standard specifies that such
24825 expressions do not undergo lvalue to rvalue conversion, and that the
24826 type of the dereferenced object may be incomplete. The C++ standard
24827 does not specify explicitly that it is this lvalue to rvalue conversion
24828 which may be responsible for causing an access. However, there is
24829 reason to believe that it is, because otherwise certain simple
24830 expressions become undefined. However, because it would surprise most
24831 programmers, G++ treats dereferencing a pointer to volatile object of
24832 complete type when the value is unused as GCC would do for an
24833 equivalent type in C. When the object has incomplete type, G++ issues
24834 a warning; if you wish to force an error, you must force a conversion
24835 to rvalue with, for instance, a static cast.
24837 When using a reference to volatile, G++ does not treat equivalent
24838 expressions as accesses to volatiles, but instead issues a warning that
24839 no volatile is accessed. The rationale for this is that otherwise it
24840 becomes difficult to determine where volatile access occur, and not
24841 possible to ignore the return value from functions returning volatile
24842 references. Again, if you wish to force a read, cast the reference to
24846 File: gcc.info, Node: Restricted Pointers, Next: Vague Linkage, Prev: Volatiles, Up: C++ Extensions
24848 6.2 Restricting Pointer Aliasing
24849 ================================
24851 As with the C front end, G++ understands the C99 feature of restricted
24852 pointers, specified with the `__restrict__', or `__restrict' type
24853 qualifier. Because you cannot compile C++ by specifying the `-std=c99'
24854 language flag, `restrict' is not a keyword in C++.
24856 In addition to allowing restricted pointers, you can specify restricted
24857 references, which indicate that the reference is not aliased in the
24860 void fn (int *__restrict__ rptr, int &__restrict__ rref)
24865 In the body of `fn', RPTR points to an unaliased integer and RREF
24866 refers to a (different) unaliased integer.
24868 You may also specify whether a member function's THIS pointer is
24869 unaliased by using `__restrict__' as a member function qualifier.
24871 void T::fn () __restrict__
24876 Within the body of `T::fn', THIS will have the effective definition `T
24877 *__restrict__ const this'. Notice that the interpretation of a
24878 `__restrict__' member function qualifier is different to that of
24879 `const' or `volatile' qualifier, in that it is applied to the pointer
24880 rather than the object. This is consistent with other compilers which
24881 implement restricted pointers.
24883 As with all outermost parameter qualifiers, `__restrict__' is ignored
24884 in function definition matching. This means you only need to specify
24885 `__restrict__' in a function definition, rather than in a function
24889 File: gcc.info, Node: Vague Linkage, Next: C++ Interface, Prev: Restricted Pointers, Up: C++ Extensions
24894 There are several constructs in C++ which require space in the object
24895 file but are not clearly tied to a single translation unit. We say that
24896 these constructs have "vague linkage". Typically such constructs are
24897 emitted wherever they are needed, though sometimes we can be more
24901 Inline functions are typically defined in a header file which can
24902 be included in many different compilations. Hopefully they can
24903 usually be inlined, but sometimes an out-of-line copy is
24904 necessary, if the address of the function is taken or if inlining
24905 fails. In general, we emit an out-of-line copy in all translation
24906 units where one is needed. As an exception, we only emit inline
24907 virtual functions with the vtable, since it will always require a
24910 Local static variables and string constants used in an inline
24911 function are also considered to have vague linkage, since they
24912 must be shared between all inlined and out-of-line instances of
24916 C++ virtual functions are implemented in most compilers using a
24917 lookup table, known as a vtable. The vtable contains pointers to
24918 the virtual functions provided by a class, and each object of the
24919 class contains a pointer to its vtable (or vtables, in some
24920 multiple-inheritance situations). If the class declares any
24921 non-inline, non-pure virtual functions, the first one is chosen as
24922 the "key method" for the class, and the vtable is only emitted in
24923 the translation unit where the key method is defined.
24925 _Note:_ If the chosen key method is later defined as inline, the
24926 vtable will still be emitted in every translation unit which
24927 defines it. Make sure that any inline virtuals are declared
24928 inline in the class body, even if they are not defined there.
24931 C++ requires information about types to be written out in order to
24932 implement `dynamic_cast', `typeid' and exception handling. For
24933 polymorphic classes (classes with virtual functions), the type_info
24934 object is written out along with the vtable so that `dynamic_cast'
24935 can determine the dynamic type of a class object at runtime. For
24936 all other types, we write out the type_info object when it is
24937 used: when applying `typeid' to an expression, throwing an object,
24938 or referring to a type in a catch clause or exception
24941 Template Instantiations
24942 Most everything in this section also applies to template
24943 instantiations, but there are other options as well. *Note
24944 Where's the Template?: Template Instantiation.
24947 When used with GNU ld version 2.8 or later on an ELF system such as
24948 GNU/Linux or Solaris 2, or on Microsoft Windows, duplicate copies of
24949 these constructs will be discarded at link time. This is known as
24952 On targets that don't support COMDAT, but do support weak symbols, GCC
24953 will use them. This way one copy will override all the others, but the
24954 unused copies will still take up space in the executable.
24956 For targets which do not support either COMDAT or weak symbols, most
24957 entities with vague linkage will be emitted as local symbols to avoid
24958 duplicate definition errors from the linker. This will not happen for
24959 local statics in inlines, however, as having multiple copies will
24960 almost certainly break things.
24962 *Note Declarations and Definitions in One Header: C++ Interface, for
24963 another way to control placement of these constructs.
24966 File: gcc.info, Node: C++ Interface, Next: Template Instantiation, Prev: Vague Linkage, Up: C++ Extensions
24968 6.4 #pragma interface and implementation
24969 ========================================
24971 `#pragma interface' and `#pragma implementation' provide the user with
24972 a way of explicitly directing the compiler to emit entities with vague
24973 linkage (and debugging information) in a particular translation unit.
24975 _Note:_ As of GCC 2.7.2, these `#pragma's are not useful in most
24976 cases, because of COMDAT support and the "key method" heuristic
24977 mentioned in *Note Vague Linkage::. Using them can actually cause your
24978 program to grow due to unnecessary out-of-line copies of inline
24979 functions. Currently (3.4) the only benefit of these `#pragma's is
24980 reduced duplication of debugging information, and that should be
24981 addressed soon on DWARF 2 targets with the use of COMDAT groups.
24983 `#pragma interface'
24984 `#pragma interface "SUBDIR/OBJECTS.h"'
24985 Use this directive in _header files_ that define object classes,
24986 to save space in most of the object files that use those classes.
24987 Normally, local copies of certain information (backup copies of
24988 inline member functions, debugging information, and the internal
24989 tables that implement virtual functions) must be kept in each
24990 object file that includes class definitions. You can use this
24991 pragma to avoid such duplication. When a header file containing
24992 `#pragma interface' is included in a compilation, this auxiliary
24993 information will not be generated (unless the main input source
24994 file itself uses `#pragma implementation'). Instead, the object
24995 files will contain references to be resolved at link time.
24997 The second form of this directive is useful for the case where you
24998 have multiple headers with the same name in different directories.
24999 If you use this form, you must specify the same string to `#pragma
25002 `#pragma implementation'
25003 `#pragma implementation "OBJECTS.h"'
25004 Use this pragma in a _main input file_, when you want full output
25005 from included header files to be generated (and made globally
25006 visible). The included header file, in turn, should use `#pragma
25007 interface'. Backup copies of inline member functions, debugging
25008 information, and the internal tables used to implement virtual
25009 functions are all generated in implementation files.
25011 If you use `#pragma implementation' with no argument, it applies to
25012 an include file with the same basename(1) as your source file.
25013 For example, in `allclass.cc', giving just `#pragma implementation'
25014 by itself is equivalent to `#pragma implementation "allclass.h"'.
25016 In versions of GNU C++ prior to 2.6.0 `allclass.h' was treated as
25017 an implementation file whenever you would include it from
25018 `allclass.cc' even if you never specified `#pragma
25019 implementation'. This was deemed to be more trouble than it was
25020 worth, however, and disabled.
25022 Use the string argument if you want a single implementation file to
25023 include code from multiple header files. (You must also use
25024 `#include' to include the header file; `#pragma implementation'
25025 only specifies how to use the file--it doesn't actually include
25028 There is no way to split up the contents of a single header file
25029 into multiple implementation files.
25031 `#pragma implementation' and `#pragma interface' also have an effect
25032 on function inlining.
25034 If you define a class in a header file marked with `#pragma
25035 interface', the effect on an inline function defined in that class is
25036 similar to an explicit `extern' declaration--the compiler emits no code
25037 at all to define an independent version of the function. Its
25038 definition is used only for inlining with its callers.
25040 Conversely, when you include the same header file in a main source file
25041 that declares it as `#pragma implementation', the compiler emits code
25042 for the function itself; this defines a version of the function that
25043 can be found via pointers (or by callers compiled without inlining).
25044 If all calls to the function can be inlined, you can avoid emitting the
25045 function by compiling with `-fno-implement-inlines'. If any calls were
25046 not inlined, you will get linker errors.
25048 ---------- Footnotes ----------
25050 (1) A file's "basename" was the name stripped of all leading path
25051 information and of trailing suffixes, such as `.h' or `.C' or `.cc'.
25054 File: gcc.info, Node: Template Instantiation, Next: Bound member functions, Prev: C++ Interface, Up: C++ Extensions
25056 6.5 Where's the Template?
25057 =========================
25059 C++ templates are the first language feature to require more
25060 intelligence from the environment than one usually finds on a UNIX
25061 system. Somehow the compiler and linker have to make sure that each
25062 template instance occurs exactly once in the executable if it is needed,
25063 and not at all otherwise. There are two basic approaches to this
25064 problem, which are referred to as the Borland model and the Cfront
25068 Borland C++ solved the template instantiation problem by adding
25069 the code equivalent of common blocks to their linker; the compiler
25070 emits template instances in each translation unit that uses them,
25071 and the linker collapses them together. The advantage of this
25072 model is that the linker only has to consider the object files
25073 themselves; there is no external complexity to worry about. This
25074 disadvantage is that compilation time is increased because the
25075 template code is being compiled repeatedly. Code written for this
25076 model tends to include definitions of all templates in the header
25077 file, since they must be seen to be instantiated.
25080 The AT&T C++ translator, Cfront, solved the template instantiation
25081 problem by creating the notion of a template repository, an
25082 automatically maintained place where template instances are
25083 stored. A more modern version of the repository works as follows:
25084 As individual object files are built, the compiler places any
25085 template definitions and instantiations encountered in the
25086 repository. At link time, the link wrapper adds in the objects in
25087 the repository and compiles any needed instances that were not
25088 previously emitted. The advantages of this model are more optimal
25089 compilation speed and the ability to use the system linker; to
25090 implement the Borland model a compiler vendor also needs to
25091 replace the linker. The disadvantages are vastly increased
25092 complexity, and thus potential for error; for some code this can be
25093 just as transparent, but in practice it can been very difficult to
25094 build multiple programs in one directory and one program in
25095 multiple directories. Code written for this model tends to
25096 separate definitions of non-inline member templates into a
25097 separate file, which should be compiled separately.
25099 When used with GNU ld version 2.8 or later on an ELF system such as
25100 GNU/Linux or Solaris 2, or on Microsoft Windows, G++ supports the
25101 Borland model. On other systems, G++ implements neither automatic
25104 A future version of G++ will support a hybrid model whereby the
25105 compiler will emit any instantiations for which the template definition
25106 is included in the compile, and store template definitions and
25107 instantiation context information into the object file for the rest.
25108 The link wrapper will extract that information as necessary and invoke
25109 the compiler to produce the remaining instantiations. The linker will
25110 then combine duplicate instantiations.
25112 In the mean time, you have the following options for dealing with
25113 template instantiations:
25115 1. Compile your template-using code with `-frepo'. The compiler will
25116 generate files with the extension `.rpo' listing all of the
25117 template instantiations used in the corresponding object files
25118 which could be instantiated there; the link wrapper, `collect2',
25119 will then update the `.rpo' files to tell the compiler where to
25120 place those instantiations and rebuild any affected object files.
25121 The link-time overhead is negligible after the first pass, as the
25122 compiler will continue to place the instantiations in the same
25125 This is your best option for application code written for the
25126 Borland model, as it will just work. Code written for the Cfront
25127 model will need to be modified so that the template definitions
25128 are available at one or more points of instantiation; usually this
25129 is as simple as adding `#include <tmethods.cc>' to the end of each
25132 For library code, if you want the library to provide all of the
25133 template instantiations it needs, just try to link all of its
25134 object files together; the link will fail, but cause the
25135 instantiations to be generated as a side effect. Be warned,
25136 however, that this may cause conflicts if multiple libraries try
25137 to provide the same instantiations. For greater control, use
25138 explicit instantiation as described in the next option.
25140 2. Compile your code with `-fno-implicit-templates' to disable the
25141 implicit generation of template instances, and explicitly
25142 instantiate all the ones you use. This approach requires more
25143 knowledge of exactly which instances you need than do the others,
25144 but it's less mysterious and allows greater control. You can
25145 scatter the explicit instantiations throughout your program,
25146 perhaps putting them in the translation units where the instances
25147 are used or the translation units that define the templates
25148 themselves; you can put all of the explicit instantiations you
25149 need into one big file; or you can create small files like
25154 template class Foo<int>;
25155 template ostream& operator <<
25156 (ostream&, const Foo<int>&);
25158 for each of the instances you need, and create a template
25159 instantiation library from those.
25161 If you are using Cfront-model code, you can probably get away with
25162 not using `-fno-implicit-templates' when compiling files that don't
25163 `#include' the member template definitions.
25165 If you use one big file to do the instantiations, you may want to
25166 compile it without `-fno-implicit-templates' so you get all of the
25167 instances required by your explicit instantiations (but not by any
25168 other files) without having to specify them as well.
25170 G++ has extended the template instantiation syntax given in the ISO
25171 standard to allow forward declaration of explicit instantiations
25172 (with `extern'), instantiation of the compiler support data for a
25173 template class (i.e. the vtable) without instantiating any of its
25174 members (with `inline'), and instantiation of only the static data
25175 members of a template class, without the support data or member
25176 functions (with (`static'):
25178 extern template int max (int, int);
25179 inline template class Foo<int>;
25180 static template class Foo<int>;
25182 3. Do nothing. Pretend G++ does implement automatic instantiation
25183 management. Code written for the Borland model will work fine, but
25184 each translation unit will contain instances of each of the
25185 templates it uses. In a large program, this can lead to an
25186 unacceptable amount of code duplication.
25189 File: gcc.info, Node: Bound member functions, Next: C++ Attributes, Prev: Template Instantiation, Up: C++ Extensions
25191 6.6 Extracting the function pointer from a bound pointer to member function
25192 ===========================================================================
25194 In C++, pointer to member functions (PMFs) are implemented using a wide
25195 pointer of sorts to handle all the possible call mechanisms; the PMF
25196 needs to store information about how to adjust the `this' pointer, and
25197 if the function pointed to is virtual, where to find the vtable, and
25198 where in the vtable to look for the member function. If you are using
25199 PMFs in an inner loop, you should really reconsider that decision. If
25200 that is not an option, you can extract the pointer to the function that
25201 would be called for a given object/PMF pair and call it directly inside
25202 the inner loop, to save a bit of time.
25204 Note that you will still be paying the penalty for the call through a
25205 function pointer; on most modern architectures, such a call defeats the
25206 branch prediction features of the CPU. This is also true of normal
25207 virtual function calls.
25209 The syntax for this extension is
25212 extern int (A::*fp)();
25213 typedef int (*fptr)(A *);
25215 fptr p = (fptr)(a.*fp);
25217 For PMF constants (i.e. expressions of the form `&Klasse::Member'), no
25218 object is needed to obtain the address of the function. They can be
25219 converted to function pointers directly:
25221 fptr p1 = (fptr)(&A::foo);
25223 You must specify `-Wno-pmf-conversions' to use this extension.
25226 File: gcc.info, Node: C++ Attributes, Next: Namespace Association, Prev: Bound member functions, Up: C++ Extensions
25228 6.7 C++-Specific Variable, Function, and Type Attributes
25229 ========================================================
25231 Some attributes only make sense for C++ programs.
25233 `init_priority (PRIORITY)'
25234 In Standard C++, objects defined at namespace scope are guaranteed
25235 to be initialized in an order in strict accordance with that of
25236 their definitions _in a given translation unit_. No guarantee is
25237 made for initializations across translation units. However, GNU
25238 C++ allows users to control the order of initialization of objects
25239 defined at namespace scope with the `init_priority' attribute by
25240 specifying a relative PRIORITY, a constant integral expression
25241 currently bounded between 101 and 65535 inclusive. Lower numbers
25242 indicate a higher priority.
25244 In the following example, `A' would normally be created before
25245 `B', but the `init_priority' attribute has reversed that order:
25247 Some_Class A __attribute__ ((init_priority (2000)));
25248 Some_Class B __attribute__ ((init_priority (543)));
25250 Note that the particular values of PRIORITY do not matter; only
25251 their relative ordering.
25254 This type attribute informs C++ that the class is a Java
25255 interface. It may only be applied to classes declared within an
25256 `extern "Java"' block. Calls to methods declared in this
25257 interface will be dispatched using GCJ's interface table
25258 mechanism, instead of regular virtual table dispatch.
25261 See also *Note Namespace Association::.
25264 File: gcc.info, Node: Namespace Association, Next: Java Exceptions, Prev: C++ Attributes, Up: C++ Extensions
25266 6.8 Namespace Association
25267 =========================
25269 *Caution:* The semantics of this extension are not fully defined.
25270 Users should refrain from using this extension as its semantics may
25271 change subtly over time. It is possible that this extension will be
25272 removed in future versions of G++.
25274 A using-directive with `__attribute ((strong))' is stronger than a
25275 normal using-directive in two ways:
25277 * Templates from the used namespace can be specialized and explicitly
25278 instantiated as though they were members of the using namespace.
25280 * The using namespace is considered an associated namespace of all
25281 templates in the used namespace for purposes of argument-dependent
25284 The used namespace must be nested within the using namespace so that
25285 normal unqualified lookup works properly.
25287 This is useful for composing a namespace transparently from
25288 implementation namespaces. For example:
25292 template <class T> struct A { };
25294 using namespace debug __attribute ((__strong__));
25295 template <> struct A<int> { }; // ok to specialize
25297 template <class T> void f (A<T>);
25302 f (std::A<float>()); // lookup finds std::f
25307 File: gcc.info, Node: Java Exceptions, Next: Deprecated Features, Prev: Namespace Association, Up: C++ Extensions
25309 6.9 Java Exceptions
25310 ===================
25312 The Java language uses a slightly different exception handling model
25313 from C++. Normally, GNU C++ will automatically detect when you are
25314 writing C++ code that uses Java exceptions, and handle them
25315 appropriately. However, if C++ code only needs to execute destructors
25316 when Java exceptions are thrown through it, GCC will guess incorrectly.
25317 Sample problematic code is:
25319 struct S { ~S(); };
25320 extern void bar(); // is written in Java, and may throw exceptions
25327 The usual effect of an incorrect guess is a link failure, complaining of
25328 a missing routine called `__gxx_personality_v0'.
25330 You can inform the compiler that Java exceptions are to be used in a
25331 translation unit, irrespective of what it might think, by writing
25332 `#pragma GCC java_exceptions' at the head of the file. This `#pragma'
25333 must appear before any functions that throw or catch exceptions, or run
25334 destructors when exceptions are thrown through them.
25336 You cannot mix Java and C++ exceptions in the same translation unit.
25337 It is believed to be safe to throw a C++ exception from one file through
25338 another file compiled for the Java exception model, or vice versa, but
25339 there may be bugs in this area.
25342 File: gcc.info, Node: Deprecated Features, Next: Backwards Compatibility, Prev: Java Exceptions, Up: C++ Extensions
25344 6.10 Deprecated Features
25345 ========================
25347 In the past, the GNU C++ compiler was extended to experiment with new
25348 features, at a time when the C++ language was still evolving. Now that
25349 the C++ standard is complete, some of those features are superseded by
25350 superior alternatives. Using the old features might cause a warning in
25351 some cases that the feature will be dropped in the future. In other
25352 cases, the feature might be gone already.
25354 While the list below is not exhaustive, it documents some of the
25355 options that are now deprecated:
25357 `-fexternal-templates'
25358 `-falt-external-templates'
25359 These are two of the many ways for G++ to implement template
25360 instantiation. *Note Template Instantiation::. The C++ standard
25361 clearly defines how template definitions have to be organized
25362 across implementation units. G++ has an implicit instantiation
25363 mechanism that should work just fine for standard-conforming code.
25365 `-fstrict-prototype'
25366 `-fno-strict-prototype'
25367 Previously it was possible to use an empty prototype parameter
25368 list to indicate an unspecified number of parameters (like C),
25369 rather than no parameters, as C++ demands. This feature has been
25370 removed, except where it is required for backwards compatibility
25371 *Note Backwards Compatibility::.
25373 G++ allows a virtual function returning `void *' to be overridden by
25374 one returning a different pointer type. This extension to the
25375 covariant return type rules is now deprecated and will be removed from a
25378 The G++ minimum and maximum operators (`<?' and `>?') and their
25379 compound forms (`<?=') and `>?=') have been deprecated and will be
25380 removed in a future version. Code using these operators should be
25381 modified to use `std::min' and `std::max' instead.
25383 The named return value extension has been deprecated, and is now
25386 The use of initializer lists with new expressions has been deprecated,
25387 and is now removed from G++.
25389 Floating and complex non-type template parameters have been deprecated,
25390 and are now removed from G++.
25392 The implicit typename extension has been deprecated and is now removed
25395 The use of default arguments in function pointers, function typedefs
25396 and other places where they are not permitted by the standard is
25397 deprecated and will be removed from a future version of G++.
25399 G++ allows floating-point literals to appear in integral constant
25400 expressions, e.g. ` enum E { e = int(2.2 * 3.7) } ' This extension is
25401 deprecated and will be removed from a future version.
25403 G++ allows static data members of const floating-point type to be
25404 declared with an initializer in a class definition. The standard only
25405 allows initializers for static members of const integral types and const
25406 enumeration types so this extension has been deprecated and will be
25407 removed from a future version.
25410 File: gcc.info, Node: Backwards Compatibility, Prev: Deprecated Features, Up: C++ Extensions
25412 6.11 Backwards Compatibility
25413 ============================
25415 Now that there is a definitive ISO standard C++, G++ has a specification
25416 to adhere to. The C++ language evolved over time, and features that
25417 used to be acceptable in previous drafts of the standard, such as the
25418 ARM [Annotated C++ Reference Manual], are no longer accepted. In order
25419 to allow compilation of C++ written to such drafts, G++ contains some
25420 backwards compatibilities. _All such backwards compatibility features
25421 are liable to disappear in future versions of G++._ They should be
25422 considered deprecated *Note Deprecated Features::.
25425 If a variable is declared at for scope, it used to remain in scope
25426 until the end of the scope which contained the for statement
25427 (rather than just within the for scope). G++ retains this, but
25428 issues a warning, if such a variable is accessed outside the for
25431 `Implicit C language'
25432 Old C system header files did not contain an `extern "C" {...}'
25433 scope to set the language. On such systems, all header files are
25434 implicitly scoped inside a C language scope. Also, an empty
25435 prototype `()' will be treated as an unspecified number of
25436 arguments, rather than no arguments, as C++ demands.
25439 File: gcc.info, Node: Objective-C, Next: Compatibility, Prev: C++ Extensions, Up: Top
25441 7 GNU Objective-C runtime features
25442 **********************************
25444 This document is meant to describe some of the GNU Objective-C runtime
25445 features. It is not intended to teach you Objective-C, there are
25446 several resources on the Internet that present the language. Questions
25447 and comments about this document to Ovidiu Predescu <ovidiu@cup.hp.com>.
25451 * Executing code before main::
25453 * Garbage Collection::
25454 * Constant string objects::
25455 * compatibility_alias::
25458 File: gcc.info, Node: Executing code before main, Next: Type encoding, Prev: Objective-C, Up: Objective-C
25460 7.1 `+load': Executing code before main
25461 =======================================
25463 The GNU Objective-C runtime provides a way that allows you to execute
25464 code before the execution of the program enters the `main' function.
25465 The code is executed on a per-class and a per-category basis, through a
25466 special class method `+load'.
25468 This facility is very useful if you want to initialize global variables
25469 which can be accessed by the program directly, without sending a message
25470 to the class first. The usual way to initialize global variables, in
25471 the `+initialize' method, might not be useful because `+initialize' is
25472 only called when the first message is sent to a class object, which in
25473 some cases could be too late.
25475 Suppose for example you have a `FileStream' class that declares
25476 `Stdin', `Stdout' and `Stderr' as global variables, like below:
25479 FileStream *Stdin = nil;
25480 FileStream *Stdout = nil;
25481 FileStream *Stderr = nil;
25483 @implementation FileStream
25487 Stdin = [[FileStream new] initWithFd:0];
25488 Stdout = [[FileStream new] initWithFd:1];
25489 Stderr = [[FileStream new] initWithFd:2];
25492 /* Other methods here */
25495 In this example, the initialization of `Stdin', `Stdout' and `Stderr'
25496 in `+initialize' occurs too late. The programmer can send a message to
25497 one of these objects before the variables are actually initialized,
25498 thus sending messages to the `nil' object. The `+initialize' method
25499 which actually initializes the global variables is not invoked until
25500 the first message is sent to the class object. The solution would
25501 require these variables to be initialized just before entering `main'.
25503 The correct solution of the above problem is to use the `+load' method
25504 instead of `+initialize':
25507 @implementation FileStream
25511 Stdin = [[FileStream new] initWithFd:0];
25512 Stdout = [[FileStream new] initWithFd:1];
25513 Stderr = [[FileStream new] initWithFd:2];
25516 /* Other methods here */
25519 The `+load' is a method that is not overridden by categories. If a
25520 class and a category of it both implement `+load', both methods are
25521 invoked. This allows some additional initializations to be performed in
25524 This mechanism is not intended to be a replacement for `+initialize'.
25525 You should be aware of its limitations when you decide to use it
25526 instead of `+initialize'.
25530 * What you can and what you cannot do in +load::
25533 File: gcc.info, Node: What you can and what you cannot do in +load, Prev: Executing code before main, Up: Executing code before main
25535 7.1.1 What you can and what you cannot do in `+load'
25536 ----------------------------------------------------
25538 The `+load' implementation in the GNU runtime guarantees you the
25541 * you can write whatever C code you like;
25543 * you can send messages to Objective-C constant strings (`@"this is a
25544 constant string"');
25546 * you can allocate and send messages to objects whose class is
25547 implemented in the same file;
25549 * the `+load' implementation of all super classes of a class are
25550 executed before the `+load' of that class is executed;
25552 * the `+load' implementation of a class is executed before the
25553 `+load' implementation of any category.
25556 In particular, the following things, even if they can work in a
25557 particular case, are not guaranteed:
25559 * allocation of or sending messages to arbitrary objects;
25561 * allocation of or sending messages to objects whose classes have a
25562 category implemented in the same file;
25565 You should make no assumptions about receiving `+load' in sibling
25566 classes when you write `+load' of a class. The order in which sibling
25567 classes receive `+load' is not guaranteed.
25569 The order in which `+load' and `+initialize' are called could be
25570 problematic if this matters. If you don't allocate objects inside
25571 `+load', it is guaranteed that `+load' is called before `+initialize'.
25572 If you create an object inside `+load' the `+initialize' method of
25573 object's class is invoked even if `+load' was not invoked. Note if you
25574 explicitly call `+load' on a class, `+initialize' will be called first.
25575 To avoid possible problems try to implement only one of these methods.
25577 The `+load' method is also invoked when a bundle is dynamically loaded
25578 into your running program. This happens automatically without any
25579 intervening operation from you. When you write bundles and you need to
25580 write `+load' you can safely create and send messages to objects whose
25581 classes already exist in the running program. The same restrictions as
25582 above apply to classes defined in bundle.
25585 File: gcc.info, Node: Type encoding, Next: Garbage Collection, Prev: Executing code before main, Up: Objective-C
25590 The Objective-C compiler generates type encodings for all the types.
25591 These type encodings are used at runtime to find out information about
25592 selectors and methods and about objects and classes.
25594 The types are encoded in the following way:
25598 `unsigned char' `C'
25600 `unsigned short' `S'
25604 `unsigned long' `L'
25616 Complex types `j' followed by the inner type. For example
25617 `_Complex double' is encoded as "jd".
25618 bit-fields `b' followed by the starting position of the
25619 bit-field, the type of the bit-field and the size of
25620 the bit-field (the bit-fields encoding was changed
25621 from the NeXT's compiler encoding, see below)
25623 The encoding of bit-fields has changed to allow bit-fields to be
25624 properly handled by the runtime functions that compute sizes and
25625 alignments of types that contain bit-fields. The previous encoding
25626 contained only the size of the bit-field. Using only this information
25627 it is not possible to reliably compute the size occupied by the
25628 bit-field. This is very important in the presence of the Boehm's
25629 garbage collector because the objects are allocated using the typed
25630 memory facility available in this collector. The typed memory
25631 allocation requires information about where the pointers are located
25634 The position in the bit-field is the position, counting in bits, of the
25635 bit closest to the beginning of the structure.
25637 The non-atomic types are encoded as follows:
25639 pointers `^' followed by the pointed type.
25640 arrays `[' followed by the number of elements in the array
25641 followed by the type of the elements followed by `]'
25642 structures `{' followed by the name of the structure (or `?' if the
25643 structure is unnamed), the `=' sign, the type of the
25645 unions `(' followed by the name of the structure (or `?' if the
25646 union is unnamed), the `=' sign, the type of the members
25649 Here are some types and their encodings, as they are generated by the
25650 compiler on an i386 machine:
25653 Objective-C type Compiler encoding
25655 struct { `{?=i[3f]b128i3b131i2c}'
25664 In addition to the types the compiler also encodes the type
25665 specifiers. The table below describes the encoding of the current
25666 Objective-C type specifiers:
25678 The type specifiers are encoded just before the type. Unlike types
25679 however, the type specifiers are only encoded when they appear in method
25683 File: gcc.info, Node: Garbage Collection, Next: Constant string objects, Prev: Type encoding, Up: Objective-C
25685 7.3 Garbage Collection
25686 ======================
25688 Support for a new memory management policy has been added by using a
25689 powerful conservative garbage collector, known as the
25690 Boehm-Demers-Weiser conservative garbage collector. It is available
25691 from `http://www.hpl.hp.com/personal/Hans_Boehm/gc/'.
25693 To enable the support for it you have to configure the compiler using
25694 an additional argument, `--enable-objc-gc'. You need to have garbage
25695 collector installed before building the compiler. This will build an
25696 additional runtime library which has several enhancements to support
25697 the garbage collector. The new library has a new name, `libobjc_gc.a'
25698 to not conflict with the non-garbage-collected library.
25700 When the garbage collector is used, the objects are allocated using the
25701 so-called typed memory allocation mechanism available in the
25702 Boehm-Demers-Weiser collector. This mode requires precise information
25703 on where pointers are located inside objects. This information is
25704 computed once per class, immediately after the class has been
25707 There is a new runtime function `class_ivar_set_gcinvisible()' which
25708 can be used to declare a so-called "weak pointer" reference. Such a
25709 pointer is basically hidden for the garbage collector; this can be
25710 useful in certain situations, especially when you want to keep track of
25711 the allocated objects, yet allow them to be collected. This kind of
25712 pointers can only be members of objects, you cannot declare a global
25713 pointer as a weak reference. Every type which is a pointer type can be
25714 declared a weak pointer, including `id', `Class' and `SEL'.
25716 Here is an example of how to use this feature. Suppose you want to
25717 implement a class whose instances hold a weak pointer reference; the
25718 following class does this:
25721 @interface WeakPointer : Object
25723 const void* weakPointer;
25726 - initWithPointer:(const void*)p;
25727 - (const void*)weakPointer;
25731 @implementation WeakPointer
25735 class_ivar_set_gcinvisible (self, "weakPointer", YES);
25738 - initWithPointer:(const void*)p
25744 - (const void*)weakPointer
25746 return weakPointer;
25751 Weak pointers are supported through a new type character specifier
25752 represented by the `!' character. The `class_ivar_set_gcinvisible()'
25753 function adds or removes this specifier to the string type description
25754 of the instance variable named as argument.
25757 File: gcc.info, Node: Constant string objects, Next: compatibility_alias, Prev: Garbage Collection, Up: Objective-C
25759 7.4 Constant string objects
25760 ===========================
25762 GNU Objective-C provides constant string objects that are generated
25763 directly by the compiler. You declare a constant string object by
25764 prefixing a C constant string with the character `@':
25766 id myString = @"this is a constant string object";
25768 The constant string objects are by default instances of the
25769 `NXConstantString' class which is provided by the GNU Objective-C
25770 runtime. To get the definition of this class you must include the
25771 `objc/NXConstStr.h' header file.
25773 User defined libraries may want to implement their own constant string
25774 class. To be able to support them, the GNU Objective-C compiler
25775 provides a new command line options
25776 `-fconstant-string-class=CLASS-NAME'. The provided class should adhere
25777 to a strict structure, the same as `NXConstantString''s structure:
25780 @interface MyConstantStringClass
25788 `NXConstantString' inherits from `Object'; user class libraries may
25789 choose to inherit the customized constant string class from a different
25790 class than `Object'. There is no requirement in the methods the
25791 constant string class has to implement, but the final ivar layout of
25792 the class must be the compatible with the given structure.
25794 When the compiler creates the statically allocated constant string
25795 object, the `c_string' field will be filled by the compiler with the
25796 string; the `length' field will be filled by the compiler with the
25797 string length; the `isa' pointer will be filled with `NULL' by the
25798 compiler, and it will later be fixed up automatically at runtime by the
25799 GNU Objective-C runtime library to point to the class which was set by
25800 the `-fconstant-string-class' option when the object file is loaded (if
25801 you wonder how it works behind the scenes, the name of the class to
25802 use, and the list of static objects to fixup, are stored by the
25803 compiler in the object file in a place where the GNU runtime library
25804 will find them at runtime).
25806 As a result, when a file is compiled with the
25807 `-fconstant-string-class' option, all the constant string objects will
25808 be instances of the class specified as argument to this option. It is
25809 possible to have multiple compilation units referring to different
25810 constant string classes, neither the compiler nor the linker impose any
25811 restrictions in doing this.
25814 File: gcc.info, Node: compatibility_alias, Prev: Constant string objects, Up: Objective-C
25816 7.5 compatibility_alias
25817 =======================
25819 This is a feature of the Objective-C compiler rather than of the
25820 runtime, anyway since it is documented nowhere and its existence was
25821 forgotten, we are documenting it here.
25823 The keyword `@compatibility_alias' allows you to define a class name
25824 as equivalent to another class name. For example:
25826 @compatibility_alias WOApplication GSWApplication;
25828 tells the compiler that each time it encounters `WOApplication' as a
25829 class name, it should replace it with `GSWApplication' (that is,
25830 `WOApplication' is just an alias for `GSWApplication').
25832 There are some constraints on how this can be used--
25834 * `WOApplication' (the alias) must not be an existing class;
25836 * `GSWApplication' (the real class) must be an existing class.
25840 File: gcc.info, Node: Compatibility, Next: Gcov, Prev: Objective-C, Up: Top
25842 8 Binary Compatibility
25843 **********************
25845 Binary compatibility encompasses several related concepts:
25847 "application binary interface (ABI)"
25848 The set of runtime conventions followed by all of the tools that
25849 deal with binary representations of a program, including
25850 compilers, assemblers, linkers, and language runtime support.
25851 Some ABIs are formal with a written specification, possibly
25852 designed by multiple interested parties. Others are simply the
25853 way things are actually done by a particular set of tools.
25856 A compiler conforms to an ABI if it generates code that follows
25857 all of the specifications enumerated by that ABI. A library
25858 conforms to an ABI if it is implemented according to that ABI. An
25859 application conforms to an ABI if it is built using tools that
25860 conform to that ABI and does not contain source code that
25861 specifically changes behavior specified by the ABI.
25863 "calling conventions"
25864 Calling conventions are a subset of an ABI that specify of how
25865 arguments are passed and function results are returned.
25868 Different sets of tools are interoperable if they generate files
25869 that can be used in the same program. The set of tools includes
25870 compilers, assemblers, linkers, libraries, header files, startup
25871 files, and debuggers. Binaries produced by different sets of
25872 tools are not interoperable unless they implement the same ABI.
25873 This applies to different versions of the same tools as well as
25874 tools from different vendors.
25877 Whether a function in a binary built by one set of tools can call a
25878 function in a binary built by a different set of tools is a subset
25879 of interoperability.
25881 "implementation-defined features"
25882 Language standards include lists of implementation-defined
25883 features whose behavior can vary from one implementation to
25884 another. Some of these features are normally covered by a
25885 platform's ABI and others are not. The features that are not
25886 covered by an ABI generally affect how a program behaves, but not
25890 Conformance to the same ABI and the same behavior of
25891 implementation-defined features are both relevant for
25894 The application binary interface implemented by a C or C++ compiler
25895 affects code generation and runtime support for:
25897 * size and alignment of data types
25899 * layout of structured types
25901 * calling conventions
25903 * register usage conventions
25905 * interfaces for runtime arithmetic support
25907 * object file formats
25909 In addition, the application binary interface implemented by a C++
25910 compiler affects code generation and runtime support for:
25913 * exception handling
25915 * invoking constructors and destructors
25917 * layout, alignment, and padding of classes
25919 * layout and alignment of virtual tables
25921 Some GCC compilation options cause the compiler to generate code that
25922 does not conform to the platform's default ABI. Other options cause
25923 different program behavior for implementation-defined features that are
25924 not covered by an ABI. These options are provided for consistency with
25925 other compilers that do not follow the platform's default ABI or the
25926 usual behavior of implementation-defined features for the platform. Be
25927 very careful about using such options.
25929 Most platforms have a well-defined ABI that covers C code, but ABIs
25930 that cover C++ functionality are not yet common.
25932 Starting with GCC 3.2, GCC binary conventions for C++ are based on a
25933 written, vendor-neutral C++ ABI that was designed to be specific to
25934 64-bit Itanium but also includes generic specifications that apply to
25935 any platform. This C++ ABI is also implemented by other compiler
25936 vendors on some platforms, notably GNU/Linux and BSD systems. We have
25937 tried hard to provide a stable ABI that will be compatible with future
25938 GCC releases, but it is possible that we will encounter problems that
25939 make this difficult. Such problems could include different
25940 interpretations of the C++ ABI by different vendors, bugs in the ABI, or
25941 bugs in the implementation of the ABI in different compilers. GCC's
25942 `-Wabi' switch warns when G++ generates code that is probably not
25943 compatible with the C++ ABI.
25945 The C++ library used with a C++ compiler includes the Standard C++
25946 Library, with functionality defined in the C++ Standard, plus language
25947 runtime support. The runtime support is included in a C++ ABI, but
25948 there is no formal ABI for the Standard C++ Library. Two
25949 implementations of that library are interoperable if one follows the
25950 de-facto ABI of the other and if they are both built with the same
25951 compiler, or with compilers that conform to the same ABI for C++
25952 compiler and runtime support.
25954 When G++ and another C++ compiler conform to the same C++ ABI, but the
25955 implementations of the Standard C++ Library that they normally use do
25956 not follow the same ABI for the Standard C++ Library, object files
25957 built with those compilers can be used in the same program only if they
25958 use the same C++ library. This requires specifying the location of the
25959 C++ library header files when invoking the compiler whose usual library
25960 is not being used. The location of GCC's C++ header files depends on
25961 how the GCC build was configured, but can be seen by using the G++ `-v'
25962 option. With default configuration options for G++ 3.3 the compile
25963 line for a different C++ compiler needs to include
25965 -IGCC_INSTALL_DIRECTORY/include/c++/3.3
25967 Similarly, compiling code with G++ that must use a C++ library other
25968 than the GNU C++ library requires specifying the location of the header
25969 files for that other library.
25971 The most straightforward way to link a program to use a particular C++
25972 library is to use a C++ driver that specifies that C++ library by
25973 default. The `g++' driver, for example, tells the linker where to find
25974 GCC's C++ library (`libstdc++') plus the other libraries and startup
25975 files it needs, in the proper order.
25977 If a program must use a different C++ library and it's not possible to
25978 do the final link using a C++ driver that uses that library by default,
25979 it is necessary to tell `g++' the location and name of that library.
25980 It might also be necessary to specify different startup files and other
25981 runtime support libraries, and to suppress the use of GCC's support
25982 libraries with one or more of the options `-nostdlib', `-nostartfiles',
25983 and `-nodefaultlibs'.
25986 File: gcc.info, Node: Gcov, Next: Trouble, Prev: Compatibility, Up: Top
25988 9 `gcov'--a Test Coverage Program
25989 *********************************
25991 `gcov' is a tool you can use in conjunction with GCC to test code
25992 coverage in your programs.
25996 * Gcov Intro:: Introduction to gcov.
25997 * Invoking Gcov:: How to use gcov.
25998 * Gcov and Optimization:: Using gcov with GCC optimization.
25999 * Gcov Data Files:: The files used by gcov.
26000 * Cross-profiling:: Data file relocation.
26003 File: gcc.info, Node: Gcov Intro, Next: Invoking Gcov, Up: Gcov
26005 9.1 Introduction to `gcov'
26006 ==========================
26008 `gcov' is a test coverage program. Use it in concert with GCC to
26009 analyze your programs to help create more efficient, faster running
26010 code and to discover untested parts of your program. You can use
26011 `gcov' as a profiling tool to help discover where your optimization
26012 efforts will best affect your code. You can also use `gcov' along with
26013 the other profiling tool, `gprof', to assess which parts of your code
26014 use the greatest amount of computing time.
26016 Profiling tools help you analyze your code's performance. Using a
26017 profiler such as `gcov' or `gprof', you can find out some basic
26018 performance statistics, such as:
26020 * how often each line of code executes
26022 * what lines of code are actually executed
26024 * how much computing time each section of code uses
26026 Once you know these things about how your code works when compiled, you
26027 can look at each module to see which modules should be optimized.
26028 `gcov' helps you determine where to work on optimization.
26030 Software developers also use coverage testing in concert with
26031 testsuites, to make sure software is actually good enough for a release.
26032 Testsuites can verify that a program works as expected; a coverage
26033 program tests to see how much of the program is exercised by the
26034 testsuite. Developers can then determine what kinds of test cases need
26035 to be added to the testsuites to create both better testing and a better
26038 You should compile your code without optimization if you plan to use
26039 `gcov' because the optimization, by combining some lines of code into
26040 one function, may not give you as much information as you need to look
26041 for `hot spots' where the code is using a great deal of computer time.
26042 Likewise, because `gcov' accumulates statistics by line (at the lowest
26043 resolution), it works best with a programming style that places only
26044 one statement on each line. If you use complicated macros that expand
26045 to loops or to other control structures, the statistics are less
26046 helpful--they only report on the line where the macro call appears. If
26047 your complex macros behave like functions, you can replace them with
26048 inline functions to solve this problem.
26050 `gcov' creates a logfile called `SOURCEFILE.gcov' which indicates how
26051 many times each line of a source file `SOURCEFILE.c' has executed. You
26052 can use these logfiles along with `gprof' to aid in fine-tuning the
26053 performance of your programs. `gprof' gives timing information you can
26054 use along with the information you get from `gcov'.
26056 `gcov' works only on code compiled with GCC. It is not compatible
26057 with any other profiling or test coverage mechanism.
26060 File: gcc.info, Node: Invoking Gcov, Next: Gcov and Optimization, Prev: Gcov Intro, Up: Gcov
26062 9.2 Invoking `gcov'
26063 ===================
26065 gcov [OPTIONS] SOURCEFILE
26067 `gcov' accepts the following options:
26071 Display help about using `gcov' (on the standard output), and exit
26072 without doing any further processing.
26076 Display the `gcov' version number (on the standard output), and
26077 exit without doing any further processing.
26081 Write individual execution counts for every basic block. Normally
26082 gcov outputs execution counts only for the main blocks of a line.
26083 With this option you can determine if blocks within a single line
26084 are not being executed.
26087 `--branch-probabilities'
26088 Write branch frequencies to the output file, and write branch
26089 summary info to the standard output. This option allows you to
26090 see how often each branch in your program was taken.
26091 Unconditional branches will not be shown, unless the `-u' option
26096 Write branch frequencies as the number of branches taken, rather
26097 than the percentage of branches taken.
26101 Do not create the `gcov' output file.
26104 `--long-file-names'
26105 Create long file names for included source files. For example, if
26106 the header file `x.h' contains code, and was included in the file
26107 `a.c', then running `gcov' on the file `a.c' will produce an
26108 output file called `a.c##x.h.gcov' instead of `x.h.gcov'. This
26109 can be useful if `x.h' is included in multiple source files. If
26110 you use the `-p' option, both the including and included file
26111 names will be complete path names.
26115 Preserve complete path information in the names of generated
26116 `.gcov' files. Without this option, just the filename component is
26117 used. With this option, all directories are used, with `/'
26118 characters translated to `#' characters, `.' directory components
26119 removed and `..' components renamed to `^'. This is useful if
26120 sourcefiles are in several different directories. It also affects
26124 `--function-summaries'
26125 Output summaries for each function in addition to the file level
26128 `-o DIRECTORY|FILE'
26129 `--object-directory DIRECTORY'
26130 `--object-file FILE'
26131 Specify either the directory containing the gcov data files, or the
26132 object path name. The `.gcno', and `.gcda' data files are
26133 searched for using this option. If a directory is specified, the
26134 data files are in that directory and named after the source file
26135 name, without its extension. If a file is specified here, the
26136 data files are named after that file, without its extension. If
26137 this option is not supplied, it defaults to the current directory.
26140 `--unconditional-branches'
26141 When branch probabilities are given, include those of
26142 unconditional branches. Unconditional branches are normally not
26146 `gcov' should be run with the current directory the same as that when
26147 you invoked the compiler. Otherwise it will not be able to locate the
26148 source files. `gcov' produces files called `MANGLEDNAME.gcov' in the
26149 current directory. These contain the coverage information of the
26150 source file they correspond to. One `.gcov' file is produced for each
26151 source file containing code, which was compiled to produce the data
26152 files. The MANGLEDNAME part of the output file name is usually simply
26153 the source file name, but can be something more complicated if the `-l'
26154 or `-p' options are given. Refer to those options for details.
26156 The `.gcov' files contain the `:' separated fields along with program
26157 source code. The format is
26159 EXECUTION_COUNT:LINE_NUMBER:SOURCE LINE TEXT
26161 Additional block information may succeed each line, when requested by
26162 command line option. The EXECUTION_COUNT is `-' for lines containing
26163 no code and `#####' for lines which were never executed. Some lines of
26164 information at the start have LINE_NUMBER of zero.
26166 The preamble lines are of the form
26170 The ordering and number of these preamble lines will be augmented as
26171 `gcov' development progresses -- do not rely on them remaining
26172 unchanged. Use TAG to locate a particular preamble line.
26174 The additional block information is of the form
26178 The INFORMATION is human readable, but designed to be simple enough
26179 for machine parsing too.
26181 When printing percentages, 0% and 100% are only printed when the values
26182 are _exactly_ 0% and 100% respectively. Other values which would
26183 conventionally be rounded to 0% or 100% are instead printed as the
26184 nearest non-boundary value.
26186 When using `gcov', you must first compile your program with two
26187 special GCC options: `-fprofile-arcs -ftest-coverage'. This tells the
26188 compiler to generate additional information needed by gcov (basically a
26189 flow graph of the program) and also includes additional code in the
26190 object files for generating the extra profiling information needed by
26191 gcov. These additional files are placed in the directory where the
26192 object file is located.
26194 Running the program will cause profile output to be generated. For
26195 each source file compiled with `-fprofile-arcs', an accompanying
26196 `.gcda' file will be placed in the object file directory.
26198 Running `gcov' with your program's source file names as arguments will
26199 now produce a listing of the code along with frequency of execution for
26200 each line. For example, if your program is called `tmp.c', this is
26201 what you see when you use the basic `gcov' facility:
26203 $ gcc -fprofile-arcs -ftest-coverage tmp.c
26206 90.00% of 10 source lines executed in file tmp.c
26207 Creating tmp.c.gcov.
26209 The file `tmp.c.gcov' contains output from `gcov'. Here is a sample:
26212 -: 0:Graph:tmp.gcno
26216 -: 1:#include <stdio.h>
26218 -: 3:int main (void)
26220 1: 5: int i, total;
26224 11: 9: for (i = 0; i < 10; i++)
26225 10: 10: total += i;
26227 1: 12: if (total != 45)
26228 #####: 13: printf ("Failure\n");
26230 1: 15: printf ("Success\n");
26234 When you use the `-a' option, you will get individual block counts,
26235 and the output looks like this:
26238 -: 0:Graph:tmp.gcno
26242 -: 1:#include <stdio.h>
26244 -: 3:int main (void)
26247 1: 5: int i, total;
26251 11: 9: for (i = 0; i < 10; i++)
26253 10: 10: total += i;
26256 1: 12: if (total != 45)
26258 #####: 13: printf ("Failure\n");
26261 1: 15: printf ("Success\n");
26267 In this mode, each basic block is only shown on one line - the last
26268 line of the block. A multi-line block will only contribute to the
26269 execution count of that last line, and other lines will not be shown to
26270 contain code, unless previous blocks end on those lines. The total
26271 execution count of a line is shown and subsequent lines show the
26272 execution counts for individual blocks that end on that line. After
26273 each block, the branch and call counts of the block will be shown, if
26274 the `-b' option is given.
26276 Because of the way GCC instruments calls, a call count can be shown
26277 after a line with no individual blocks. As you can see, line 13
26278 contains a basic block that was not executed.
26280 When you use the `-b' option, your output looks like this:
26283 90.00% of 10 source lines executed in file tmp.c
26284 80.00% of 5 branches executed in file tmp.c
26285 80.00% of 5 branches taken at least once in file tmp.c
26286 50.00% of 2 calls executed in file tmp.c
26287 Creating tmp.c.gcov.
26289 Here is a sample of a resulting `tmp.c.gcov' file:
26292 -: 0:Graph:tmp.gcno
26296 -: 1:#include <stdio.h>
26298 -: 3:int main (void)
26299 function main called 1 returned 1 blocks executed 75%
26301 1: 5: int i, total;
26305 11: 9: for (i = 0; i < 10; i++)
26306 branch 0 taken 91% (fallthrough)
26308 10: 10: total += i;
26310 1: 12: if (total != 45)
26311 branch 0 taken 0% (fallthrough)
26312 branch 1 taken 100%
26313 #####: 13: printf ("Failure\n");
26314 call 0 never executed
26316 1: 15: printf ("Success\n");
26317 call 0 called 1 returned 100%
26321 For each function, a line is printed showing how many times the
26322 function is called, how many times it returns and what percentage of the
26323 function's blocks were executed.
26325 For each basic block, a line is printed after the last line of the
26326 basic block describing the branch or call that ends the basic block.
26327 There can be multiple branches and calls listed for a single source
26328 line if there are multiple basic blocks that end on that line. In this
26329 case, the branches and calls are each given a number. There is no
26330 simple way to map these branches and calls back to source constructs.
26331 In general, though, the lowest numbered branch or call will correspond
26332 to the leftmost construct on the source line.
26334 For a branch, if it was executed at least once, then a percentage
26335 indicating the number of times the branch was taken divided by the
26336 number of times the branch was executed will be printed. Otherwise, the
26337 message "never executed" is printed.
26339 For a call, if it was executed at least once, then a percentage
26340 indicating the number of times the call returned divided by the number
26341 of times the call was executed will be printed. This will usually be
26342 100%, but may be less for functions that call `exit' or `longjmp', and
26343 thus may not return every time they are called.
26345 The execution counts are cumulative. If the example program were
26346 executed again without removing the `.gcda' file, the count for the
26347 number of times each line in the source was executed would be added to
26348 the results of the previous run(s). This is potentially useful in
26349 several ways. For example, it could be used to accumulate data over a
26350 number of program runs as part of a test verification suite, or to
26351 provide more accurate long-term information over a large number of
26354 The data in the `.gcda' files is saved immediately before the program
26355 exits. For each source file compiled with `-fprofile-arcs', the
26356 profiling code first attempts to read in an existing `.gcda' file; if
26357 the file doesn't match the executable (differing number of basic block
26358 counts) it will ignore the contents of the file. It then adds in the
26359 new execution counts and finally writes the data to the file.
26362 File: gcc.info, Node: Gcov and Optimization, Next: Gcov Data Files, Prev: Invoking Gcov, Up: Gcov
26364 9.3 Using `gcov' with GCC Optimization
26365 ======================================
26367 If you plan to use `gcov' to help optimize your code, you must first
26368 compile your program with two special GCC options: `-fprofile-arcs
26369 -ftest-coverage'. Aside from that, you can use any other GCC options;
26370 but if you want to prove that every single line in your program was
26371 executed, you should not compile with optimization at the same time.
26372 On some machines the optimizer can eliminate some simple code lines by
26373 combining them with other lines. For example, code like this:
26380 can be compiled into one instruction on some machines. In this case,
26381 there is no way for `gcov' to calculate separate execution counts for
26382 each line because there isn't separate code for each line. Hence the
26383 `gcov' output looks like this if you compiled the program with
26386 100: 12:if (a != b)
26391 The output shows that this block of code, combined by optimization,
26392 executed 100 times. In one sense this result is correct, because there
26393 was only one instruction representing all four of these lines. However,
26394 the output does not indicate how many times the result was 0 and how
26395 many times the result was 1.
26397 Inlineable functions can create unexpected line counts. Line counts
26398 are shown for the source code of the inlineable function, but what is
26399 shown depends on where the function is inlined, or if it is not inlined
26402 If the function is not inlined, the compiler must emit an out of line
26403 copy of the function, in any object file that needs it. If `fileA.o'
26404 and `fileB.o' both contain out of line bodies of a particular
26405 inlineable function, they will also both contain coverage counts for
26406 that function. When `fileA.o' and `fileB.o' are linked together, the
26407 linker will, on many systems, select one of those out of line bodies
26408 for all calls to that function, and remove or ignore the other.
26409 Unfortunately, it will not remove the coverage counters for the unused
26410 function body. Hence when instrumented, all but one use of that
26411 function will show zero counts.
26413 If the function is inlined in several places, the block structure in
26414 each location might not be the same. For instance, a condition might
26415 now be calculable at compile time in some instances. Because the
26416 coverage of all the uses of the inline function will be shown for the
26417 same source lines, the line counts themselves might seem inconsistent.
26420 File: gcc.info, Node: Gcov Data Files, Next: Cross-profiling, Prev: Gcov and Optimization, Up: Gcov
26422 9.4 Brief description of `gcov' data files
26423 ==========================================
26425 `gcov' uses two files for profiling. The names of these files are
26426 derived from the original _object_ file by substituting the file suffix
26427 with either `.gcno', or `.gcda'. All of these files are placed in the
26428 same directory as the object file, and contain data stored in a
26429 platform-independent format.
26431 The `.gcno' file is generated when the source file is compiled with
26432 the GCC `-ftest-coverage' option. It contains information to
26433 reconstruct the basic block graphs and assign source line numbers to
26436 The `.gcda' file is generated when a program containing object files
26437 built with the GCC `-fprofile-arcs' option is executed. A separate
26438 `.gcda' file is created for each object file compiled with this option.
26439 It contains arc transition counts, and some summary information.
26441 The full details of the file format is specified in `gcov-io.h', and
26442 functions provided in that header file should be used to access the
26446 File: gcc.info, Node: Cross-profiling, Prev: Gcov Data Files, Up: Gcov
26448 9.5 Data file relocation to support cross-profiling
26449 ===================================================
26451 Running the program will cause profile output to be generated. For each
26452 source file compiled with `-fprofile-arcs', an accompanying `.gcda'
26453 file will be placed in the object file directory. That implicitly
26454 requires running the program on the same system as it was built or
26455 having the same absolute directory structure on the target system. The
26456 program will try to create the needed directory structure, if it is not
26459 To support cross-profiling, a program compiled with `-fprofile-arcs'
26460 can relocate the data files based on two environment variables:
26462 * GCOV_PREFIX contains the prefix to add to the absolute paths in
26463 the object file. Prefix must be absolute as well, otherwise its
26464 value is ignored. The default is no prefix.
26466 * GCOV_PREFIX_STRIP indicates the how many initial directory names
26467 to strip off the hardwired absolute paths. Default value is 0.
26469 _Note:_ GCOV_PREFIX_STRIP has no effect if GCOV_PREFIX is
26470 undefined, empty or non-absolute.
26472 For example, if the object file `/user/build/foo.o' was built with
26473 `-fprofile-arcs', the final executable will try to create the data file
26474 `/user/build/foo.gcda' when running on the target system. This will
26475 fail if the corresponding directory does not exist and it is unable to
26476 create it. This can be overcome by, for example, setting the
26477 environment as `GCOV_PREFIX=/target/run' and `GCOV_PREFIX_STRIP=1'.
26478 Such a setting will name the data file `/target/run/build/foo.gcda'.
26480 You must move the data files to the expected directory tree in order to
26481 use them for profile directed optimizations (`--use-profile'), or to
26482 use the `gcov' tool.
26485 File: gcc.info, Node: Trouble, Next: Bugs, Prev: Gcov, Up: Top
26487 10 Known Causes of Trouble with GCC
26488 ***********************************
26490 This section describes known problems that affect users of GCC. Most
26491 of these are not GCC bugs per se--if they were, we would fix them. But
26492 the result for a user may be like the result of a bug.
26494 Some of these problems are due to bugs in other software, some are
26495 missing features that are too much work to add, and some are places
26496 where people's opinions differ as to what is best.
26500 * Actual Bugs:: Bugs we will fix later.
26501 * Cross-Compiler Problems:: Common problems of cross compiling with GCC.
26502 * Interoperation:: Problems using GCC with other compilers,
26503 and with certain linkers, assemblers and debuggers.
26504 * Incompatibilities:: GCC is incompatible with traditional C.
26505 * Fixed Headers:: GCC uses corrected versions of system header files.
26506 This is necessary, but doesn't always work smoothly.
26507 * Standard Libraries:: GCC uses the system C library, which might not be
26508 compliant with the ISO C standard.
26509 * Disappointments:: Regrettable things we can't change, but not quite bugs.
26510 * C++ Misunderstandings:: Common misunderstandings with GNU C++.
26511 * Protoize Caveats:: Things to watch out for when using `protoize'.
26512 * Non-bugs:: Things we think are right, but some others disagree.
26513 * Warnings and Errors:: Which problems in your code get warnings,
26514 and which get errors.
26517 File: gcc.info, Node: Actual Bugs, Next: Cross-Compiler Problems, Up: Trouble
26519 10.1 Actual Bugs We Haven't Fixed Yet
26520 =====================================
26522 * The `fixincludes' script interacts badly with automounters; if the
26523 directory of system header files is automounted, it tends to be
26524 unmounted while `fixincludes' is running. This would seem to be a
26525 bug in the automounter. We don't know any good way to work around
26528 * The `fixproto' script will sometimes add prototypes for the
26529 `sigsetjmp' and `siglongjmp' functions that reference the
26530 `jmp_buf' type before that type is defined. To work around this,
26531 edit the offending file and place the typedef in front of the
26535 File: gcc.info, Node: Cross-Compiler Problems, Next: Interoperation, Prev: Actual Bugs, Up: Trouble
26537 10.2 Cross-Compiler Problems
26538 ============================
26540 You may run into problems with cross compilation on certain machines,
26541 for several reasons.
26543 * At present, the program `mips-tfile' which adds debug support to
26544 object files on MIPS systems does not work in a cross compile
26548 File: gcc.info, Node: Interoperation, Next: Incompatibilities, Prev: Cross-Compiler Problems, Up: Trouble
26550 10.3 Interoperation
26551 ===================
26553 This section lists various difficulties encountered in using GCC
26554 together with other compilers or with the assemblers, linkers,
26555 libraries and debuggers on certain systems.
26557 * On many platforms, GCC supports a different ABI for C++ than do
26558 other compilers, so the object files compiled by GCC cannot be
26559 used with object files generated by another C++ compiler.
26561 An area where the difference is most apparent is name mangling.
26562 The use of different name mangling is intentional, to protect you
26563 from more subtle problems. Compilers differ as to many internal
26564 details of C++ implementation, including: how class instances are
26565 laid out, how multiple inheritance is implemented, and how virtual
26566 function calls are handled. If the name encoding were made the
26567 same, your programs would link against libraries provided from
26568 other compilers--but the programs would then crash when run.
26569 Incompatible libraries are then detected at link time, rather than
26572 * On some BSD systems, including some versions of Ultrix, use of
26573 profiling causes static variable destructors (currently used only
26574 in C++) not to be run.
26576 * On some SGI systems, when you use `-lgl_s' as an option, it gets
26577 translated magically to `-lgl_s -lX11_s -lc_s'. Naturally, this
26578 does not happen when you use GCC. You must specify all three
26579 options explicitly.
26581 * On a SPARC, GCC aligns all values of type `double' on an 8-byte
26582 boundary, and it expects every `double' to be so aligned. The Sun
26583 compiler usually gives `double' values 8-byte alignment, with one
26584 exception: function arguments of type `double' may not be aligned.
26586 As a result, if a function compiled with Sun CC takes the address
26587 of an argument of type `double' and passes this pointer of type
26588 `double *' to a function compiled with GCC, dereferencing the
26589 pointer may cause a fatal signal.
26591 One way to solve this problem is to compile your entire program
26592 with GCC. Another solution is to modify the function that is
26593 compiled with Sun CC to copy the argument into a local variable;
26594 local variables are always properly aligned. A third solution is
26595 to modify the function that uses the pointer to dereference it via
26596 the following function `access_double' instead of directly with
26600 access_double (double *unaligned_ptr)
26602 union d2i { double d; int i[2]; };
26604 union d2i *p = (union d2i *) unaligned_ptr;
26613 Storing into the pointer can be done likewise with the same union.
26615 * On Solaris, the `malloc' function in the `libmalloc.a' library may
26616 allocate memory that is only 4 byte aligned. Since GCC on the
26617 SPARC assumes that doubles are 8 byte aligned, this may result in a
26618 fatal signal if doubles are stored in memory allocated by the
26619 `libmalloc.a' library.
26621 The solution is to not use the `libmalloc.a' library. Use instead
26622 `malloc' and related functions from `libc.a'; they do not have
26625 * On the HP PA machine, ADB sometimes fails to work on functions
26626 compiled with GCC. Specifically, it fails to work on functions
26627 that use `alloca' or variable-size arrays. This is because GCC
26628 doesn't generate HP-UX unwind descriptors for such functions. It
26629 may even be impossible to generate them.
26631 * Debugging (`-g') is not supported on the HP PA machine, unless you
26632 use the preliminary GNU tools.
26634 * Taking the address of a label may generate errors from the HP-UX
26635 PA assembler. GAS for the PA does not have this problem.
26637 * Using floating point parameters for indirect calls to static
26638 functions will not work when using the HP assembler. There simply
26639 is no way for GCC to specify what registers hold arguments for
26640 static functions when using the HP assembler. GAS for the PA does
26641 not have this problem.
26643 * In extremely rare cases involving some very large functions you may
26644 receive errors from the HP linker complaining about an out of
26645 bounds unconditional branch offset. This used to occur more often
26646 in previous versions of GCC, but is now exceptionally rare. If
26647 you should run into it, you can work around by making your
26650 * GCC compiled code sometimes emits warnings from the HP-UX
26651 assembler of the form:
26653 (warning) Use of GR3 when
26654 frame >= 8192 may cause conflict.
26656 These warnings are harmless and can be safely ignored.
26658 * In extremely rare cases involving some very large functions you may
26659 receive errors from the AIX Assembler complaining about a
26660 displacement that is too large. If you should run into it, you
26661 can work around by making your function smaller.
26663 * The `libstdc++.a' library in GCC relies on the SVR4 dynamic linker
26664 semantics which merges global symbols between libraries and
26665 applications, especially necessary for C++ streams functionality.
26666 This is not the default behavior of AIX shared libraries and
26667 dynamic linking. `libstdc++.a' is built on AIX with
26668 "runtime-linking" enabled so that symbol merging can occur. To
26669 utilize this feature, the application linked with `libstdc++.a'
26670 must include the `-Wl,-brtl' flag on the link line. G++ cannot
26671 impose this because this option may interfere with the semantics
26672 of the user program and users may not always use `g++' to link his
26673 or her application. Applications are not required to use the
26674 `-Wl,-brtl' flag on the link line--the rest of the `libstdc++.a'
26675 library which is not dependent on the symbol merging semantics
26676 will continue to function correctly.
26678 * An application can interpose its own definition of functions for
26679 functions invoked by `libstdc++.a' with "runtime-linking" enabled
26680 on AIX. To accomplish this the application must be linked with
26681 "runtime-linking" option and the functions explicitly must be
26682 exported by the application (`-Wl,-brtl,-bE:exportfile').
26684 * AIX on the RS/6000 provides support (NLS) for environments outside
26685 of the United States. Compilers and assemblers use NLS to support
26686 locale-specific representations of various objects including
26687 floating-point numbers (`.' vs `,' for separating decimal
26688 fractions). There have been problems reported where the library
26689 linked with GCC does not produce the same floating-point formats
26690 that the assembler accepts. If you have this problem, set the
26691 `LANG' environment variable to `C' or `En_US'.
26693 * Even if you specify `-fdollars-in-identifiers', you cannot
26694 successfully use `$' in identifiers on the RS/6000 due to a
26695 restriction in the IBM assembler. GAS supports these identifiers.
26697 * On Ultrix, the Fortran compiler expects registers 2 through 5 to
26698 be saved by function calls. However, the C compiler uses
26699 conventions compatible with BSD Unix: registers 2 through 5 may be
26700 clobbered by function calls.
26702 GCC uses the same convention as the Ultrix C compiler. You can use
26703 these options to produce code compatible with the Fortran compiler:
26705 -fcall-saved-r2 -fcall-saved-r3 -fcall-saved-r4 -fcall-saved-r5
26708 File: gcc.info, Node: Incompatibilities, Next: Fixed Headers, Prev: Interoperation, Up: Trouble
26710 10.4 Incompatibilities of GCC
26711 =============================
26713 There are several noteworthy incompatibilities between GNU C and K&R
26714 (non-ISO) versions of C.
26716 * GCC normally makes string constants read-only. If several
26717 identical-looking string constants are used, GCC stores only one
26718 copy of the string.
26720 One consequence is that you cannot call `mktemp' with a string
26721 constant argument. The function `mktemp' always alters the string
26722 its argument points to.
26724 Another consequence is that `sscanf' does not work on some very
26725 old systems when passed a string constant as its format control
26726 string or input. This is because `sscanf' incorrectly tries to
26727 write into the string constant. Likewise `fscanf' and `scanf'.
26729 The solution to these problems is to change the program to use
26730 `char'-array variables with initialization strings for these
26731 purposes instead of string constants.
26733 * `-2147483648' is positive.
26735 This is because 2147483648 cannot fit in the type `int', so
26736 (following the ISO C rules) its data type is `unsigned long int'.
26737 Negating this value yields 2147483648 again.
26739 * GCC does not substitute macro arguments when they appear inside of
26740 string constants. For example, the following macro in GCC
26744 will produce output `"a"' regardless of what the argument A is.
26746 * When you use `setjmp' and `longjmp', the only automatic variables
26747 guaranteed to remain valid are those declared `volatile'. This is
26748 a consequence of automatic register allocation. Consider this
26762 /* `longjmp (j)' may occur in `fun3'. */
26763 return a + fun3 ();
26766 Here `a' may or may not be restored to its first value when the
26767 `longjmp' occurs. If `a' is allocated in a register, then its
26768 first value is restored; otherwise, it keeps the last value stored
26771 If you use the `-W' option with the `-O' option, you will get a
26772 warning when GCC thinks such a problem might be possible.
26774 * Programs that use preprocessing directives in the middle of macro
26775 arguments do not work with GCC. For example, a program like this
26782 ISO C does not permit such a construct.
26784 * K&R compilers allow comments to cross over an inclusion boundary
26785 (i.e. started in an include file and ended in the including file).
26787 * Declarations of external variables and functions within a block
26788 apply only to the block containing the declaration. In other
26789 words, they have the same scope as any other declaration in the
26792 In some other C compilers, a `extern' declaration affects all the
26793 rest of the file even if it happens within a block.
26795 * In traditional C, you can combine `long', etc., with a typedef
26796 name, as shown here:
26799 typedef long foo bar;
26801 In ISO C, this is not allowed: `long' and other type modifiers
26802 require an explicit `int'.
26804 * PCC allows typedef names to be used as function parameters.
26806 * Traditional C allows the following erroneous pair of declarations
26807 to appear together in a given scope:
26812 * GCC treats all characters of identifiers as significant.
26813 According to K&R-1 (2.2), "No more than the first eight characters
26814 are significant, although more may be used.". Also according to
26815 K&R-1 (2.2), "An identifier is a sequence of letters and digits;
26816 the first character must be a letter. The underscore _ counts as
26817 a letter.", but GCC also allows dollar signs in identifiers.
26819 * PCC allows whitespace in the middle of compound assignment
26820 operators such as `+='. GCC, following the ISO standard, does not
26823 * GCC complains about unterminated character constants inside of
26824 preprocessing conditionals that fail. Some programs have English
26825 comments enclosed in conditionals that are guaranteed to fail; if
26826 these comments contain apostrophes, GCC will probably report an
26827 error. For example, this code would produce an error:
26830 You can't expect this to work.
26833 The best solution to such a problem is to put the text into an
26834 actual C comment delimited by `/*...*/'.
26836 * Many user programs contain the declaration `long time ();'. In the
26837 past, the system header files on many systems did not actually
26838 declare `time', so it did not matter what type your program
26839 declared it to return. But in systems with ISO C headers, `time'
26840 is declared to return `time_t', and if that is not the same as
26841 `long', then `long time ();' is erroneous.
26843 The solution is to change your program to use appropriate system
26844 headers (`<time.h>' on systems with ISO C headers) and not to
26845 declare `time' if the system header files declare it, or failing
26846 that to use `time_t' as the return type of `time'.
26848 * When compiling functions that return `float', PCC converts it to a
26849 double. GCC actually returns a `float'. If you are concerned
26850 with PCC compatibility, you should declare your functions to return
26851 `double'; you might as well say what you mean.
26853 * When compiling functions that return structures or unions, GCC
26854 output code normally uses a method different from that used on most
26855 versions of Unix. As a result, code compiled with GCC cannot call
26856 a structure-returning function compiled with PCC, and vice versa.
26858 The method used by GCC is as follows: a structure or union which is
26859 1, 2, 4 or 8 bytes long is returned like a scalar. A structure or
26860 union with any other size is stored into an address supplied by
26861 the caller (usually in a special, fixed register, but on some
26862 machines it is passed on the stack). The target hook
26863 `TARGET_STRUCT_VALUE_RTX' tells GCC where to pass this address.
26865 By contrast, PCC on most target machines returns structures and
26866 unions of any size by copying the data into an area of static
26867 storage, and then returning the address of that storage as if it
26868 were a pointer value. The caller must copy the data from that
26869 memory area to the place where the value is wanted. GCC does not
26870 use this method because it is slower and nonreentrant.
26872 On some newer machines, PCC uses a reentrant convention for all
26873 structure and union returning. GCC on most of these machines uses
26874 a compatible convention when returning structures and unions in
26875 memory, but still returns small structures and unions in registers.
26877 You can tell GCC to use a compatible convention for all structure
26878 and union returning with the option `-fpcc-struct-return'.
26880 * GCC complains about program fragments such as `0x74ae-0x4000'
26881 which appear to be two hexadecimal constants separated by the minus
26882 operator. Actually, this string is a single "preprocessing token".
26883 Each such token must correspond to one token in C. Since this
26884 does not, GCC prints an error message. Although it may appear
26885 obvious that what is meant is an operator and two values, the ISO
26886 C standard specifically requires that this be treated as erroneous.
26888 A "preprocessing token" is a "preprocessing number" if it begins
26889 with a digit and is followed by letters, underscores, digits,
26890 periods and `e+', `e-', `E+', `E-', `p+', `p-', `P+', or `P-'
26891 character sequences. (In strict C89 mode, the sequences `p+',
26892 `p-', `P+' and `P-' cannot appear in preprocessing numbers.)
26894 To make the above program fragment valid, place whitespace in
26895 front of the minus sign. This whitespace will end the
26896 preprocessing number.
26899 File: gcc.info, Node: Fixed Headers, Next: Standard Libraries, Prev: Incompatibilities, Up: Trouble
26901 10.5 Fixed Header Files
26902 =======================
26904 GCC needs to install corrected versions of some system header files.
26905 This is because most target systems have some header files that won't
26906 work with GCC unless they are changed. Some have bugs, some are
26907 incompatible with ISO C, and some depend on special features of other
26910 Installing GCC automatically creates and installs the fixed header
26911 files, by running a program called `fixincludes'. Normally, you don't
26912 need to pay attention to this. But there are cases where it doesn't do
26913 the right thing automatically.
26915 * If you update the system's header files, such as by installing a
26916 new system version, the fixed header files of GCC are not
26917 automatically updated. They can be updated using the `mkheaders'
26918 script installed in `LIBEXECDIR/gcc/TARGET/VERSION/install-tools/'.
26920 * On some systems, header file directories contain machine-specific
26921 symbolic links in certain places. This makes it possible to share
26922 most of the header files among hosts running the same version of
26923 the system on different machine models.
26925 The programs that fix the header files do not understand this
26926 special way of using symbolic links; therefore, the directory of
26927 fixed header files is good only for the machine model used to
26930 It is possible to make separate sets of fixed header files for the
26931 different machine models, and arrange a structure of symbolic
26932 links so as to use the proper set, but you'll have to do this by
26936 File: gcc.info, Node: Standard Libraries, Next: Disappointments, Prev: Fixed Headers, Up: Trouble
26938 10.6 Standard Libraries
26939 =======================
26941 GCC by itself attempts to be a conforming freestanding implementation.
26942 *Note Language Standards Supported by GCC: Standards, for details of
26943 what this means. Beyond the library facilities required of such an
26944 implementation, the rest of the C library is supplied by the vendor of
26945 the operating system. If that C library doesn't conform to the C
26946 standards, then your programs might get warnings (especially when using
26947 `-Wall') that you don't expect.
26949 For example, the `sprintf' function on SunOS 4.1.3 returns `char *'
26950 while the C standard says that `sprintf' returns an `int'. The
26951 `fixincludes' program could make the prototype for this function match
26952 the Standard, but that would be wrong, since the function will still
26955 If you need a Standard compliant library, then you need to find one, as
26956 GCC does not provide one. The GNU C library (called `glibc') provides
26957 ISO C, POSIX, BSD, SystemV and X/Open compatibility for GNU/Linux and
26958 HURD-based GNU systems; no recent version of it supports other systems,
26959 though some very old versions did. Version 2.2 of the GNU C library
26960 includes nearly complete C99 support. You could also ask your
26961 operating system vendor if newer libraries are available.
26964 File: gcc.info, Node: Disappointments, Next: C++ Misunderstandings, Prev: Standard Libraries, Up: Trouble
26966 10.7 Disappointments and Misunderstandings
26967 ==========================================
26969 These problems are perhaps regrettable, but we don't know any practical
26972 * Certain local variables aren't recognized by debuggers when you
26973 compile with optimization.
26975 This occurs because sometimes GCC optimizes the variable out of
26976 existence. There is no way to tell the debugger how to compute the
26977 value such a variable "would have had", and it is not clear that
26978 would be desirable anyway. So GCC simply does not mention the
26979 eliminated variable when it writes debugging information.
26981 You have to expect a certain amount of disagreement between the
26982 executable and your source code, when you use optimization.
26984 * Users often think it is a bug when GCC reports an error for code
26987 int foo (struct mumble *);
26989 struct mumble { ... };
26991 int foo (struct mumble *x)
26994 This code really is erroneous, because the scope of `struct
26995 mumble' in the prototype is limited to the argument list
26996 containing it. It does not refer to the `struct mumble' defined
26997 with file scope immediately below--they are two unrelated types
26998 with similar names in different scopes.
27000 But in the definition of `foo', the file-scope type is used
27001 because that is available to be inherited. Thus, the definition
27002 and the prototype do not match, and you get an error.
27004 This behavior may seem silly, but it's what the ISO standard
27005 specifies. It is easy enough for you to make your code work by
27006 moving the definition of `struct mumble' above the prototype.
27007 It's not worth being incompatible with ISO C just to avoid an
27008 error for the example shown above.
27010 * Accesses to bit-fields even in volatile objects works by accessing
27011 larger objects, such as a byte or a word. You cannot rely on what
27012 size of object is accessed in order to read or write the
27013 bit-field; it may even vary for a given bit-field according to the
27016 If you care about controlling the amount of memory that is
27017 accessed, use volatile but do not use bit-fields.
27019 * GCC comes with shell scripts to fix certain known problems in
27020 system header files. They install corrected copies of various
27021 header files in a special directory where only GCC will normally
27022 look for them. The scripts adapt to various systems by searching
27023 all the system header files for the problem cases that we know
27026 If new system header files are installed, nothing automatically
27027 arranges to update the corrected header files. They can be
27028 updated using the `mkheaders' script installed in
27029 `LIBEXECDIR/gcc/TARGET/VERSION/install-tools/'.
27031 * On 68000 and x86 systems, for instance, you can get paradoxical
27032 results if you test the precise values of floating point numbers.
27033 For example, you can find that a floating point value which is not
27034 a NaN is not equal to itself. This results from the fact that the
27035 floating point registers hold a few more bits of precision than
27036 fit in a `double' in memory. Compiled code moves values between
27037 memory and floating point registers at its convenience, and moving
27038 them into memory truncates them.
27040 You can partially avoid this problem by using the `-ffloat-store'
27041 option (*note Optimize Options::).
27043 * On AIX and other platforms without weak symbol support, templates
27044 need to be instantiated explicitly and symbols for static members
27045 of templates will not be generated.
27047 * On AIX, GCC scans object files and library archives for static
27048 constructors and destructors when linking an application before the
27049 linker prunes unreferenced symbols. This is necessary to prevent
27050 the AIX linker from mistakenly assuming that static constructor or
27051 destructor are unused and removing them before the scanning can
27052 occur. All static constructors and destructors found will be
27053 referenced even though the modules in which they occur may not be
27054 used by the program. This may lead to both increased executable
27055 size and unexpected symbol references.
27058 File: gcc.info, Node: C++ Misunderstandings, Next: Protoize Caveats, Prev: Disappointments, Up: Trouble
27060 10.8 Common Misunderstandings with GNU C++
27061 ==========================================
27063 C++ is a complex language and an evolving one, and its standard
27064 definition (the ISO C++ standard) was only recently completed. As a
27065 result, your C++ compiler may occasionally surprise you, even when its
27066 behavior is correct. This section discusses some areas that frequently
27067 give rise to questions of this sort.
27071 * Static Definitions:: Static member declarations are not definitions
27072 * Name lookup:: Name lookup, templates, and accessing members of base classes
27073 * Temporaries:: Temporaries may vanish before you expect
27074 * Copy Assignment:: Copy Assignment operators copy virtual bases twice
27077 File: gcc.info, Node: Static Definitions, Next: Name lookup, Up: C++ Misunderstandings
27079 10.8.1 Declare _and_ Define Static Members
27080 ------------------------------------------
27082 When a class has static data members, it is not enough to _declare_ the
27083 static member; you must also _define_ it. For example:
27092 This declaration only establishes that the class `Foo' has an `int'
27093 named `Foo::bar', and a member function named `Foo::method'. But you
27094 still need to define _both_ `method' and `bar' elsewhere. According to
27095 the ISO standard, you must supply an initializer in one (and only one)
27096 source file, such as:
27100 Other C++ compilers may not correctly implement the standard behavior.
27101 As a result, when you switch to `g++' from one of these compilers, you
27102 may discover that a program that appeared to work correctly in fact
27103 does not conform to the standard: `g++' reports as undefined symbols
27104 any static data members that lack definitions.
27107 File: gcc.info, Node: Name lookup, Next: Temporaries, Prev: Static Definitions, Up: C++ Misunderstandings
27109 10.8.2 Name lookup, templates, and accessing members of base classes
27110 --------------------------------------------------------------------
27112 The C++ standard prescribes that all names that are not dependent on
27113 template parameters are bound to their present definitions when parsing
27114 a template function or class.(1) Only names that are dependent are
27115 looked up at the point of instantiation. For example, consider
27120 template <typename T>
27129 static const int N;
27132 Here, the names `foo' and `N' appear in a context that does not depend
27133 on the type of `T'. The compiler will thus require that they are
27134 defined in the context of use in the template, not only before the
27135 point of instantiation, and will here use `::foo(double)' and `A::N',
27136 respectively. In particular, it will convert the integer value to a
27137 `double' when passing it to `::foo(double)'.
27139 Conversely, `bar' and the call to `foo' in the fourth marked line are
27140 used in contexts that do depend on the type of `T', so they are only
27141 looked up at the point of instantiation, and you can provide
27142 declarations for them after declaring the template, but before
27143 instantiating it. In particular, if you instantiate `A::f<int>', the
27144 last line will call an overloaded `::foo(int)' if one was provided,
27145 even if after the declaration of `struct A'.
27147 This distinction between lookup of dependent and non-dependent names is
27148 called two-stage (or dependent) name lookup. G++ implements it since
27151 Two-stage name lookup sometimes leads to situations with behavior
27152 different from non-template codes. The most common is probably this:
27154 template <typename T> struct Base {
27158 template <typename T> struct Derived : public Base<T> {
27159 int get_i() { return i; }
27162 In `get_i()', `i' is not used in a dependent context, so the compiler
27163 will look for a name declared at the enclosing namespace scope (which
27164 is the global scope here). It will not look into the base class, since
27165 that is dependent and you may declare specializations of `Base' even
27166 after declaring `Derived', so the compiler can't really know what `i'
27167 would refer to. If there is no global variable `i', then you will get
27170 In order to make it clear that you want the member of the base class,
27171 you need to defer lookup until instantiation time, at which the base
27172 class is known. For this, you need to access `i' in a dependent
27173 context, by either using `this->i' (remember that `this' is of type
27174 `Derived<T>*', so is obviously dependent), or using `Base<T>::i'.
27175 Alternatively, `Base<T>::i' might be brought into scope by a
27176 `using'-declaration.
27178 Another, similar example involves calling member functions of a base
27181 template <typename T> struct Base {
27185 template <typename T> struct Derived : Base<T> {
27186 int g() { return f(); };
27189 Again, the call to `f()' is not dependent on template arguments (there
27190 are no arguments that depend on the type `T', and it is also not
27191 otherwise specified that the call should be in a dependent context).
27192 Thus a global declaration of such a function must be available, since
27193 the one in the base class is not visible until instantiation time. The
27194 compiler will consequently produce the following error message:
27196 x.cc: In member function `int Derived<T>::g()':
27197 x.cc:6: error: there are no arguments to `f' that depend on a template
27198 parameter, so a declaration of `f' must be available
27199 x.cc:6: error: (if you use `-fpermissive', G++ will accept your code, but
27200 allowing the use of an undeclared name is deprecated)
27202 To make the code valid either use `this->f()', or `Base<T>::f()'.
27203 Using the `-fpermissive' flag will also let the compiler accept the
27204 code, by marking all function calls for which no declaration is visible
27205 at the time of definition of the template for later lookup at
27206 instantiation time, as if it were a dependent call. We do not
27207 recommend using `-fpermissive' to work around invalid code, and it will
27208 also only catch cases where functions in base classes are called, not
27209 where variables in base classes are used (as in the example above).
27211 Note that some compilers (including G++ versions prior to 3.4) get
27212 these examples wrong and accept above code without an error. Those
27213 compilers do not implement two-stage name lookup correctly.
27215 ---------- Footnotes ----------
27217 (1) The C++ standard just uses the term "dependent" for names that
27218 depend on the type or value of template parameters. This shorter term
27219 will also be used in the rest of this section.
27222 File: gcc.info, Node: Temporaries, Next: Copy Assignment, Prev: Name lookup, Up: C++ Misunderstandings
27224 10.8.3 Temporaries May Vanish Before You Expect
27225 -----------------------------------------------
27227 It is dangerous to use pointers or references to _portions_ of a
27228 temporary object. The compiler may very well delete the object before
27229 you expect it to, leaving a pointer to garbage. The most common place
27230 where this problem crops up is in classes like string classes,
27231 especially ones that define a conversion function to type `char *' or
27232 `const char *'--which is one reason why the standard `string' class
27233 requires you to call the `c_str' member function. However, any class
27234 that returns a pointer to some internal structure is potentially
27235 subject to this problem.
27237 For example, a program may use a function `strfunc' that returns
27238 `string' objects, and another function `charfunc' that operates on
27239 pointers to `char':
27242 void charfunc (const char *);
27247 const char *p = strfunc().c_str();
27254 In this situation, it may seem reasonable to save a pointer to the C
27255 string returned by the `c_str' member function and use that rather than
27256 call `c_str' repeatedly. However, the temporary string created by the
27257 call to `strfunc' is destroyed after `p' is initialized, at which point
27258 `p' is left pointing to freed memory.
27260 Code like this may run successfully under some other compilers,
27261 particularly obsolete cfront-based compilers that delete temporaries
27262 along with normal local variables. However, the GNU C++ behavior is
27263 standard-conforming, so if your program depends on late destruction of
27264 temporaries it is not portable.
27266 The safe way to write such code is to give the temporary a name, which
27267 forces it to remain until the end of the scope of the name. For
27270 const string& tmp = strfunc ();
27271 charfunc (tmp.c_str ());
27274 File: gcc.info, Node: Copy Assignment, Prev: Temporaries, Up: C++ Misunderstandings
27276 10.8.4 Implicit Copy-Assignment for Virtual Bases
27277 -------------------------------------------------
27279 When a base class is virtual, only one subobject of the base class
27280 belongs to each full object. Also, the constructors and destructors are
27281 invoked only once, and called from the most-derived class. However,
27282 such objects behave unspecified when being assigned. For example:
27286 Base(char *n) : name(strdup(n)){}
27287 Base& operator= (const Base& other){
27289 name = strdup (other.name);
27293 struct A:virtual Base{
27298 struct B:virtual Base{
27303 struct Derived:public A, public B{
27304 Derived():Base("Derived"){}
27307 void func(Derived &d1, Derived &d2)
27312 The C++ standard specifies that `Base::Base' is only called once when
27313 constructing or copy-constructing a Derived object. It is unspecified
27314 whether `Base::operator=' is called more than once when the implicit
27315 copy-assignment for Derived objects is invoked (as it is inside `func'
27318 G++ implements the "intuitive" algorithm for copy-assignment: assign
27319 all direct bases, then assign all members. In that algorithm, the
27320 virtual base subobject can be encountered more than once. In the
27321 example, copying proceeds in the following order: `val', `name' (via
27322 `strdup'), `bval', and `name' again.
27324 If application code relies on copy-assignment, a user-defined
27325 copy-assignment operator removes any uncertainties. With such an
27326 operator, the application can define whether and how the virtual base
27327 subobject is assigned.
27330 File: gcc.info, Node: Protoize Caveats, Next: Non-bugs, Prev: C++ Misunderstandings, Up: Trouble
27332 10.9 Caveats of using `protoize'
27333 ================================
27335 The conversion programs `protoize' and `unprotoize' can sometimes
27336 change a source file in a way that won't work unless you rearrange it.
27338 * `protoize' can insert references to a type name or type tag before
27339 the definition, or in a file where they are not defined.
27341 If this happens, compiler error messages should show you where the
27342 new references are, so fixing the file by hand is straightforward.
27344 * There are some C constructs which `protoize' cannot figure out.
27345 For example, it can't determine argument types for declaring a
27346 pointer-to-function variable; this you must do by hand. `protoize'
27347 inserts a comment containing `???' each time it finds such a
27348 variable; so you can find all such variables by searching for this
27349 string. ISO C does not require declaring the argument types of
27350 pointer-to-function types.
27352 * Using `unprotoize' can easily introduce bugs. If the program
27353 relied on prototypes to bring about conversion of arguments, these
27354 conversions will not take place in the program without prototypes.
27355 One case in which you can be sure `unprotoize' is safe is when you
27356 are removing prototypes that were made with `protoize'; if the
27357 program worked before without any prototypes, it will work again
27360 You can find all the places where this problem might occur by
27361 compiling the program with the `-Wconversion' option. It prints a
27362 warning whenever an argument is converted.
27364 * Both conversion programs can be confused if there are macro calls
27365 in and around the text to be converted. In other words, the
27366 standard syntax for a declaration or definition must not result
27367 from expanding a macro. This problem is inherent in the design of
27368 C and cannot be fixed. If only a few functions have confusing
27369 macro calls, you can easily convert them manually.
27371 * `protoize' cannot get the argument types for a function whose
27372 definition was not actually compiled due to preprocessing
27373 conditionals. When this happens, `protoize' changes nothing in
27374 regard to such a function. `protoize' tries to detect such
27375 instances and warn about them.
27377 You can generally work around this problem by using `protoize' step
27378 by step, each time specifying a different set of `-D' options for
27379 compilation, until all of the functions have been converted.
27380 There is no automatic way to verify that you have got them all,
27383 * Confusion may result if there is an occasion to convert a function
27384 declaration or definition in a region of source code where there
27385 is more than one formal parameter list present. Thus, attempts to
27386 convert code containing multiple (conditionally compiled) versions
27387 of a single function header (in the same vicinity) may not produce
27388 the desired (or expected) results.
27390 If you plan on converting source files which contain such code, it
27391 is recommended that you first make sure that each conditionally
27392 compiled region of source code which contains an alternative
27393 function header also contains at least one additional follower
27394 token (past the final right parenthesis of the function header).
27395 This should circumvent the problem.
27397 * `unprotoize' can become confused when trying to convert a function
27398 definition or declaration which contains a declaration for a
27399 pointer-to-function formal argument which has the same name as the
27400 function being defined or declared. We recommend you avoid such
27401 choices of formal parameter names.
27403 * You might also want to correct some of the indentation by hand and
27404 break long lines. (The conversion programs don't write lines
27405 longer than eighty characters in any case.)
27408 File: gcc.info, Node: Non-bugs, Next: Warnings and Errors, Prev: Protoize Caveats, Up: Trouble
27410 10.10 Certain Changes We Don't Want to Make
27411 ===========================================
27413 This section lists changes that people frequently request, but which we
27414 do not make because we think GCC is better without them.
27416 * Checking the number and type of arguments to a function which has
27417 an old-fashioned definition and no prototype.
27419 Such a feature would work only occasionally--only for calls that
27420 appear in the same file as the called function, following the
27421 definition. The only way to check all calls reliably is to add a
27422 prototype for the function. But adding a prototype eliminates the
27423 motivation for this feature. So the feature is not worthwhile.
27425 * Warning about using an expression whose type is signed as a shift
27428 Shift count operands are probably signed more often than unsigned.
27429 Warning about this would cause far more annoyance than good.
27431 * Warning about assigning a signed value to an unsigned variable.
27433 Such assignments must be very common; warning about them would
27434 cause more annoyance than good.
27436 * Warning when a non-void function value is ignored.
27438 C contains many standard functions that return a value that most
27439 programs choose to ignore. One obvious example is `printf'.
27440 Warning about this practice only leads the defensive programmer to
27441 clutter programs with dozens of casts to `void'. Such casts are
27442 required so frequently that they become visual noise. Writing
27443 those casts becomes so automatic that they no longer convey useful
27444 information about the intentions of the programmer. For functions
27445 where the return value should never be ignored, use the
27446 `warn_unused_result' function attribute (*note Function
27449 * Making `-fshort-enums' the default.
27451 This would cause storage layout to be incompatible with most other
27452 C compilers. And it doesn't seem very important, given that you
27453 can get the same result in other ways. The case where it matters
27454 most is when the enumeration-valued object is inside a structure,
27455 and in that case you can specify a field width explicitly.
27457 * Making bit-fields unsigned by default on particular machines where
27458 "the ABI standard" says to do so.
27460 The ISO C standard leaves it up to the implementation whether a
27461 bit-field declared plain `int' is signed or not. This in effect
27462 creates two alternative dialects of C.
27464 The GNU C compiler supports both dialects; you can specify the
27465 signed dialect with `-fsigned-bitfields' and the unsigned dialect
27466 with `-funsigned-bitfields'. However, this leaves open the
27467 question of which dialect to use by default.
27469 Currently, the preferred dialect makes plain bit-fields signed,
27470 because this is simplest. Since `int' is the same as `signed int'
27471 in every other context, it is cleanest for them to be the same in
27472 bit-fields as well.
27474 Some computer manufacturers have published Application Binary
27475 Interface standards which specify that plain bit-fields should be
27476 unsigned. It is a mistake, however, to say anything about this
27477 issue in an ABI. This is because the handling of plain bit-fields
27478 distinguishes two dialects of C. Both dialects are meaningful on
27479 every type of machine. Whether a particular object file was
27480 compiled using signed bit-fields or unsigned is of no concern to
27481 other object files, even if they access the same bit-fields in the
27482 same data structures.
27484 A given program is written in one or the other of these two
27485 dialects. The program stands a chance to work on most any machine
27486 if it is compiled with the proper dialect. It is unlikely to work
27487 at all if compiled with the wrong dialect.
27489 Many users appreciate the GNU C compiler because it provides an
27490 environment that is uniform across machines. These users would be
27491 inconvenienced if the compiler treated plain bit-fields
27492 differently on certain machines.
27494 Occasionally users write programs intended only for a particular
27495 machine type. On these occasions, the users would benefit if the
27496 GNU C compiler were to support by default the same dialect as the
27497 other compilers on that machine. But such applications are rare.
27498 And users writing a program to run on more than one type of
27499 machine cannot possibly benefit from this kind of compatibility.
27501 This is why GCC does and will treat plain bit-fields in the same
27502 fashion on all types of machines (by default).
27504 There are some arguments for making bit-fields unsigned by default
27505 on all machines. If, for example, this becomes a universal de
27506 facto standard, it would make sense for GCC to go along with it.
27507 This is something to be considered in the future.
27509 (Of course, users strongly concerned about portability should
27510 indicate explicitly in each bit-field whether it is signed or not.
27511 In this way, they write programs which have the same meaning in
27514 * Undefining `__STDC__' when `-ansi' is not used.
27516 Currently, GCC defines `__STDC__' unconditionally. This provides
27517 good results in practice.
27519 Programmers normally use conditionals on `__STDC__' to ask whether
27520 it is safe to use certain features of ISO C, such as function
27521 prototypes or ISO token concatenation. Since plain `gcc' supports
27522 all the features of ISO C, the correct answer to these questions is
27525 Some users try to use `__STDC__' to check for the availability of
27526 certain library facilities. This is actually incorrect usage in
27527 an ISO C program, because the ISO C standard says that a conforming
27528 freestanding implementation should define `__STDC__' even though it
27529 does not have the library facilities. `gcc -ansi -pedantic' is a
27530 conforming freestanding implementation, and it is therefore
27531 required to define `__STDC__', even though it does not come with
27534 Sometimes people say that defining `__STDC__' in a compiler that
27535 does not completely conform to the ISO C standard somehow violates
27536 the standard. This is illogical. The standard is a standard for
27537 compilers that claim to support ISO C, such as `gcc -ansi'--not
27538 for other compilers such as plain `gcc'. Whatever the ISO C
27539 standard says is relevant to the design of plain `gcc' without
27540 `-ansi' only for pragmatic reasons, not as a requirement.
27542 GCC normally defines `__STDC__' to be 1, and in addition defines
27543 `__STRICT_ANSI__' if you specify the `-ansi' option, or a `-std'
27544 option for strict conformance to some version of ISO C. On some
27545 hosts, system include files use a different convention, where
27546 `__STDC__' is normally 0, but is 1 if the user specifies strict
27547 conformance to the C Standard. GCC follows the host convention
27548 when processing system include files, but when processing user
27549 files it follows the usual GNU C convention.
27551 * Undefining `__STDC__' in C++.
27553 Programs written to compile with C++-to-C translators get the
27554 value of `__STDC__' that goes with the C compiler that is
27555 subsequently used. These programs must test `__STDC__' to
27556 determine what kind of C preprocessor that compiler uses: whether
27557 they should concatenate tokens in the ISO C fashion or in the
27558 traditional fashion.
27560 These programs work properly with GNU C++ if `__STDC__' is defined.
27561 They would not work otherwise.
27563 In addition, many header files are written to provide prototypes
27564 in ISO C but not in traditional C. Many of these header files can
27565 work without change in C++ provided `__STDC__' is defined. If
27566 `__STDC__' is not defined, they will all fail, and will all need
27567 to be changed to test explicitly for C++ as well.
27569 * Deleting "empty" loops.
27571 Historically, GCC has not deleted "empty" loops under the
27572 assumption that the most likely reason you would put one in a
27573 program is to have a delay, so deleting them will not make real
27574 programs run any faster.
27576 However, the rationale here is that optimization of a nonempty loop
27577 cannot produce an empty one. This held for carefully written C
27578 compiled with less powerful optimizers but is not always the case
27579 for carefully written C++ or with more powerful optimizers. Thus
27580 GCC will remove operations from loops whenever it can determine
27581 those operations are not externally visible (apart from the time
27582 taken to execute them, of course). In case the loop can be proved
27583 to be finite, GCC will also remove the loop itself.
27585 Be aware of this when performing timing tests, for instance the
27586 following loop can be completely removed, provided
27587 `some_expression' can provably not change any global state.
27593 for (ix = 0; ix != 10000; ix++)
27594 sum += some_expression;
27597 Even though `sum' is accumulated in the loop, no use is made of
27598 that summation, so the accumulation can be removed.
27600 * Making side effects happen in the same order as in some other
27603 It is never safe to depend on the order of evaluation of side
27604 effects. For example, a function call like this may very well
27605 behave differently from one compiler to another:
27607 void func (int, int);
27612 There is no guarantee (in either the C or the C++ standard language
27613 definitions) that the increments will be evaluated in any
27614 particular order. Either increment might happen first. `func'
27615 might get the arguments `2, 3', or it might get `3, 2', or even
27618 * Making certain warnings into errors by default.
27620 Some ISO C testsuites report failure when the compiler does not
27621 produce an error message for a certain program.
27623 ISO C requires a "diagnostic" message for certain kinds of invalid
27624 programs, but a warning is defined by GCC to count as a
27625 diagnostic. If GCC produces a warning but not an error, that is
27626 correct ISO C support. If testsuites call this "failure", they
27627 should be run with the GCC option `-pedantic-errors', which will
27628 turn these warnings into errors.
27632 File: gcc.info, Node: Warnings and Errors, Prev: Non-bugs, Up: Trouble
27634 10.11 Warning Messages and Error Messages
27635 =========================================
27637 The GNU compiler can produce two kinds of diagnostics: errors and
27638 warnings. Each kind has a different purpose:
27640 "Errors" report problems that make it impossible to compile your
27641 program. GCC reports errors with the source file name and line
27642 number where the problem is apparent.
27644 "Warnings" report other unusual conditions in your code that _may_
27645 indicate a problem, although compilation can (and does) proceed.
27646 Warning messages also report the source file name and line number,
27647 but include the text `warning:' to distinguish them from error
27650 Warnings may indicate danger points where you should check to make sure
27651 that your program really does what you intend; or the use of obsolete
27652 features; or the use of nonstandard features of GNU C or C++. Many
27653 warnings are issued only if you ask for them, with one of the `-W'
27654 options (for instance, `-Wall' requests a variety of useful warnings).
27656 GCC always tries to compile your program if possible; it never
27657 gratuitously rejects a program whose meaning is clear merely because
27658 (for instance) it fails to conform to a standard. In some cases,
27659 however, the C and C++ standards specify that certain extensions are
27660 forbidden, and a diagnostic _must_ be issued by a conforming compiler.
27661 The `-pedantic' option tells GCC to issue warnings in such cases;
27662 `-pedantic-errors' says to make them errors instead. This does not
27663 mean that _all_ non-ISO constructs get warnings or errors.
27665 *Note Options to Request or Suppress Warnings: Warning Options, for
27666 more detail on these and related command-line options.
27669 File: gcc.info, Node: Bugs, Next: Service, Prev: Trouble, Up: Top
27674 Your bug reports play an essential role in making GCC reliable.
27676 When you encounter a problem, the first thing to do is to see if it is
27677 already known. *Note Trouble::. If it isn't known, then you should
27678 report the problem.
27682 * Criteria: Bug Criteria. Have you really found a bug?
27683 * Reporting: Bug Reporting. How to report a bug effectively.
27684 * Known: Trouble. Known problems.
27685 * Help: Service. Where to ask for help.
27688 File: gcc.info, Node: Bug Criteria, Next: Bug Reporting, Up: Bugs
27690 11.1 Have You Found a Bug?
27691 ==========================
27693 If you are not sure whether you have found a bug, here are some
27696 * If the compiler gets a fatal signal, for any input whatever, that
27697 is a compiler bug. Reliable compilers never crash.
27699 * If the compiler produces invalid assembly code, for any input
27700 whatever (except an `asm' statement), that is a compiler bug,
27701 unless the compiler reports errors (not just warnings) which would
27702 ordinarily prevent the assembler from being run.
27704 * If the compiler produces valid assembly code that does not
27705 correctly execute the input source code, that is a compiler bug.
27707 However, you must double-check to make sure, because you may have a
27708 program whose behavior is undefined, which happened by chance to
27709 give the desired results with another C or C++ compiler.
27711 For example, in many nonoptimizing compilers, you can write `x;'
27712 at the end of a function instead of `return x;', with the same
27713 results. But the value of the function is undefined if `return'
27714 is omitted; it is not a bug when GCC produces different results.
27716 Problems often result from expressions with two increment
27717 operators, as in `f (*p++, *p++)'. Your previous compiler might
27718 have interpreted that expression the way you intended; GCC might
27719 interpret it another way. Neither compiler is wrong. The bug is
27722 After you have localized the error to a single source line, it
27723 should be easy to check for these things. If your program is
27724 correct and well defined, you have found a compiler bug.
27726 * If the compiler produces an error message for valid input, that is
27729 * If the compiler does not produce an error message for invalid
27730 input, that is a compiler bug. However, you should note that your
27731 idea of "invalid input" might be someone else's idea of "an
27732 extension" or "support for traditional practice".
27734 * If you are an experienced user of one of the languages GCC
27735 supports, your suggestions for improvement of GCC are welcome in
27739 File: gcc.info, Node: Bug Reporting, Prev: Bug Criteria, Up: Bugs
27741 11.2 How and where to Report Bugs
27742 =================================
27744 Bugs should be reported to the GCC bug database. Please refer to
27745 `http://gcc.gnu.org/bugs.html' for up-to-date instructions how to
27746 submit bug reports. Copies of this file in HTML (`bugs.html') and
27747 plain text (`BUGS') are also part of GCC releases.
27750 File: gcc.info, Node: Service, Next: Contributing, Prev: Bugs, Up: Top
27752 12 How To Get Help with GCC
27753 ***************************
27755 If you need help installing, using or changing GCC, there are two ways
27758 * Send a message to a suitable network mailing list. First try
27759 <gcc-help@gcc.gnu.org> (for help installing or using GCC), and if
27760 that brings no response, try <gcc@gcc.gnu.org>. For help changing
27761 GCC, ask <gcc@gcc.gnu.org>. If you think you have found a bug in
27762 GCC, please report it following the instructions at *note Bug
27765 * Look in the service directory for someone who might help you for a
27766 fee. The service directory is found at
27767 `http://www.gnu.org/prep/service.html'.
27769 For further information, see `http://gcc.gnu.org/faq.html#support'.
27772 File: gcc.info, Node: Contributing, Next: Funding, Prev: Service, Up: Top
27774 13 Contributing to GCC Development
27775 **********************************
27777 If you would like to help pretest GCC releases to assure they work well,
27778 current development sources are available by SVN (see
27779 `http://gcc.gnu.org/svn.html'). Source and binary snapshots are also
27780 available for FTP; see `http://gcc.gnu.org/snapshots.html'.
27782 If you would like to work on improvements to GCC, please read the
27783 advice at these URLs:
27785 `http://gcc.gnu.org/contribute.html'
27786 `http://gcc.gnu.org/contributewhy.html'
27788 for information on how to make useful contributions and avoid
27789 duplication of effort. Suggested projects are listed at
27790 `http://gcc.gnu.org/projects/'.
27793 File: gcc.info, Node: Funding, Next: GNU Project, Prev: Contributing, Up: Top
27795 Funding Free Software
27796 *********************
27798 If you want to have more free software a few years from now, it makes
27799 sense for you to help encourage people to contribute funds for its
27800 development. The most effective approach known is to encourage
27801 commercial redistributors to donate.
27803 Users of free software systems can boost the pace of development by
27804 encouraging for-a-fee distributors to donate part of their selling price
27805 to free software developers--the Free Software Foundation, and others.
27807 The way to convince distributors to do this is to demand it and expect
27808 it from them. So when you compare distributors, judge them partly by
27809 how much they give to free software development. Show distributors
27810 they must compete to be the one who gives the most.
27812 To make this approach work, you must insist on numbers that you can
27813 compare, such as, "We will donate ten dollars to the Frobnitz project
27814 for each disk sold." Don't be satisfied with a vague promise, such as
27815 "A portion of the profits are donated," since it doesn't give a basis
27818 Even a precise fraction "of the profits from this disk" is not very
27819 meaningful, since creative accounting and unrelated business decisions
27820 can greatly alter what fraction of the sales price counts as profit.
27821 If the price you pay is $50, ten percent of the profit is probably less
27822 than a dollar; it might be a few cents, or nothing at all.
27824 Some redistributors do development work themselves. This is useful
27825 too; but to keep everyone honest, you need to inquire how much they do,
27826 and what kind. Some kinds of development make much more long-term
27827 difference than others. For example, maintaining a separate version of
27828 a program contributes very little; maintaining the standard version of a
27829 program for the whole community contributes much. Easy new ports
27830 contribute little, since someone else would surely do them; difficult
27831 ports such as adding a new CPU to the GNU Compiler Collection
27832 contribute more; major new features or packages contribute the most.
27834 By establishing the idea that supporting further development is "the
27835 proper thing to do" when distributing free software for a fee, we can
27836 assure a steady flow of resources into making more free software.
27838 Copyright (C) 1994 Free Software Foundation, Inc.
27839 Verbatim copying and redistribution of this section is permitted
27840 without royalty; alteration is not permitted.
27843 File: gcc.info, Node: GNU Project, Next: Copying, Prev: Funding, Up: Top
27845 The GNU Project and GNU/Linux
27846 *****************************
27848 The GNU Project was launched in 1984 to develop a complete Unix-like
27849 operating system which is free software: the GNU system. (GNU is a
27850 recursive acronym for "GNU's Not Unix"; it is pronounced "guh-NEW".)
27851 Variants of the GNU operating system, which use the kernel Linux, are
27852 now widely used; though these systems are often referred to as "Linux",
27853 they are more accurately called GNU/Linux systems.
27855 For more information, see:
27856 `http://www.gnu.org/'
27857 `http://www.gnu.org/gnu/linux-and-gnu.html'
27860 File: gcc.info, Node: Copying, Next: GNU Free Documentation License, Prev: GNU Project, Up: Top
27862 GNU GENERAL PUBLIC LICENSE
27863 **************************
27865 Version 2, June 1991
27867 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
27868 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
27870 Everyone is permitted to copy and distribute verbatim copies
27871 of this license document, but changing it is not allowed.
27876 The licenses for most software are designed to take away your freedom
27877 to share and change it. By contrast, the GNU General Public License is
27878 intended to guarantee your freedom to share and change free
27879 software--to make sure the software is free for all its users. This
27880 General Public License applies to most of the Free Software
27881 Foundation's software and to any other program whose authors commit to
27882 using it. (Some other Free Software Foundation software is covered by
27883 the GNU Library General Public License instead.) You can apply it to
27884 your programs, too.
27886 When we speak of free software, we are referring to freedom, not
27887 price. Our General Public Licenses are designed to make sure that you
27888 have the freedom to distribute copies of free software (and charge for
27889 this service if you wish), that you receive source code or can get it
27890 if you want it, that you can change the software or use pieces of it in
27891 new free programs; and that you know you can do these things.
27893 To protect your rights, we need to make restrictions that forbid
27894 anyone to deny you these rights or to ask you to surrender the rights.
27895 These restrictions translate to certain responsibilities for you if you
27896 distribute copies of the software, or if you modify it.
27898 For example, if you distribute copies of such a program, whether
27899 gratis or for a fee, you must give the recipients all the rights that
27900 you have. You must make sure that they, too, receive or can get the
27901 source code. And you must show them these terms so they know their
27904 We protect your rights with two steps: (1) copyright the software, and
27905 (2) offer you this license which gives you legal permission to copy,
27906 distribute and/or modify the software.
27908 Also, for each author's protection and ours, we want to make certain
27909 that everyone understands that there is no warranty for this free
27910 software. If the software is modified by someone else and passed on, we
27911 want its recipients to know that what they have is not the original, so
27912 that any problems introduced by others will not reflect on the original
27913 authors' reputations.
27915 Finally, any free program is threatened constantly by software
27916 patents. We wish to avoid the danger that redistributors of a free
27917 program will individually obtain patent licenses, in effect making the
27918 program proprietary. To prevent this, we have made it clear that any
27919 patent must be licensed for everyone's free use or not licensed at all.
27921 The precise terms and conditions for copying, distribution and
27922 modification follow.
27924 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
27925 0. This License applies to any program or other work which contains a
27926 notice placed by the copyright holder saying it may be distributed
27927 under the terms of this General Public License. The "Program",
27928 below, refers to any such program or work, and a "work based on
27929 the Program" means either the Program or any derivative work under
27930 copyright law: that is to say, a work containing the Program or a
27931 portion of it, either verbatim or with modifications and/or
27932 translated into another language. (Hereinafter, translation is
27933 included without limitation in the term "modification".) Each
27934 licensee is addressed as "you".
27936 Activities other than copying, distribution and modification are
27937 not covered by this License; they are outside its scope. The act
27938 of running the Program is not restricted, and the output from the
27939 Program is covered only if its contents constitute a work based on
27940 the Program (independent of having been made by running the
27941 Program). Whether that is true depends on what the Program does.
27943 1. You may copy and distribute verbatim copies of the Program's
27944 source code as you receive it, in any medium, provided that you
27945 conspicuously and appropriately publish on each copy an appropriate
27946 copyright notice and disclaimer of warranty; keep intact all the
27947 notices that refer to this License and to the absence of any
27948 warranty; and give any other recipients of the Program a copy of
27949 this License along with the Program.
27951 You may charge a fee for the physical act of transferring a copy,
27952 and you may at your option offer warranty protection in exchange
27955 2. You may modify your copy or copies of the Program or any portion
27956 of it, thus forming a work based on the Program, and copy and
27957 distribute such modifications or work under the terms of Section 1
27958 above, provided that you also meet all of these conditions:
27960 a. You must cause the modified files to carry prominent notices
27961 stating that you changed the files and the date of any change.
27963 b. You must cause any work that you distribute or publish, that
27964 in whole or in part contains or is derived from the Program
27965 or any part thereof, to be licensed as a whole at no charge
27966 to all third parties under the terms of this License.
27968 c. If the modified program normally reads commands interactively
27969 when run, you must cause it, when started running for such
27970 interactive use in the most ordinary way, to print or display
27971 an announcement including an appropriate copyright notice and
27972 a notice that there is no warranty (or else, saying that you
27973 provide a warranty) and that users may redistribute the
27974 program under these conditions, and telling the user how to
27975 view a copy of this License. (Exception: if the Program
27976 itself is interactive but does not normally print such an
27977 announcement, your work based on the Program is not required
27978 to print an announcement.)
27980 These requirements apply to the modified work as a whole. If
27981 identifiable sections of that work are not derived from the
27982 Program, and can be reasonably considered independent and separate
27983 works in themselves, then this License, and its terms, do not
27984 apply to those sections when you distribute them as separate
27985 works. But when you distribute the same sections as part of a
27986 whole which is a work based on the Program, the distribution of
27987 the whole must be on the terms of this License, whose permissions
27988 for other licensees extend to the entire whole, and thus to each
27989 and every part regardless of who wrote it.
27991 Thus, it is not the intent of this section to claim rights or
27992 contest your rights to work written entirely by you; rather, the
27993 intent is to exercise the right to control the distribution of
27994 derivative or collective works based on the Program.
27996 In addition, mere aggregation of another work not based on the
27997 Program with the Program (or with a work based on the Program) on
27998 a volume of a storage or distribution medium does not bring the
27999 other work under the scope of this License.
28001 3. You may copy and distribute the Program (or a work based on it,
28002 under Section 2) in object code or executable form under the terms
28003 of Sections 1 and 2 above provided that you also do one of the
28006 a. Accompany it with the complete corresponding machine-readable
28007 source code, which must be distributed under the terms of
28008 Sections 1 and 2 above on a medium customarily used for
28009 software interchange; or,
28011 b. Accompany it with a written offer, valid for at least three
28012 years, to give any third party, for a charge no more than your
28013 cost of physically performing source distribution, a complete
28014 machine-readable copy of the corresponding source code, to be
28015 distributed under the terms of Sections 1 and 2 above on a
28016 medium customarily used for software interchange; or,
28018 c. Accompany it with the information you received as to the offer
28019 to distribute corresponding source code. (This alternative is
28020 allowed only for noncommercial distribution and only if you
28021 received the program in object code or executable form with
28022 such an offer, in accord with Subsection b above.)
28024 The source code for a work means the preferred form of the work for
28025 making modifications to it. For an executable work, complete
28026 source code means all the source code for all modules it contains,
28027 plus any associated interface definition files, plus the scripts
28028 used to control compilation and installation of the executable.
28029 However, as a special exception, the source code distributed need
28030 not include anything that is normally distributed (in either
28031 source or binary form) with the major components (compiler,
28032 kernel, and so on) of the operating system on which the executable
28033 runs, unless that component itself accompanies the executable.
28035 If distribution of executable or object code is made by offering
28036 access to copy from a designated place, then offering equivalent
28037 access to copy the source code from the same place counts as
28038 distribution of the source code, even though third parties are not
28039 compelled to copy the source along with the object code.
28041 4. You may not copy, modify, sublicense, or distribute the Program
28042 except as expressly provided under this License. Any attempt
28043 otherwise to copy, modify, sublicense or distribute the Program is
28044 void, and will automatically terminate your rights under this
28045 License. However, parties who have received copies, or rights,
28046 from you under this License will not have their licenses
28047 terminated so long as such parties remain in full compliance.
28049 5. You are not required to accept this License, since you have not
28050 signed it. However, nothing else grants you permission to modify
28051 or distribute the Program or its derivative works. These actions
28052 are prohibited by law if you do not accept this License.
28053 Therefore, by modifying or distributing the Program (or any work
28054 based on the Program), you indicate your acceptance of this
28055 License to do so, and all its terms and conditions for copying,
28056 distributing or modifying the Program or works based on it.
28058 6. Each time you redistribute the Program (or any work based on the
28059 Program), the recipient automatically receives a license from the
28060 original licensor to copy, distribute or modify the Program
28061 subject to these terms and conditions. You may not impose any
28062 further restrictions on the recipients' exercise of the rights
28063 granted herein. You are not responsible for enforcing compliance
28064 by third parties to this License.
28066 7. If, as a consequence of a court judgment or allegation of patent
28067 infringement or for any other reason (not limited to patent
28068 issues), conditions are imposed on you (whether by court order,
28069 agreement or otherwise) that contradict the conditions of this
28070 License, they do not excuse you from the conditions of this
28071 License. If you cannot distribute so as to satisfy simultaneously
28072 your obligations under this License and any other pertinent
28073 obligations, then as a consequence you may not distribute the
28074 Program at all. For example, if a patent license would not permit
28075 royalty-free redistribution of the Program by all those who
28076 receive copies directly or indirectly through you, then the only
28077 way you could satisfy both it and this License would be to refrain
28078 entirely from distribution of the Program.
28080 If any portion of this section is held invalid or unenforceable
28081 under any particular circumstance, the balance of the section is
28082 intended to apply and the section as a whole is intended to apply
28083 in other circumstances.
28085 It is not the purpose of this section to induce you to infringe any
28086 patents or other property right claims or to contest validity of
28087 any such claims; this section has the sole purpose of protecting
28088 the integrity of the free software distribution system, which is
28089 implemented by public license practices. Many people have made
28090 generous contributions to the wide range of software distributed
28091 through that system in reliance on consistent application of that
28092 system; it is up to the author/donor to decide if he or she is
28093 willing to distribute software through any other system and a
28094 licensee cannot impose that choice.
28096 This section is intended to make thoroughly clear what is believed
28097 to be a consequence of the rest of this License.
28099 8. If the distribution and/or use of the Program is restricted in
28100 certain countries either by patents or by copyrighted interfaces,
28101 the original copyright holder who places the Program under this
28102 License may add an explicit geographical distribution limitation
28103 excluding those countries, so that distribution is permitted only
28104 in or among countries not thus excluded. In such case, this
28105 License incorporates the limitation as if written in the body of
28108 9. The Free Software Foundation may publish revised and/or new
28109 versions of the General Public License from time to time. Such
28110 new versions will be similar in spirit to the present version, but
28111 may differ in detail to address new problems or concerns.
28113 Each version is given a distinguishing version number. If the
28114 Program specifies a version number of this License which applies
28115 to it and "any later version", you have the option of following
28116 the terms and conditions either of that version or of any later
28117 version published by the Free Software Foundation. If the Program
28118 does not specify a version number of this License, you may choose
28119 any version ever published by the Free Software Foundation.
28121 10. If you wish to incorporate parts of the Program into other free
28122 programs whose distribution conditions are different, write to the
28123 author to ask for permission. For software which is copyrighted
28124 by the Free Software Foundation, write to the Free Software
28125 Foundation; we sometimes make exceptions for this. Our decision
28126 will be guided by the two goals of preserving the free status of
28127 all derivatives of our free software and of promoting the sharing
28128 and reuse of software generally.
28131 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
28132 WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
28133 LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
28134 HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
28135 WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
28136 NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
28137 FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
28138 QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
28139 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
28140 SERVICING, REPAIR OR CORRECTION.
28142 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
28143 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
28144 MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
28145 LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
28146 INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
28147 INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
28148 DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
28149 OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
28150 OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
28151 ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
28153 END OF TERMS AND CONDITIONS
28154 Appendix: How to Apply These Terms to Your New Programs
28155 =======================================================
28157 If you develop a new program, and you want it to be of the greatest
28158 possible use to the public, the best way to achieve this is to make it
28159 free software which everyone can redistribute and change under these
28162 To do so, attach the following notices to the program. It is safest
28163 to attach them to the start of each source file to most effectively
28164 convey the exclusion of warranty; and each file should have at least
28165 the "copyright" line and a pointer to where the full notice is found.
28167 ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
28168 Copyright (C) YEAR NAME OF AUTHOR
28170 This program is free software; you can redistribute it and/or modify
28171 it under the terms of the GNU General Public License as published by
28172 the Free Software Foundation; either version 2 of the License, or
28173 (at your option) any later version.
28175 This program is distributed in the hope that it will be useful,
28176 but WITHOUT ANY WARRANTY; without even the implied warranty of
28177 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28178 GNU General Public License for more details.
28180 You should have received a copy of the GNU General Public License
28181 along with this program; if not, write to the Free Software
28182 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
28184 Also add information on how to contact you by electronic and paper
28187 If the program is interactive, make it output a short notice like this
28188 when it starts in an interactive mode:
28190 Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHOR
28191 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
28193 This is free software, and you are welcome to redistribute it
28194 under certain conditions; type `show c' for details.
28196 The hypothetical commands `show w' and `show c' should show the
28197 appropriate parts of the General Public License. Of course, the
28198 commands you use may be called something other than `show w' and `show
28199 c'; they could even be mouse-clicks or menu items--whatever suits your
28202 You should also get your employer (if you work as a programmer) or your
28203 school, if any, to sign a "copyright disclaimer" for the program, if
28204 necessary. Here is a sample; alter the names:
28206 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
28207 `Gnomovision' (which makes passes at compilers) written by James Hacker.
28209 SIGNATURE OF TY COON, 1 April 1989
28210 Ty Coon, President of Vice
28212 This General Public License does not permit incorporating your program
28213 into proprietary programs. If your program is a subroutine library,
28214 you may consider it more useful to permit linking proprietary
28215 applications with the library. If this is what you want to do, use the
28216 GNU Library General Public License instead of this License.
28219 File: gcc.info, Node: GNU Free Documentation License, Next: Contributors, Prev: Copying, Up: Top
28221 GNU Free Documentation License
28222 ******************************
28224 Version 1.2, November 2002
28226 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
28227 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
28229 Everyone is permitted to copy and distribute verbatim copies
28230 of this license document, but changing it is not allowed.
28234 The purpose of this License is to make a manual, textbook, or other
28235 functional and useful document "free" in the sense of freedom: to
28236 assure everyone the effective freedom to copy and redistribute it,
28237 with or without modifying it, either commercially or
28238 noncommercially. Secondarily, this License preserves for the
28239 author and publisher a way to get credit for their work, while not
28240 being considered responsible for modifications made by others.
28242 This License is a kind of "copyleft", which means that derivative
28243 works of the document must themselves be free in the same sense.
28244 It complements the GNU General Public License, which is a copyleft
28245 license designed for free software.
28247 We have designed this License in order to use it for manuals for
28248 free software, because free software needs free documentation: a
28249 free program should come with manuals providing the same freedoms
28250 that the software does. But this License is not limited to
28251 software manuals; it can be used for any textual work, regardless
28252 of subject matter or whether it is published as a printed book.
28253 We recommend this License principally for works whose purpose is
28254 instruction or reference.
28256 1. APPLICABILITY AND DEFINITIONS
28258 This License applies to any manual or other work, in any medium,
28259 that contains a notice placed by the copyright holder saying it
28260 can be distributed under the terms of this License. Such a notice
28261 grants a world-wide, royalty-free license, unlimited in duration,
28262 to use that work under the conditions stated herein. The
28263 "Document", below, refers to any such manual or work. Any member
28264 of the public is a licensee, and is addressed as "you". You
28265 accept the license if you copy, modify or distribute the work in a
28266 way requiring permission under copyright law.
28268 A "Modified Version" of the Document means any work containing the
28269 Document or a portion of it, either copied verbatim, or with
28270 modifications and/or translated into another language.
28272 A "Secondary Section" is a named appendix or a front-matter section
28273 of the Document that deals exclusively with the relationship of the
28274 publishers or authors of the Document to the Document's overall
28275 subject (or to related matters) and contains nothing that could
28276 fall directly within that overall subject. (Thus, if the Document
28277 is in part a textbook of mathematics, a Secondary Section may not
28278 explain any mathematics.) The relationship could be a matter of
28279 historical connection with the subject or with related matters, or
28280 of legal, commercial, philosophical, ethical or political position
28283 The "Invariant Sections" are certain Secondary Sections whose
28284 titles are designated, as being those of Invariant Sections, in
28285 the notice that says that the Document is released under this
28286 License. If a section does not fit the above definition of
28287 Secondary then it is not allowed to be designated as Invariant.
28288 The Document may contain zero Invariant Sections. If the Document
28289 does not identify any Invariant Sections then there are none.
28291 The "Cover Texts" are certain short passages of text that are
28292 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
28293 that says that the Document is released under this License. A
28294 Front-Cover Text may be at most 5 words, and a Back-Cover Text may
28295 be at most 25 words.
28297 A "Transparent" copy of the Document means a machine-readable copy,
28298 represented in a format whose specification is available to the
28299 general public, that is suitable for revising the document
28300 straightforwardly with generic text editors or (for images
28301 composed of pixels) generic paint programs or (for drawings) some
28302 widely available drawing editor, and that is suitable for input to
28303 text formatters or for automatic translation to a variety of
28304 formats suitable for input to text formatters. A copy made in an
28305 otherwise Transparent file format whose markup, or absence of
28306 markup, has been arranged to thwart or discourage subsequent
28307 modification by readers is not Transparent. An image format is
28308 not Transparent if used for any substantial amount of text. A
28309 copy that is not "Transparent" is called "Opaque".
28311 Examples of suitable formats for Transparent copies include plain
28312 ASCII without markup, Texinfo input format, LaTeX input format,
28313 SGML or XML using a publicly available DTD, and
28314 standard-conforming simple HTML, PostScript or PDF designed for
28315 human modification. Examples of transparent image formats include
28316 PNG, XCF and JPG. Opaque formats include proprietary formats that
28317 can be read and edited only by proprietary word processors, SGML or
28318 XML for which the DTD and/or processing tools are not generally
28319 available, and the machine-generated HTML, PostScript or PDF
28320 produced by some word processors for output purposes only.
28322 The "Title Page" means, for a printed book, the title page itself,
28323 plus such following pages as are needed to hold, legibly, the
28324 material this License requires to appear in the title page. For
28325 works in formats which do not have any title page as such, "Title
28326 Page" means the text near the most prominent appearance of the
28327 work's title, preceding the beginning of the body of the text.
28329 A section "Entitled XYZ" means a named subunit of the Document
28330 whose title either is precisely XYZ or contains XYZ in parentheses
28331 following text that translates XYZ in another language. (Here XYZ
28332 stands for a specific section name mentioned below, such as
28333 "Acknowledgements", "Dedications", "Endorsements", or "History".)
28334 To "Preserve the Title" of such a section when you modify the
28335 Document means that it remains a section "Entitled XYZ" according
28336 to this definition.
28338 The Document may include Warranty Disclaimers next to the notice
28339 which states that this License applies to the Document. These
28340 Warranty Disclaimers are considered to be included by reference in
28341 this License, but only as regards disclaiming warranties: any other
28342 implication that these Warranty Disclaimers may have is void and
28343 has no effect on the meaning of this License.
28345 2. VERBATIM COPYING
28347 You may copy and distribute the Document in any medium, either
28348 commercially or noncommercially, provided that this License, the
28349 copyright notices, and the license notice saying this License
28350 applies to the Document are reproduced in all copies, and that you
28351 add no other conditions whatsoever to those of this License. You
28352 may not use technical measures to obstruct or control the reading
28353 or further copying of the copies you make or distribute. However,
28354 you may accept compensation in exchange for copies. If you
28355 distribute a large enough number of copies you must also follow
28356 the conditions in section 3.
28358 You may also lend copies, under the same conditions stated above,
28359 and you may publicly display copies.
28361 3. COPYING IN QUANTITY
28363 If you publish printed copies (or copies in media that commonly
28364 have printed covers) of the Document, numbering more than 100, and
28365 the Document's license notice requires Cover Texts, you must
28366 enclose the copies in covers that carry, clearly and legibly, all
28367 these Cover Texts: Front-Cover Texts on the front cover, and
28368 Back-Cover Texts on the back cover. Both covers must also clearly
28369 and legibly identify you as the publisher of these copies. The
28370 front cover must present the full title with all words of the
28371 title equally prominent and visible. You may add other material
28372 on the covers in addition. Copying with changes limited to the
28373 covers, as long as they preserve the title of the Document and
28374 satisfy these conditions, can be treated as verbatim copying in
28377 If the required texts for either cover are too voluminous to fit
28378 legibly, you should put the first ones listed (as many as fit
28379 reasonably) on the actual cover, and continue the rest onto
28382 If you publish or distribute Opaque copies of the Document
28383 numbering more than 100, you must either include a
28384 machine-readable Transparent copy along with each Opaque copy, or
28385 state in or with each Opaque copy a computer-network location from
28386 which the general network-using public has access to download
28387 using public-standard network protocols a complete Transparent
28388 copy of the Document, free of added material. If you use the
28389 latter option, you must take reasonably prudent steps, when you
28390 begin distribution of Opaque copies in quantity, to ensure that
28391 this Transparent copy will remain thus accessible at the stated
28392 location until at least one year after the last time you
28393 distribute an Opaque copy (directly or through your agents or
28394 retailers) of that edition to the public.
28396 It is requested, but not required, that you contact the authors of
28397 the Document well before redistributing any large number of
28398 copies, to give them a chance to provide you with an updated
28399 version of the Document.
28403 You may copy and distribute a Modified Version of the Document
28404 under the conditions of sections 2 and 3 above, provided that you
28405 release the Modified Version under precisely this License, with
28406 the Modified Version filling the role of the Document, thus
28407 licensing distribution and modification of the Modified Version to
28408 whoever possesses a copy of it. In addition, you must do these
28409 things in the Modified Version:
28411 A. Use in the Title Page (and on the covers, if any) a title
28412 distinct from that of the Document, and from those of
28413 previous versions (which should, if there were any, be listed
28414 in the History section of the Document). You may use the
28415 same title as a previous version if the original publisher of
28416 that version gives permission.
28418 B. List on the Title Page, as authors, one or more persons or
28419 entities responsible for authorship of the modifications in
28420 the Modified Version, together with at least five of the
28421 principal authors of the Document (all of its principal
28422 authors, if it has fewer than five), unless they release you
28423 from this requirement.
28425 C. State on the Title page the name of the publisher of the
28426 Modified Version, as the publisher.
28428 D. Preserve all the copyright notices of the Document.
28430 E. Add an appropriate copyright notice for your modifications
28431 adjacent to the other copyright notices.
28433 F. Include, immediately after the copyright notices, a license
28434 notice giving the public permission to use the Modified
28435 Version under the terms of this License, in the form shown in
28436 the Addendum below.
28438 G. Preserve in that license notice the full lists of Invariant
28439 Sections and required Cover Texts given in the Document's
28442 H. Include an unaltered copy of this License.
28444 I. Preserve the section Entitled "History", Preserve its Title,
28445 and add to it an item stating at least the title, year, new
28446 authors, and publisher of the Modified Version as given on
28447 the Title Page. If there is no section Entitled "History" in
28448 the Document, create one stating the title, year, authors,
28449 and publisher of the Document as given on its Title Page,
28450 then add an item describing the Modified Version as stated in
28451 the previous sentence.
28453 J. Preserve the network location, if any, given in the Document
28454 for public access to a Transparent copy of the Document, and
28455 likewise the network locations given in the Document for
28456 previous versions it was based on. These may be placed in
28457 the "History" section. You may omit a network location for a
28458 work that was published at least four years before the
28459 Document itself, or if the original publisher of the version
28460 it refers to gives permission.
28462 K. For any section Entitled "Acknowledgements" or "Dedications",
28463 Preserve the Title of the section, and preserve in the
28464 section all the substance and tone of each of the contributor
28465 acknowledgements and/or dedications given therein.
28467 L. Preserve all the Invariant Sections of the Document,
28468 unaltered in their text and in their titles. Section numbers
28469 or the equivalent are not considered part of the section
28472 M. Delete any section Entitled "Endorsements". Such a section
28473 may not be included in the Modified Version.
28475 N. Do not retitle any existing section to be Entitled
28476 "Endorsements" or to conflict in title with any Invariant
28479 O. Preserve any Warranty Disclaimers.
28481 If the Modified Version includes new front-matter sections or
28482 appendices that qualify as Secondary Sections and contain no
28483 material copied from the Document, you may at your option
28484 designate some or all of these sections as invariant. To do this,
28485 add their titles to the list of Invariant Sections in the Modified
28486 Version's license notice. These titles must be distinct from any
28487 other section titles.
28489 You may add a section Entitled "Endorsements", provided it contains
28490 nothing but endorsements of your Modified Version by various
28491 parties--for example, statements of peer review or that the text
28492 has been approved by an organization as the authoritative
28493 definition of a standard.
28495 You may add a passage of up to five words as a Front-Cover Text,
28496 and a passage of up to 25 words as a Back-Cover Text, to the end
28497 of the list of Cover Texts in the Modified Version. Only one
28498 passage of Front-Cover Text and one of Back-Cover Text may be
28499 added by (or through arrangements made by) any one entity. If the
28500 Document already includes a cover text for the same cover,
28501 previously added by you or by arrangement made by the same entity
28502 you are acting on behalf of, you may not add another; but you may
28503 replace the old one, on explicit permission from the previous
28504 publisher that added the old one.
28506 The author(s) and publisher(s) of the Document do not by this
28507 License give permission to use their names for publicity for or to
28508 assert or imply endorsement of any Modified Version.
28510 5. COMBINING DOCUMENTS
28512 You may combine the Document with other documents released under
28513 this License, under the terms defined in section 4 above for
28514 modified versions, provided that you include in the combination
28515 all of the Invariant Sections of all of the original documents,
28516 unmodified, and list them all as Invariant Sections of your
28517 combined work in its license notice, and that you preserve all
28518 their Warranty Disclaimers.
28520 The combined work need only contain one copy of this License, and
28521 multiple identical Invariant Sections may be replaced with a single
28522 copy. If there are multiple Invariant Sections with the same name
28523 but different contents, make the title of each such section unique
28524 by adding at the end of it, in parentheses, the name of the
28525 original author or publisher of that section if known, or else a
28526 unique number. Make the same adjustment to the section titles in
28527 the list of Invariant Sections in the license notice of the
28530 In the combination, you must combine any sections Entitled
28531 "History" in the various original documents, forming one section
28532 Entitled "History"; likewise combine any sections Entitled
28533 "Acknowledgements", and any sections Entitled "Dedications". You
28534 must delete all sections Entitled "Endorsements."
28536 6. COLLECTIONS OF DOCUMENTS
28538 You may make a collection consisting of the Document and other
28539 documents released under this License, and replace the individual
28540 copies of this License in the various documents with a single copy
28541 that is included in the collection, provided that you follow the
28542 rules of this License for verbatim copying of each of the
28543 documents in all other respects.
28545 You may extract a single document from such a collection, and
28546 distribute it individually under this License, provided you insert
28547 a copy of this License into the extracted document, and follow
28548 this License in all other respects regarding verbatim copying of
28551 7. AGGREGATION WITH INDEPENDENT WORKS
28553 A compilation of the Document or its derivatives with other
28554 separate and independent documents or works, in or on a volume of
28555 a storage or distribution medium, is called an "aggregate" if the
28556 copyright resulting from the compilation is not used to limit the
28557 legal rights of the compilation's users beyond what the individual
28558 works permit. When the Document is included in an aggregate, this
28559 License does not apply to the other works in the aggregate which
28560 are not themselves derivative works of the Document.
28562 If the Cover Text requirement of section 3 is applicable to these
28563 copies of the Document, then if the Document is less than one half
28564 of the entire aggregate, the Document's Cover Texts may be placed
28565 on covers that bracket the Document within the aggregate, or the
28566 electronic equivalent of covers if the Document is in electronic
28567 form. Otherwise they must appear on printed covers that bracket
28568 the whole aggregate.
28572 Translation is considered a kind of modification, so you may
28573 distribute translations of the Document under the terms of section
28574 4. Replacing Invariant Sections with translations requires special
28575 permission from their copyright holders, but you may include
28576 translations of some or all Invariant Sections in addition to the
28577 original versions of these Invariant Sections. You may include a
28578 translation of this License, and all the license notices in the
28579 Document, and any Warranty Disclaimers, provided that you also
28580 include the original English version of this License and the
28581 original versions of those notices and disclaimers. In case of a
28582 disagreement between the translation and the original version of
28583 this License or a notice or disclaimer, the original version will
28586 If a section in the Document is Entitled "Acknowledgements",
28587 "Dedications", or "History", the requirement (section 4) to
28588 Preserve its Title (section 1) will typically require changing the
28593 You may not copy, modify, sublicense, or distribute the Document
28594 except as expressly provided for under this License. Any other
28595 attempt to copy, modify, sublicense or distribute the Document is
28596 void, and will automatically terminate your rights under this
28597 License. However, parties who have received copies, or rights,
28598 from you under this License will not have their licenses
28599 terminated so long as such parties remain in full compliance.
28601 10. FUTURE REVISIONS OF THIS LICENSE
28603 The Free Software Foundation may publish new, revised versions of
28604 the GNU Free Documentation License from time to time. Such new
28605 versions will be similar in spirit to the present version, but may
28606 differ in detail to address new problems or concerns. See
28607 `http://www.gnu.org/copyleft/'.
28609 Each version of the License is given a distinguishing version
28610 number. If the Document specifies that a particular numbered
28611 version of this License "or any later version" applies to it, you
28612 have the option of following the terms and conditions either of
28613 that specified version or of any later version that has been
28614 published (not as a draft) by the Free Software Foundation. If
28615 the Document does not specify a version number of this License,
28616 you may choose any version ever published (not as a draft) by the
28617 Free Software Foundation.
28619 ADDENDUM: How to use this License for your documents
28620 ====================================================
28622 To use this License in a document you have written, include a copy of
28623 the License in the document and put the following copyright and license
28624 notices just after the title page:
28626 Copyright (C) YEAR YOUR NAME.
28627 Permission is granted to copy, distribute and/or modify this document
28628 under the terms of the GNU Free Documentation License, Version 1.2
28629 or any later version published by the Free Software Foundation;
28630 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
28631 Texts. A copy of the license is included in the section entitled ``GNU
28632 Free Documentation License''.
28634 If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
28635 replace the "with...Texts." line with this:
28637 with the Invariant Sections being LIST THEIR TITLES, with
28638 the Front-Cover Texts being LIST, and with the Back-Cover Texts
28641 If you have Invariant Sections without Cover Texts, or some other
28642 combination of the three, merge those two alternatives to suit the
28645 If your document contains nontrivial examples of program code, we
28646 recommend releasing these examples in parallel under your choice of
28647 free software license, such as the GNU General Public License, to
28648 permit their use in free software.
28651 File: gcc.info, Node: Contributors, Next: Option Index, Prev: GNU Free Documentation License, Up: Top
28653 Contributors to GCC
28654 *******************
28656 The GCC project would like to thank its many contributors. Without
28657 them the project would not have been nearly as successful as it has
28658 been. Any omissions in this list are accidental. Feel free to contact
28659 <law@redhat.com> or <gerald@pfeifer.com> if you have been left out or
28660 some of your contributions are not listed. Please keep this list in
28661 alphabetical order.
28663 * Analog Devices helped implement the support for complex data types
28666 * John David Anglin for threading-related fixes and improvements to
28667 libstdc++-v3, and the HP-UX port.
28669 * James van Artsdalen wrote the code that makes efficient use of the
28670 Intel 80387 register stack.
28672 * Abramo and Roberto Bagnara for the SysV68 Motorola 3300 Delta
28675 * Alasdair Baird for various bug fixes.
28677 * Giovanni Bajo for analyzing lots of complicated C++ problem
28680 * Peter Barada for his work to improve code generation for new
28683 * Gerald Baumgartner added the signature extension to the C++ front
28686 * Godmar Back for his Java improvements and encouragement.
28688 * Scott Bambrough for help porting the Java compiler.
28690 * Wolfgang Bangerth for processing tons of bug reports.
28692 * Jon Beniston for his Microsoft Windows port of Java.
28694 * Daniel Berlin for better DWARF2 support, faster/better
28695 optimizations, improved alias analysis, plus migrating GCC to
28698 * Geoff Berry for his Java object serialization work and various
28701 * Uros Bizjak for the implementation of x87 math built-in functions
28702 and for various middle end and i386 back end improvements and
28705 * Eric Blake for helping to make GCJ and libgcj conform to the
28708 * Janne Blomqvist for contributions to GNU Fortran.
28710 * Segher Boessenkool for various fixes.
28712 * Hans-J. Boehm for his garbage collector, IA-64 libffi port, and
28715 * Neil Booth for work on cpplib, lang hooks, debug hooks and other
28716 miscellaneous clean-ups.
28718 * Steven Bosscher for integrating the GNU Fortran front end into GCC
28719 and for contributing to the tree-ssa branch.
28721 * Eric Botcazou for fixing middle- and backend bugs left and right.
28723 * Per Bothner for his direction via the steering committee and
28724 various improvements to the infrastructure for supporting new
28725 languages. Chill front end implementation. Initial
28726 implementations of cpplib, fix-header, config.guess, libio, and
28727 past C++ library (libg++) maintainer. Dreaming up, designing and
28728 implementing much of GCJ.
28730 * Devon Bowen helped port GCC to the Tahoe.
28732 * Don Bowman for mips-vxworks contributions.
28734 * Dave Brolley for work on cpplib and Chill.
28736 * Paul Brook for work on the ARM architecture and maintaining GNU
28739 * Robert Brown implemented the support for Encore 32000 systems.
28741 * Christian Bruel for improvements to local store elimination.
28743 * Herman A.J. ten Brugge for various fixes.
28745 * Joerg Brunsmann for Java compiler hacking and help with the GCJ
28748 * Joe Buck for his direction via the steering committee.
28750 * Craig Burley for leadership of the G77 Fortran effort.
28752 * Stephan Buys for contributing Doxygen notes for libstdc++.
28754 * Paolo Carlini for libstdc++ work: lots of efficiency improvements
28755 to the C++ strings, streambufs and formatted I/O, hard detective
28756 work on the frustrating localization issues, and keeping up with
28757 the problem reports.
28759 * John Carr for his alias work, SPARC hacking, infrastructure
28760 improvements, previous contributions to the steering committee,
28761 loop optimizations, etc.
28763 * Stephane Carrez for 68HC11 and 68HC12 ports.
28765 * Steve Chamberlain for support for the Renesas SH and H8 processors
28766 and the PicoJava processor, and for GCJ config fixes.
28768 * Glenn Chambers for help with the GCJ FAQ.
28770 * John-Marc Chandonia for various libgcj patches.
28772 * Scott Christley for his Objective-C contributions.
28774 * Eric Christopher for his Java porting help and clean-ups.
28776 * Branko Cibej for more warning contributions.
28778 * The GNU Classpath project for all of their merged runtime code.
28780 * Nick Clifton for arm, mcore, fr30, v850, m32r work, `--help', and
28781 other random hacking.
28783 * Michael Cook for libstdc++ cleanup patches to reduce warnings.
28785 * R. Kelley Cook for making GCC buildable from a read-only directory
28786 as well as other miscellaneous build process and documentation
28789 * Ralf Corsepius for SH testing and minor bugfixing.
28791 * Stan Cox for care and feeding of the x86 port and lots of behind
28792 the scenes hacking.
28794 * Alex Crain provided changes for the 3b1.
28796 * Ian Dall for major improvements to the NS32k port.
28798 * Paul Dale for his work to add uClinux platform support to the m68k
28801 * Dario Dariol contributed the four varieties of sample programs
28802 that print a copy of their source.
28804 * Russell Davidson for fstream and stringstream fixes in libstdc++.
28806 * Bud Davis for work on the G77 and GNU Fortran compilers.
28808 * Mo DeJong for GCJ and libgcj bug fixes.
28810 * DJ Delorie for the DJGPP port, build and libiberty maintenance,
28811 various bug fixes, and the M32C port.
28813 * Arnaud Desitter for helping to debug GNU Fortran.
28815 * Gabriel Dos Reis for contributions to G++, contributions and
28816 maintenance of GCC diagnostics infrastructure, libstdc++-v3,
28817 including `valarray<>', `complex<>', maintaining the numerics
28818 library (including that pesky `<limits>' :-) and keeping
28819 up-to-date anything to do with numbers.
28821 * Ulrich Drepper for his work on glibc, testing of GCC using glibc,
28822 ISO C99 support, CFG dumping support, etc., plus support of the
28823 C++ runtime libraries including for all kinds of C interface
28824 issues, contributing and maintaining `complex<>', sanity checking
28825 and disbursement, configuration architecture, libio maintenance,
28826 and early math work.
28828 * Zdenek Dvorak for a new loop unroller and various fixes.
28830 * Richard Earnshaw for his ongoing work with the ARM.
28832 * David Edelsohn for his direction via the steering committee,
28833 ongoing work with the RS6000/PowerPC port, help cleaning up Haifa
28834 loop changes, doing the entire AIX port of libstdc++ with his bare
28835 hands, and for ensuring GCC properly keeps working on AIX.
28837 * Kevin Ediger for the floating point formatting of num_put::do_put
28840 * Phil Edwards for libstdc++ work including configuration hackery,
28841 documentation maintainer, chief breaker of the web pages, the
28842 occasional iostream bug fix, and work on shared library symbol
28845 * Paul Eggert for random hacking all over GCC.
28847 * Mark Elbrecht for various DJGPP improvements, and for libstdc++
28848 configuration support for locales and fstream-related fixes.
28850 * Vadim Egorov for libstdc++ fixes in strings, streambufs, and
28853 * Christian Ehrhardt for dealing with bug reports.
28855 * Ben Elliston for his work to move the Objective-C runtime into its
28856 own subdirectory and for his work on autoconf.
28858 * Marc Espie for OpenBSD support.
28860 * Doug Evans for much of the global optimization framework, arc,
28861 m32r, and SPARC work.
28863 * Christopher Faylor for his work on the Cygwin port and for caring
28864 and feeding the gcc.gnu.org box and saving its users tons of spam.
28866 * Fred Fish for BeOS support and Ada fixes.
28868 * Ivan Fontes Garcia for the Portuguese translation of the GCJ FAQ.
28870 * Peter Gerwinski for various bug fixes and the Pascal front end.
28872 * Kaveh R. Ghazi for his direction via the steering committee,
28873 amazing work to make `-W -Wall -W* -Werror' useful, and
28874 continuously testing GCC on a plethora of platforms. Kaveh
28875 extends his gratitude to the CAIP Center at Rutgers University for
28876 providing him with computing resources to work on Free Software
28877 since the late 1980s.
28879 * John Gilmore for a donation to the FSF earmarked improving GNU
28882 * Judy Goldberg for c++ contributions.
28884 * Torbjorn Granlund for various fixes and the c-torture testsuite,
28885 multiply- and divide-by-constant optimization, improved long long
28886 support, improved leaf function register allocation, and his
28887 direction via the steering committee.
28889 * Anthony Green for his `-Os' contributions and Java front end work.
28891 * Stu Grossman for gdb hacking, allowing GCJ developers to debug
28894 * Michael K. Gschwind contributed the port to the PDP-11.
28896 * Ron Guilmette implemented the `protoize' and `unprotoize' tools,
28897 the support for Dwarf symbolic debugging information, and much of
28898 the support for System V Release 4. He has also worked heavily on
28899 the Intel 386 and 860 support.
28901 * Mostafa Hagog for Swing Modulo Scheduling (SMS) and post reload
28904 * Bruno Haible for improvements in the runtime overhead for EH, new
28905 warnings and assorted bug fixes.
28907 * Andrew Haley for his amazing Java compiler and library efforts.
28909 * Chris Hanson assisted in making GCC work on HP-UX for the 9000
28912 * Michael Hayes for various thankless work he's done trying to get
28913 the c30/c40 ports functional. Lots of loop and unroll
28914 improvements and fixes.
28916 * Dara Hazeghi for wading through myriads of target-specific bug
28919 * Kate Hedstrom for staking the G77 folks with an initial testsuite.
28921 * Richard Henderson for his ongoing SPARC, alpha, ia32, and ia64
28922 work, loop opts, and generally fixing lots of old problems we've
28923 ignored for years, flow rewrite and lots of further stuff,
28924 including reviewing tons of patches.
28926 * Aldy Hernandez for working on the PowerPC port, SIMD support, and
28929 * Nobuyuki Hikichi of Software Research Associates, Tokyo,
28930 contributed the support for the Sony NEWS machine.
28932 * Kazu Hirata for caring and feeding the Renesas H8/300 port and
28935 * Katherine Holcomb for work on GNU Fortran.
28937 * Manfred Hollstein for his ongoing work to keep the m88k alive, lots
28938 of testing and bug fixing, particularly of GCC configury code.
28940 * Steve Holmgren for MachTen patches.
28942 * Jan Hubicka for his x86 port improvements.
28944 * Falk Hueffner for working on C and optimization bug reports.
28946 * Bernardo Innocenti for his m68k work, including merging of
28947 ColdFire improvements and uClinux support.
28949 * Christian Iseli for various bug fixes.
28951 * Kamil Iskra for general m68k hacking.
28953 * Lee Iverson for random fixes and MIPS testing.
28955 * Andreas Jaeger for testing and benchmarking of GCC and various bug
28958 * Jakub Jelinek for his SPARC work and sibling call optimizations as
28959 well as lots of bug fixes and test cases, and for improving the
28962 * Janis Johnson for ia64 testing and fixes, her quality improvement
28963 sidetracks, and web page maintenance.
28965 * Kean Johnston for SCO OpenServer support and various fixes.
28967 * Tim Josling for the sample language treelang based originally on
28968 Richard Kenner's "toy" language.
28970 * Nicolai Josuttis for additional libstdc++ documentation.
28972 * Klaus Kaempf for his ongoing work to make alpha-vms a viable
28975 * Steven G. Kargl for work on GNU Fortran.
28977 * David Kashtan of SRI adapted GCC to VMS.
28979 * Ryszard Kabatek for many, many libstdc++ bug fixes and
28980 optimizations of strings, especially member functions, and for
28983 * Geoffrey Keating for his ongoing work to make the PPC work for
28984 GNU/Linux and his automatic regression tester.
28986 * Brendan Kehoe for his ongoing work with G++ and for a lot of early
28987 work in just about every part of libstdc++.
28989 * Oliver M. Kellogg of Deutsche Aerospace contributed the port to the
28992 * Richard Kenner of the New York University Ultracomputer Research
28993 Laboratory wrote the machine descriptions for the AMD 29000, the
28994 DEC Alpha, the IBM RT PC, and the IBM RS/6000 as well as the
28995 support for instruction attributes. He also made changes to
28996 better support RISC processors including changes to common
28997 subexpression elimination, strength reduction, function calling
28998 sequence handling, and condition code support, in addition to
28999 generalizing the code for frame pointer elimination and delay slot
29000 scheduling. Richard Kenner was also the head maintainer of GCC
29003 * Mumit Khan for various contributions to the Cygwin and Mingw32
29004 ports and maintaining binary releases for Microsoft Windows hosts,
29005 and for massive libstdc++ porting work to Cygwin/Mingw32.
29007 * Robin Kirkham for cpu32 support.
29009 * Mark Klein for PA improvements.
29011 * Thomas Koenig for various bug fixes.
29013 * Bruce Korb for the new and improved fixincludes code.
29015 * Benjamin Kosnik for his G++ work and for leading the libstdc++-v3
29018 * Charles LaBrec contributed the support for the Integrated Solutions
29021 * Asher Langton and Mike Kumbera for contributing Cray pointer
29022 support to GNU Fortran, and for other GNU Fortran improvements.
29024 * Jeff Law for his direction via the steering committee,
29025 coordinating the entire egcs project and GCC 2.95, rolling out
29026 snapshots and releases, handling merges from GCC2, reviewing tons
29027 of patches that might have fallen through the cracks else, and
29028 random but extensive hacking.
29030 * Marc Lehmann for his direction via the steering committee and
29031 helping with analysis and improvements of x86 performance.
29033 * Victor Leikehman for work on GNU Fortran.
29035 * Ted Lemon wrote parts of the RTL reader and printer.
29037 * Kriang Lerdsuwanakij for C++ improvements including template as
29038 template parameter support, and many C++ fixes.
29040 * Warren Levy for tremendous work on libgcj (Java Runtime Library)
29041 and random work on the Java front end.
29043 * Alain Lichnewsky ported GCC to the MIPS CPU.
29045 * Oskar Liljeblad for hacking on AWT and his many Java bug reports
29048 * Robert Lipe for OpenServer support, new testsuites, testing, etc.
29050 * Weiwen Liu for testing and various bug fixes.
29052 * Dave Love for his ongoing work with the Fortran front end and
29055 * Martin von Lo"wis for internal consistency checking infrastructure,
29056 various C++ improvements including namespace support, and tons of
29057 assistance with libstdc++/compiler merges.
29059 * H.J. Lu for his previous contributions to the steering committee,
29060 many x86 bug reports, prototype patches, and keeping the GNU/Linux
29063 * Greg McGary for random fixes and (someday) bounded pointers.
29065 * Andrew MacLeod for his ongoing work in building a real EH system,
29066 various code generation improvements, work on the global
29069 * Vladimir Makarov for hacking some ugly i960 problems, PowerPC
29070 hacking improvements to compile-time performance, overall
29071 knowledge and direction in the area of instruction scheduling, and
29072 design and implementation of the automaton based instruction
29075 * Bob Manson for his behind the scenes work on dejagnu.
29077 * Philip Martin for lots of libstdc++ string and vector iterator
29078 fixes and improvements, and string clean up and testsuites.
29080 * All of the Mauve project contributors, for Java test code.
29082 * Bryce McKinlay for numerous GCJ and libgcj fixes and improvements.
29084 * Adam Megacz for his work on the Microsoft Windows port of GCJ.
29086 * Michael Meissner for LRS framework, ia32, m32r, v850, m88k, MIPS,
29087 powerpc, haifa, ECOFF debug support, and other assorted hacking.
29089 * Jason Merrill for his direction via the steering committee and
29090 leading the G++ effort.
29092 * Martin Michlmayr for testing GCC on several architectures using the
29093 entire Debian archive.
29095 * David Miller for his direction via the steering committee, lots of
29096 SPARC work, improvements in jump.c and interfacing with the Linux
29099 * Gary Miller ported GCC to Charles River Data Systems machines.
29101 * Alfred Minarik for libstdc++ string and ios bug fixes, and turning
29102 the entire libstdc++ testsuite namespace-compatible.
29104 * Mark Mitchell for his direction via the steering committee,
29105 mountains of C++ work, load/store hoisting out of loops, alias
29106 analysis improvements, ISO C `restrict' support, and serving as
29107 release manager for GCC 3.x.
29109 * Alan Modra for various GNU/Linux bits and testing.
29111 * Toon Moene for his direction via the steering committee, Fortran
29112 maintenance, and his ongoing work to make us make Fortran run fast.
29114 * Jason Molenda for major help in the care and feeding of all the
29115 services on the gcc.gnu.org (formerly egcs.cygnus.com)
29116 machine--mail, web services, ftp services, etc etc. Doing all
29117 this work on scrap paper and the backs of envelopes would have
29120 * Catherine Moore for fixing various ugly problems we have sent her
29121 way, including the haifa bug which was killing the Alpha & PowerPC
29124 * Mike Moreton for his various Java patches.
29126 * David Mosberger-Tang for various Alpha improvements, and for the
29127 initial IA-64 port.
29129 * Stephen Moshier contributed the floating point emulator that
29130 assists in cross-compilation and permits support for floating
29131 point numbers wider than 64 bits and for ISO C99 support.
29133 * Bill Moyer for his behind the scenes work on various issues.
29135 * Philippe De Muyter for his work on the m68k port.
29137 * Joseph S. Myers for his work on the PDP-11 port, format checking
29138 and ISO C99 support, and continuous emphasis on (and contributions
29141 * Nathan Myers for his work on libstdc++-v3: architecture and
29142 authorship through the first three snapshots, including
29143 implementation of locale infrastructure, string, shadow C headers,
29144 and the initial project documentation (DESIGN, CHECKLIST, and so
29145 forth). Later, more work on MT-safe string and shadow headers.
29147 * Felix Natter for documentation on porting libstdc++.
29149 * Nathanael Nerode for cleaning up the configuration/build process.
29151 * NeXT, Inc. donated the front end that supports the Objective-C
29154 * Hans-Peter Nilsson for the CRIS and MMIX ports, improvements to
29155 the search engine setup, various documentation fixes and other
29158 * Geoff Noer for his work on getting cygwin native builds working.
29160 * Diego Novillo for his work on Tree SSA, OpenMP, SPEC performance
29161 tracking web pages and assorted fixes.
29163 * David O'Brien for the FreeBSD/alpha, FreeBSD/AMD x86-64,
29164 FreeBSD/ARM, FreeBSD/PowerPC, and FreeBSD/SPARC64 ports and
29165 related infrastructure improvements.
29167 * Alexandre Oliva for various build infrastructure improvements,
29168 scripts and amazing testing work, including keeping libtool issues
29171 * Stefan Olsson for work on mt_alloc.
29173 * Melissa O'Neill for various NeXT fixes.
29175 * Rainer Orth for random MIPS work, including improvements to GCC's
29176 o32 ABI support, improvements to dejagnu's MIPS support, Java
29177 configuration clean-ups and porting work, etc.
29179 * Hartmut Penner for work on the s390 port.
29181 * Paul Petersen wrote the machine description for the Alliant FX/8.
29183 * Alexandre Petit-Bianco for implementing much of the Java compiler
29184 and continued Java maintainership.
29186 * Matthias Pfaller for major improvements to the NS32k port.
29188 * Gerald Pfeifer for his direction via the steering committee,
29189 pointing out lots of problems we need to solve, maintenance of the
29190 web pages, and taking care of documentation maintenance in general.
29192 * Andrew Pinski for processing bug reports by the dozen.
29194 * Ovidiu Predescu for his work on the Objective-C front end and
29197 * Jerry Quinn for major performance improvements in C++ formatted
29200 * Ken Raeburn for various improvements to checker, MIPS ports and
29201 various cleanups in the compiler.
29203 * Rolf W. Rasmussen for hacking on AWT.
29205 * David Reese of Sun Microsystems contributed to the Solaris on
29208 * Volker Reichelt for keeping up with the problem reports.
29210 * Joern Rennecke for maintaining the sh port, loop, regmove & reload
29213 * Loren J. Rittle for improvements to libstdc++-v3 including the
29214 FreeBSD port, threading fixes, thread-related configury changes,
29215 critical threading documentation, and solutions to really tricky
29216 I/O problems, as well as keeping GCC properly working on FreeBSD
29217 and continuous testing.
29219 * Craig Rodrigues for processing tons of bug reports.
29221 * Ola Ro"nnerup for work on mt_alloc.
29223 * Gavin Romig-Koch for lots of behind the scenes MIPS work.
29225 * David Ronis inspired and encouraged Craig to rewrite the G77
29226 documentation in texinfo format by contributing a first pass at a
29227 translation of the old `g77-0.5.16/f/DOC' file.
29229 * Ken Rose for fixes to GCC's delay slot filling code.
29231 * Paul Rubin wrote most of the preprocessor.
29233 * Pe'tur Runo'lfsson for major performance improvements in C++
29234 formatted I/O and large file support in C++ filebuf.
29236 * Chip Salzenberg for libstdc++ patches and improvements to locales,
29237 traits, Makefiles, libio, libtool hackery, and "long long" support.
29239 * Juha Sarlin for improvements to the H8 code generator.
29241 * Greg Satz assisted in making GCC work on HP-UX for the 9000 series
29244 * Roger Sayle for improvements to constant folding and GCC's RTL
29245 optimizers as well as for fixing numerous bugs.
29247 * Bradley Schatz for his work on the GCJ FAQ.
29249 * Peter Schauer wrote the code to allow debugging to work on the
29252 * William Schelter did most of the work on the Intel 80386 support.
29254 * Tobias Schlu"ter for work on GNU Fortran.
29256 * Bernd Schmidt for various code generation improvements and major
29257 work in the reload pass as well a serving as release manager for
29260 * Peter Schmid for constant testing of libstdc++--especially
29261 application testing, going above and beyond what was requested for
29262 the release criteria--and libstdc++ header file tweaks.
29264 * Jason Schroeder for jcf-dump patches.
29266 * Andreas Schwab for his work on the m68k port.
29268 * Lars Segerlund for work on GNU Fortran.
29270 * Joel Sherrill for his direction via the steering committee, RTEMS
29271 contributions and RTEMS testing.
29273 * Nathan Sidwell for many C++ fixes/improvements.
29275 * Jeffrey Siegal for helping RMS with the original design of GCC,
29276 some code which handles the parse tree and RTL data structures,
29277 constant folding and help with the original VAX & m68k ports.
29279 * Kenny Simpson for prompting libstdc++ fixes due to defect reports
29280 from the LWG (thereby keeping GCC in line with updates from the
29283 * Franz Sirl for his ongoing work with making the PPC port stable
29286 * Andrey Slepuhin for assorted AIX hacking.
29288 * Christopher Smith did the port for Convex machines.
29290 * Danny Smith for his major efforts on the Mingw (and Cygwin) ports.
29292 * Randy Smith finished the Sun FPA support.
29294 * Scott Snyder for queue, iterator, istream, and string fixes and
29295 libstdc++ testsuite entries. Also for providing the patch to G77
29296 to add rudimentary support for `INTEGER*1', `INTEGER*2', and
29299 * Brad Spencer for contributions to the GLIBCPP_FORCE_NEW technique.
29301 * Richard Stallman, for writing the original GCC and launching the
29304 * Jan Stein of the Chalmers Computer Society provided support for
29305 Genix, as well as part of the 32000 machine description.
29307 * Nigel Stephens for various mips16 related fixes/improvements.
29309 * Jonathan Stone wrote the machine description for the Pyramid
29312 * Graham Stott for various infrastructure improvements.
29314 * John Stracke for his Java HTTP protocol fixes.
29316 * Mike Stump for his Elxsi port, G++ contributions over the years
29317 and more recently his vxworks contributions
29319 * Jeff Sturm for Java porting help, bug fixes, and encouragement.
29321 * Shigeya Suzuki for this fixes for the bsdi platforms.
29323 * Ian Lance Taylor for his mips16 work, general configury hacking,
29326 * Holger Teutsch provided the support for the Clipper CPU.
29328 * Gary Thomas for his ongoing work to make the PPC work for
29331 * Philipp Thomas for random bug fixes throughout the compiler
29333 * Jason Thorpe for thread support in libstdc++ on NetBSD.
29335 * Kresten Krab Thorup wrote the run time support for the Objective-C
29336 language and the fantastic Java bytecode interpreter.
29338 * Michael Tiemann for random bug fixes, the first instruction
29339 scheduler, initial C++ support, function integration, NS32k, SPARC
29340 and M88k machine description work, delay slot scheduling.
29342 * Andreas Tobler for his work porting libgcj to Darwin.
29344 * Teemu Torma for thread safe exception handling support.
29346 * Leonard Tower wrote parts of the parser, RTL generator, and RTL
29347 definitions, and of the VAX machine description.
29349 * Tom Tromey for internationalization support and for his many Java
29350 contributions and libgcj maintainership.
29352 * Lassi Tuura for improvements to config.guess to determine HP
29355 * Petter Urkedal for libstdc++ CXXFLAGS, math, and algorithms fixes.
29357 * Andy Vaught for the design and initial implementation of the GNU
29360 * Brent Verner for work with the libstdc++ cshadow files and their
29361 associated configure steps.
29363 * Todd Vierling for contributions for NetBSD ports.
29365 * Jonathan Wakely for contributing libstdc++ Doxygen notes and XHTML
29368 * Dean Wakerley for converting the install documentation from HTML
29369 to texinfo in time for GCC 3.0.
29371 * Krister Walfridsson for random bug fixes.
29373 * Feng Wang for contributions to GNU Fortran.
29375 * Stephen M. Webb for time and effort on making libstdc++ shadow
29376 files work with the tricky Solaris 8+ headers, and for pushing the
29377 build-time header tree.
29379 * John Wehle for various improvements for the x86 code generator,
29380 related infrastructure improvements to help x86 code generation,
29381 value range propagation and other work, WE32k port.
29383 * Ulrich Weigand for work on the s390 port.
29385 * Zack Weinberg for major work on cpplib and various other bug fixes.
29387 * Matt Welsh for help with Linux Threads support in GCJ.
29389 * Urban Widmark for help fixing java.io.
29391 * Mark Wielaard for new Java library code and his work integrating
29394 * Dale Wiles helped port GCC to the Tahoe.
29396 * Bob Wilson from Tensilica, Inc. for the Xtensa port.
29398 * Jim Wilson for his direction via the steering committee, tackling
29399 hard problems in various places that nobody else wanted to work
29400 on, strength reduction and other loop optimizations.
29402 * Paul Woegerer and Tal Agmon for the CRX port.
29404 * Carlo Wood for various fixes.
29406 * Tom Wood for work on the m88k port.
29408 * Canqun Yang for work on GNU Fortran.
29410 * Masanobu Yuhara of Fujitsu Laboratories implemented the machine
29411 description for the Tron architecture (specifically, the Gmicro).
29413 * Kevin Zachmann helped port GCC to the Tahoe.
29415 * Ayal Zaks for Swing Modulo Scheduling (SMS).
29417 * Xiaoqiang Zhang for work on GNU Fortran.
29419 * Gilles Zunino for help porting Java to Irix.
29422 The following people are recognized for their contributions to GNAT,
29423 the Ada front end of GCC:
29426 * Romain Berrendonner
29476 * Hristian Kirtchev
29519 The following people are recognized for their contributions of new
29520 features, bug reports, testing and integration of classpath/libgcj for
29522 * Lillian Angel for `JTree' implementation and lots Free Swing
29523 additions and bugfixes.
29525 * Wolfgang Baer for `GapContent' bugfixes.
29527 * Anthony Balkissoon for `JList', Free Swing 1.5 updates and mouse
29528 event fixes, lots of Free Swing work including `JTable' editing.
29530 * Stuart Ballard for RMI constant fixes.
29532 * Goffredo Baroncelli for `HTTPURLConnection' fixes.
29534 * Gary Benson for `MessageFormat' fixes.
29536 * Daniel Bonniot for `Serialization' fixes.
29538 * Chris Burdess for lots of gnu.xml and http protocol fixes, `StAX'
29539 and `DOM xml:id' support.
29541 * Ka-Hing Cheung for `TreePath' and `TreeSelection' fixes.
29543 * Archie Cobbs for build fixes, VM interface updates,
29544 `URLClassLoader' updates.
29546 * Kelley Cook for build fixes.
29548 * Martin Cordova for Suggestions for better `SocketTimeoutException'.
29550 * David Daney for `BitSet' bugfixes, `HttpURLConnection' rewrite and
29553 * Thomas Fitzsimmons for lots of upgrades to the gtk+ AWT and Cairo
29554 2D support. Lots of imageio framework additions, lots of AWT and
29555 Free Swing bugfixes.
29557 * Jeroen Frijters for `ClassLoader' and nio cleanups, serialization
29558 fixes, better `Proxy' support, bugfixes and IKVM integration.
29560 * Santiago Gala for `AccessControlContext' fixes.
29562 * Nicolas Geoffray for `VMClassLoader' and `AccessController'
29565 * David Gilbert for `basic' and `metal' icon and plaf support and
29566 lots of documenting, Lots of Free Swing and metal theme additions.
29567 `MetalIconFactory' implementation.
29569 * Anthony Green for `MIDI' framework, `ALSA' and `DSSI' providers.
29571 * Andrew Haley for `Serialization' and `URLClassLoader' fixes, gcj
29574 * Kim Ho for `JFileChooser' implementation.
29576 * Andrew John Hughes for `Locale' and net fixes, URI RFC2986
29577 updates, `Serialization' fixes, `Properties' XML support and
29578 generic branch work, VMIntegration guide update.
29580 * Bastiaan Huisman for `TimeZone' bugfixing.
29582 * Andreas Jaeger for mprec updates.
29584 * Paul Jenner for better `-Werror' support.
29586 * Ito Kazumitsu for `NetworkInterface' implementation and updates.
29588 * Roman Kennke for `BoxLayout', `GrayFilter' and `SplitPane', plus
29589 bugfixes all over. Lots of Free Swing work including styled text.
29591 * Simon Kitching for `String' cleanups and optimization suggestions.
29593 * Michael Koch for configuration fixes, `Locale' updates, bug and
29596 * Guilhem Lavaux for configuration, thread and channel fixes and
29597 Kaffe integration. JCL native `Pointer' updates. Logger bugfixes.
29599 * David Lichteblau for JCL support library global/local reference
29602 * Aaron Luchko for JDWP updates and documentation fixes.
29604 * Ziga Mahkovec for `Graphics2D' upgraded to Cairo 0.5 and new regex
29607 * Sven de Marothy for BMP imageio support, CSS and `TextLayout'
29608 fixes. `GtkImage' rewrite, 2D, awt, free swing and date/time fixes
29609 and implementing the Qt4 peers.
29611 * Casey Marshall for crypto algorithm fixes, `FileChannel' lock,
29612 `SystemLogger' and `FileHandler' rotate implementations, NIO
29613 `FileChannel.map' support, security and policy updates.
29615 * Bryce McKinlay for RMI work.
29617 * Audrius Meskauskas for lots of Free Corba, RMI and HTML work plus
29618 testing and documenting.
29620 * Kalle Olavi Niemitalo for build fixes.
29622 * Rainer Orth for build fixes.
29624 * Andrew Overholt for `File' locking fixes.
29626 * Ingo Proetel for `Image', `Logger' and `URLClassLoader' updates.
29628 * Olga Rodimina for `MenuSelectionManager' implementation.
29630 * Jan Roehrich for `BasicTreeUI' and `JTree' fixes.
29632 * Julian Scheid for documentation updates and gjdoc support.
29634 * Christian Schlichtherle for zip fixes and cleanups.
29636 * Robert Schuster for documentation updates and beans fixes,
29637 `TreeNode' enumerations and `ActionCommand' and various fixes, XML
29638 and URL, AWT and Free Swing bugfixes.
29640 * Keith Seitz for lots of JDWP work.
29642 * Christian Thalinger for 64-bit cleanups, Configuration and VM
29643 interface fixes and `CACAO' integration, `fdlibm' updates.
29645 * Gael Thomas for `VMClassLoader' boot packages support suggestions.
29647 * Andreas Tobler for Darwin and Solaris testing and fixing, `Qt4'
29648 support for Darwin/OS X, `Graphics2D' support, `gtk+' updates.
29650 * Dalibor Topic for better `DEBUG' support, build cleanups and Kaffe
29651 integration. `Qt4' build infrastructure, `SHA1PRNG' and
29652 `GdkPixbugDecoder' updates.
29654 * Tom Tromey for Eclipse integration, generics work, lots of bugfixes
29655 and gcj integration including coordinating The Big Merge.
29657 * Mark Wielaard for bugfixes, packaging and release management,
29658 `Clipboard' implementation, system call interrupts and network
29659 timeouts and `GdkPixpufDecoder' fixes.
29662 In addition to the above, all of which also contributed time and
29663 energy in testing GCC, we would like to thank the following for their
29664 contributions to testing:
29666 * Michael Abd-El-Malek
29676 * David Billinghurst
29680 * Stephane Bortzmeyer
29690 * Bradford Castalia
29710 * Charles-Antoine Gauthier
29732 * Kevin B. Hendricks
29736 * Christian Joensson
29744 * Anand Krishnaswamy
29746 * A. O. V. Le Blanc
29810 * Pedro A. M. Vazquez
29820 And finally we'd like to thank everyone who uses the compiler, submits
29821 bug reports and generally reminds us why we're doing this work in the
29825 File: gcc.info, Node: Option Index, Next: Keyword Index, Prev: Contributors, Up: Top
29830 GCC's command line options are indexed here without any initial `-' or
29831 `--'. Where an option has both positive and negative forms (such as
29832 `-fOPTION' and `-fno-OPTION'), relevant entries in the manual are
29833 indexed under the most appropriate form; it may sometimes be useful to
29834 look up both forms.
29839 * ###: Overall Options. (line 192)
29840 * A: Preprocessor Options.
29842 * all_load: Darwin Options. (line 103)
29843 * allowable_client: Darwin Options. (line 190)
29844 * ansi <1>: Non-bugs. (line 107)
29845 * ansi <2>: Other Builtins. (line 22)
29846 * ansi <3>: Preprocessor Options.
29848 * ansi <4>: C Dialect Options. (line 11)
29849 * ansi: Standards. (line 13)
29850 * arch_errors_fatal: Darwin Options. (line 107)
29851 * aux-info: C Dialect Options. (line 119)
29852 * b: Target Options. (line 13)
29853 * B: Directory Options. (line 41)
29854 * bcopy-builtin: PDP-11 Options. (line 32)
29855 * bind_at_load: Darwin Options. (line 111)
29856 * bundle: Darwin Options. (line 116)
29857 * bundle_loader: Darwin Options. (line 120)
29858 * c: Link Options. (line 20)
29859 * C: Preprocessor Options.
29861 * c: Overall Options. (line 147)
29862 * client_name: Darwin Options. (line 190)
29863 * combine: Overall Options. (line 203)
29864 * compatibility_version: Darwin Options. (line 190)
29865 * coverage: Debugging Options. (line 239)
29866 * crossjumping: Optimize Options. (line 435)
29867 * current_version: Darwin Options. (line 190)
29868 * D: Preprocessor Options.
29870 * d: Debugging Options. (line 291)
29871 * da: Debugging Options. (line 457)
29872 * dA: Debugging Options. (line 304)
29873 * dB: Debugging Options. (line 309)
29874 * dC: Debugging Options. (line 319)
29875 * dc: Debugging Options. (line 313)
29876 * dD <1>: Preprocessor Options.
29878 * dD: Debugging Options. (line 333)
29879 * dd: Debugging Options. (line 327)
29880 * dE: Debugging Options. (line 338)
29881 * dead_strip: Darwin Options. (line 190)
29882 * dependency-file: Darwin Options. (line 190)
29883 * df: Debugging Options. (line 343)
29884 * dG: Debugging Options. (line 355)
29885 * dg: Debugging Options. (line 350)
29886 * dH: Debugging Options. (line 460)
29887 * dh: Debugging Options. (line 362)
29888 * dI: Preprocessor Options.
29890 * di: Debugging Options. (line 366)
29891 * dj: Debugging Options. (line 370)
29892 * dk: Debugging Options. (line 374)
29893 * dL: Debugging Options. (line 383)
29894 * dl: Debugging Options. (line 379)
29895 * dM: Preprocessor Options.
29897 * dm: Debugging Options. (line 463)
29898 * dM: Debugging Options. (line 394)
29899 * dm: Debugging Options. (line 390)
29900 * dN <1>: Preprocessor Options.
29902 * dN: Debugging Options. (line 403)
29903 * dn: Debugging Options. (line 399)
29904 * do: Debugging Options. (line 407)
29905 * dP: Debugging Options. (line 472)
29906 * dp: Debugging Options. (line 467)
29907 * dR: Debugging Options. (line 415)
29908 * dr: Debugging Options. (line 411)
29909 * dS: Debugging Options. (line 424)
29910 * ds: Debugging Options. (line 419)
29911 * dT: Debugging Options. (line 433)
29912 * dt: Debugging Options. (line 428)
29913 * dumpmachine: Debugging Options. (line 840)
29914 * dumpspecs: Debugging Options. (line 848)
29915 * dumpversion: Debugging Options. (line 844)
29916 * dv: Debugging Options. (line 476)
29917 * dV: Debugging Options. (line 438)
29918 * dw: Debugging Options. (line 445)
29919 * dx: Debugging Options. (line 481)
29920 * dy: Debugging Options. (line 485)
29921 * dylib_file: Darwin Options. (line 190)
29922 * dylinker_install_name: Darwin Options. (line 190)
29923 * dynamic: Darwin Options. (line 190)
29924 * dynamiclib: Darwin Options. (line 124)
29925 * dZ: Debugging Options. (line 453)
29926 * dz: Debugging Options. (line 449)
29927 * E <1>: Link Options. (line 20)
29928 * E: Overall Options. (line 168)
29929 * EB <1>: MIPS Options. (line 7)
29930 * EB: ARC Options. (line 12)
29931 * EL <1>: MIPS Options. (line 10)
29932 * EL: ARC Options. (line 9)
29933 * exported_symbols_list: Darwin Options. (line 190)
29934 * F: Darwin Options. (line 32)
29935 * fabi-version: C++ Dialect Options.
29937 * falign-functions: Optimize Options. (line 902)
29938 * falign-jumps: Optimize Options. (line 952)
29939 * falign-labels: Optimize Options. (line 920)
29940 * falign-loops: Optimize Options. (line 938)
29941 * fargument-alias: Code Gen Options. (line 364)
29942 * fargument-noalias: Code Gen Options. (line 364)
29943 * fargument-noalias-anything: Code Gen Options. (line 364)
29944 * fargument-noalias-global: Code Gen Options. (line 364)
29945 * fasynchronous-unwind-tables: Code Gen Options. (line 64)
29946 * fbounds-check <1>: Code Gen Options. (line 15)
29947 * fbounds-check: Optimize Options. (line 326)
29948 * fbranch-probabilities: Optimize Options. (line 1200)
29949 * fbranch-target-load-optimize: Optimize Options. (line 1308)
29950 * fbranch-target-load-optimize2: Optimize Options. (line 1314)
29951 * fbtr-bb-exclusive: Optimize Options. (line 1318)
29952 * fcall-saved <1>: Interoperation. (line 150)
29953 * fcall-saved: Code Gen Options. (line 237)
29954 * fcall-used: Code Gen Options. (line 223)
29955 * fcaller-saves: Optimize Options. (line 579)
29956 * fcheck-new: C++ Dialect Options.
29958 * fcommon: Variable Attributes.
29960 * fcond-mismatch: C Dialect Options. (line 235)
29961 * fconserve-space: C++ Dialect Options.
29963 * fconstant-string-class: Objective-C and Objective-C++ Dialect Options.
29965 * fcse-follow-jumps: Optimize Options. (line 363)
29966 * fcse-skip-blocks: Optimize Options. (line 372)
29967 * fcx-limited-range: Optimize Options. (line 1186)
29968 * fdata-sections: Optimize Options. (line 1289)
29969 * fdelayed-branch: Optimize Options. (line 488)
29970 * fdelete-null-pointer-checks: Optimize Options. (line 457)
29971 * fdiagnostics-show-location: Language Independent Options.
29973 * fdiagnostics-show-option: Language Independent Options.
29975 * fdirectives-only: Preprocessor Options.
29977 * fdollars-in-identifiers <1>: Interoperation. (line 146)
29978 * fdollars-in-identifiers: Preprocessor Options.
29980 * fdump-class-hierarchy: Debugging Options. (line 511)
29981 * fdump-ipa: Debugging Options. (line 518)
29982 * fdump-noaddr: Debugging Options. (line 488)
29983 * fdump-rtl-all: Debugging Options. (line 457)
29984 * fdump-rtl-bbro: Debugging Options. (line 309)
29985 * fdump-rtl-btl: Debugging Options. (line 327)
29986 * fdump-rtl-bypass: Debugging Options. (line 355)
29987 * fdump-rtl-ce1: Debugging Options. (line 319)
29988 * fdump-rtl-ce2: Debugging Options. (line 319)
29989 * fdump-rtl-ce3: Debugging Options. (line 338)
29990 * fdump-rtl-cfg: Debugging Options. (line 343)
29991 * fdump-rtl-combine: Debugging Options. (line 313)
29992 * fdump-rtl-cse: Debugging Options. (line 419)
29993 * fdump-rtl-cse2: Debugging Options. (line 428)
29994 * fdump-rtl-dbr: Debugging Options. (line 327)
29995 * fdump-rtl-eh: Debugging Options. (line 362)
29996 * fdump-rtl-expand: Debugging Options. (line 411)
29997 * fdump-rtl-flow2: Debugging Options. (line 445)
29998 * fdump-rtl-gcse: Debugging Options. (line 355)
29999 * fdump-rtl-greg: Debugging Options. (line 350)
30000 * fdump-rtl-jump: Debugging Options. (line 370)
30001 * fdump-rtl-life: Debugging Options. (line 343)
30002 * fdump-rtl-loop2: Debugging Options. (line 383)
30003 * fdump-rtl-lreg: Debugging Options. (line 379)
30004 * fdump-rtl-mach: Debugging Options. (line 394)
30005 * fdump-rtl-peephole2: Debugging Options. (line 449)
30006 * fdump-rtl-postreload: Debugging Options. (line 407)
30007 * fdump-rtl-regmove: Debugging Options. (line 403)
30008 * fdump-rtl-rnreg: Debugging Options. (line 399)
30009 * fdump-rtl-sched: Debugging Options. (line 424)
30010 * fdump-rtl-sched2: Debugging Options. (line 415)
30011 * fdump-rtl-sibling: Debugging Options. (line 366)
30012 * fdump-rtl-sms: Debugging Options. (line 390)
30013 * fdump-rtl-stack: Debugging Options. (line 374)
30014 * fdump-rtl-tracer: Debugging Options. (line 433)
30015 * fdump-rtl-vartrack: Debugging Options. (line 438)
30016 * fdump-rtl-vpt: Debugging Options. (line 438)
30017 * fdump-rtl-web: Debugging Options. (line 453)
30018 * fdump-translation-unit: Debugging Options. (line 503)
30019 * fdump-tree: Debugging Options. (line 533)
30020 * fdump-tree-alias: Debugging Options. (line 621)
30021 * fdump-tree-all: Debugging Options. (line 706)
30022 * fdump-tree-ccp: Debugging Options. (line 625)
30023 * fdump-tree-cfg: Debugging Options. (line 596)
30024 * fdump-tree-ch: Debugging Options. (line 608)
30025 * fdump-tree-copyprop: Debugging Options. (line 641)
30026 * fdump-tree-copyrename: Debugging Options. (line 687)
30027 * fdump-tree-dce: Debugging Options. (line 649)
30028 * fdump-tree-dom: Debugging Options. (line 667)
30029 * fdump-tree-dse: Debugging Options. (line 672)
30030 * fdump-tree-forwprop: Debugging Options. (line 682)
30031 * fdump-tree-fre: Debugging Options. (line 637)
30032 * fdump-tree-gimple: Debugging Options. (line 591)
30033 * fdump-tree-mudflap: Debugging Options. (line 653)
30034 * fdump-tree-nrv: Debugging Options. (line 692)
30035 * fdump-tree-phiopt: Debugging Options. (line 677)
30036 * fdump-tree-pre: Debugging Options. (line 633)
30037 * fdump-tree-salias: Debugging Options. (line 616)
30038 * fdump-tree-sink: Debugging Options. (line 663)
30039 * fdump-tree-sra: Debugging Options. (line 658)
30040 * fdump-tree-ssa: Debugging Options. (line 612)
30041 * fdump-tree-store_copyprop: Debugging Options. (line 645)
30042 * fdump-tree-storeccp: Debugging Options. (line 629)
30043 * fdump-tree-vcg: Debugging Options. (line 600)
30044 * fdump-tree-vect: Debugging Options. (line 697)
30045 * fdump-tree-vrp: Debugging Options. (line 702)
30046 * fdump-unnumbered: Debugging Options. (line 495)
30047 * fearly-inlining: Optimize Options. (line 204)
30048 * feliminate-dwarf2-dups: Debugging Options. (line 125)
30049 * feliminate-unused-debug-symbols: Debugging Options. (line 52)
30050 * feliminate-unused-debug-types: Debugging Options. (line 852)
30051 * fexceptions: Code Gen Options. (line 34)
30052 * fexec-charset: Preprocessor Options.
30054 * fexpensive-optimizations: Optimize Options. (line 470)
30055 * fextended-identifiers: Preprocessor Options.
30057 * ffast-math: Optimize Options. (line 1070)
30058 * ffinite-math-only: Optimize Options. (line 1114)
30059 * ffix-and-continue: Darwin Options. (line 97)
30060 * ffixed: Code Gen Options. (line 211)
30061 * ffloat-store <1>: Disappointments. (line 77)
30062 * ffloat-store: Optimize Options. (line 1056)
30063 * ffor-scope: C++ Dialect Options.
30065 * fforce-addr: Optimize Options. (line 154)
30066 * fforce-mem: Optimize Options. (line 146)
30067 * ffreestanding <1>: Function Attributes.
30069 * ffreestanding <2>: Warning Options. (line 94)
30070 * ffreestanding <3>: C Dialect Options. (line 190)
30071 * ffreestanding: Standards. (line 81)
30072 * ffriend-injection: C++ Dialect Options.
30074 * ffunction-sections: Optimize Options. (line 1289)
30075 * fgcse: Optimize Options. (line 386)
30076 * fgcse-after-reload: Optimize Options. (line 422)
30077 * fgcse-las: Optimize Options. (line 415)
30078 * fgcse-lm: Optimize Options. (line 397)
30079 * fgcse-sm: Optimize Options. (line 406)
30080 * fgnu-runtime: Objective-C and Objective-C++ Dialect Options.
30082 * fgnu89-inline: C Dialect Options. (line 98)
30083 * fhosted: C Dialect Options. (line 183)
30084 * filelist: Darwin Options. (line 190)
30085 * findirect-data: Darwin Options. (line 97)
30086 * finhibit-size-directive: Code Gen Options. (line 147)
30087 * finline-functions: Optimize Options. (line 185)
30088 * finline-functions-called-once: Optimize Options. (line 196)
30089 * finline-limit: Optimize Options. (line 214)
30090 * finput-charset: Preprocessor Options.
30092 * finstrument-functions <1>: Function Attributes.
30094 * finstrument-functions: Code Gen Options. (line 267)
30095 * finstrument-functions-exclude-file-list: Code Gen Options. (line 304)
30096 * finstrument-functions-exclude-function-list: Code Gen Options.
30098 * fkeep-inline-functions <1>: Inline. (line 58)
30099 * fkeep-inline-functions: Optimize Options. (line 252)
30100 * fkeep-static-consts: Optimize Options. (line 259)
30101 * flat_namespace: Darwin Options. (line 190)
30102 * fleading-underscore: Code Gen Options. (line 381)
30103 * fmem-report: Debugging Options. (line 220)
30104 * fmessage-length: Language Independent Options.
30106 * fmodulo-sched: Optimize Options. (line 288)
30107 * fmove-loop-invariants: Optimize Options. (line 1279)
30108 * fms-extensions <1>: Unnamed Fields. (line 37)
30109 * fms-extensions <2>: C++ Dialect Options.
30111 * fms-extensions: C Dialect Options. (line 206)
30112 * fmudflap: Optimize Options. (line 333)
30113 * fmudflapir: Optimize Options. (line 333)
30114 * fmudflapth: Optimize Options. (line 333)
30115 * fnext-runtime: Objective-C and Objective-C++ Dialect Options.
30117 * fno-access-control: C++ Dialect Options.
30119 * fno-asm: C Dialect Options. (line 135)
30120 * fno-branch-count-reg: Optimize Options. (line 293)
30121 * fno-builtin <1>: Other Builtins. (line 14)
30122 * fno-builtin <2>: Function Attributes.
30124 * fno-builtin <3>: Warning Options. (line 94)
30125 * fno-builtin: C Dialect Options. (line 149)
30126 * fno-common <1>: Variable Attributes.
30128 * fno-common: Code Gen Options. (line 135)
30129 * fno-cprop-registers: Optimize Options. (line 1028)
30130 * fno-cx-limited-range: Optimize Options. (line 1186)
30131 * fno-default-inline <1>: Inline. (line 53)
30132 * fno-default-inline <2>: Optimize Options. (line 131)
30133 * fno-default-inline: C++ Dialect Options.
30135 * fno-defer-pop: Optimize Options. (line 138)
30136 * fno-elide-constructors: C++ Dialect Options.
30138 * fno-enforce-eh-specs: C++ Dialect Options.
30140 * fno-for-scope: C++ Dialect Options.
30142 * fno-function-cse: Optimize Options. (line 303)
30143 * fno-gnu-keywords: C++ Dialect Options.
30145 * fno-guess-branch-probability: Optimize Options. (line 787)
30146 * fno-ident: Code Gen Options. (line 144)
30147 * fno-implement-inlines <1>: C++ Interface. (line 75)
30148 * fno-implement-inlines: C++ Dialect Options.
30150 * fno-implicit-inline-templates: C++ Dialect Options.
30152 * fno-implicit-templates <1>: Template Instantiation.
30154 * fno-implicit-templates: C++ Dialect Options.
30156 * fno-inline: Optimize Options. (line 179)
30157 * fno-jump-tables: Code Gen Options. (line 203)
30158 * fno-math-errno: Optimize Options. (line 1083)
30159 * fno-nil-receivers: Objective-C and Objective-C++ Dialect Options.
30161 * fno-nonansi-builtins: C++ Dialect Options.
30163 * fno-operator-names: C++ Dialect Options.
30165 * fno-optional-diags: C++ Dialect Options.
30167 * fno-peephole: Optimize Options. (line 778)
30168 * fno-peephole2: Optimize Options. (line 778)
30169 * fno-rtti: C++ Dialect Options.
30171 * fno-sched-interblock: Optimize Options. (line 514)
30172 * fno-sched-spec: Optimize Options. (line 519)
30173 * fno-show-column: Preprocessor Options.
30175 * fno-signed-bitfields: C Dialect Options. (line 268)
30176 * fno-stack-limit: Code Gen Options. (line 347)
30177 * fno-threadsafe-statics: C++ Dialect Options.
30179 * fno-trapping-math: Optimize Options. (line 1124)
30180 * fno-unsigned-bitfields: C Dialect Options. (line 268)
30181 * fno-use-cxa-get-exception-ptr: C++ Dialect Options.
30183 * fno-weak: C++ Dialect Options.
30185 * fno-working-directory: Preprocessor Options.
30187 * fno-zero-initialized-in-bss: Optimize Options. (line 314)
30188 * fnon-call-exceptions: Code Gen Options. (line 48)
30189 * fobjc-call-cxx-cdtors: Objective-C and Objective-C++ Dialect Options.
30191 * fobjc-direct-dispatch: Objective-C and Objective-C++ Dialect Options.
30193 * fobjc-exceptions: Objective-C and Objective-C++ Dialect Options.
30195 * fobjc-gc: Objective-C and Objective-C++ Dialect Options.
30197 * fomit-frame-pointer: Optimize Options. (line 158)
30198 * fopenmp: C Dialect Options. (line 200)
30199 * foptimize-register-move: Optimize Options. (line 477)
30200 * foptimize-sibling-calls: Optimize Options. (line 174)
30201 * force_cpusubtype_ALL: Darwin Options. (line 129)
30202 * force_flat_namespace: Darwin Options. (line 190)
30203 * fpack-struct: Code Gen Options. (line 254)
30204 * fpcc-struct-return <1>: Incompatibilities. (line 170)
30205 * fpcc-struct-return: Code Gen Options. (line 70)
30206 * fpch-deps: Preprocessor Options.
30208 * fpch-preprocess: Preprocessor Options.
30210 * fpeel-loops: Optimize Options. (line 1271)
30211 * fpermissive: C++ Dialect Options.
30213 * fPIC: Code Gen Options. (line 184)
30214 * fpic: Code Gen Options. (line 163)
30215 * fPIE: Code Gen Options. (line 197)
30216 * fpie: Code Gen Options. (line 197)
30217 * fprefetch-loop-arrays: Optimize Options. (line 767)
30218 * fpreprocessed: Preprocessor Options.
30220 * fprofile-arcs <1>: Other Builtins. (line 236)
30221 * fprofile-arcs: Debugging Options. (line 224)
30222 * fprofile-generate: Optimize Options. (line 1035)
30223 * fprofile-use: Optimize Options. (line 1044)
30224 * fprofile-values: Optimize Options. (line 1219)
30225 * frandom-string: Debugging Options. (line 735)
30226 * freg-struct-return: Code Gen Options. (line 88)
30227 * fregmove: Optimize Options. (line 477)
30228 * frename-registers: Optimize Options. (line 1238)
30229 * freorder-blocks: Optimize Options. (line 804)
30230 * freorder-blocks-and-partition: Optimize Options. (line 810)
30231 * freorder-functions: Optimize Options. (line 821)
30232 * freplace-objc-classes: Objective-C and Objective-C++ Dialect Options.
30234 * frepo <1>: Template Instantiation.
30236 * frepo: C++ Dialect Options.
30238 * frerun-cse-after-loop: Optimize Options. (line 380)
30239 * frounding-math: Optimize Options. (line 1139)
30240 * frtl-abstract-sequences: Optimize Options. (line 1159)
30241 * fsched-spec-load: Optimize Options. (line 524)
30242 * fsched-spec-load-dangerous: Optimize Options. (line 529)
30243 * fsched-stalled-insns: Optimize Options. (line 534)
30244 * fsched-stalled-insns-dep: Optimize Options. (line 539)
30245 * fsched-verbose: Debugging Options. (line 745)
30246 * fsched2-use-superblocks: Optimize Options. (line 546)
30247 * fsched2-use-traces: Optimize Options. (line 557)
30248 * fschedule-insns: Optimize Options. (line 495)
30249 * fschedule-insns2: Optimize Options. (line 505)
30250 * fscheduling-in-modulo-scheduled-loops: Optimize Options. (line 573)
30251 * fsection-anchors: Optimize Options. (line 1334)
30252 * fsee: Optimize Options. (line 569)
30253 * fshort-double: Code Gen Options. (line 117)
30254 * fshort-enums <1>: Non-bugs. (line 42)
30255 * fshort-enums <2>: Type Attributes. (line 112)
30256 * fshort-enums <3>: Structures unions enumerations and bit-fields implementation.
30258 * fshort-enums: Code Gen Options. (line 106)
30259 * fshort-wchar: Code Gen Options. (line 125)
30260 * fsignaling-nans: Optimize Options. (line 1166)
30261 * fsigned-bitfields <1>: Non-bugs. (line 57)
30262 * fsigned-bitfields: C Dialect Options. (line 268)
30263 * fsigned-char <1>: Characters implementation.
30265 * fsigned-char: C Dialect Options. (line 258)
30266 * fsingle-precision-constant: Optimize Options. (line 1181)
30267 * fsplit-ivs-in-unroller: Optimize Options. (line 748)
30268 * fstack-check: Code Gen Options. (line 332)
30269 * fstack-limit-register: Code Gen Options. (line 347)
30270 * fstack-limit-symbol: Code Gen Options. (line 347)
30271 * fstats: C++ Dialect Options.
30273 * fstrict-aliasing: Optimize Options. (line 834)
30274 * fstrict-overflow: Optimize Options. (line 876)
30275 * fsyntax-only: Warning Options. (line 23)
30276 * ftabstop: Preprocessor Options.
30278 * ftemplate-depth: C++ Dialect Options.
30280 * ftest-coverage: Debugging Options. (line 280)
30281 * fthread-jumps: Optimize Options. (line 354)
30282 * ftime-report: Debugging Options. (line 216)
30283 * ftracer: Optimize Options. (line 731)
30284 * ftrapv: Code Gen Options. (line 22)
30285 * ftree-vect-loop-version: Optimize Options. (line 713)
30286 * ftree-vectorizer-verbose: Debugging Options. (line 710)
30287 * funit-at-a-time: Optimize Options. (line 965)
30288 * funroll-all-loops: Optimize Options. (line 742)
30289 * funroll-loops: Optimize Options. (line 736)
30290 * funsafe-loop-optimizations: Optimize Options. (line 427)
30291 * funsafe-math-optimizations: Optimize Options. (line 1100)
30292 * funsigned-bitfields <1>: Non-bugs. (line 57)
30293 * funsigned-bitfields <2>: Structures unions enumerations and bit-fields implementation.
30295 * funsigned-bitfields: C Dialect Options. (line 268)
30296 * funsigned-char <1>: Characters implementation.
30298 * funsigned-char: C Dialect Options. (line 240)
30299 * funswitch-loops: Optimize Options. (line 1283)
30300 * funwind-tables: Code Gen Options. (line 57)
30301 * fuse-cxa-atexit: C++ Dialect Options.
30303 * fvar-tracking: Debugging Options. (line 788)
30304 * fvariable-expansion-in-unroller: Optimize Options. (line 762)
30305 * fverbose-asm: Code Gen Options. (line 154)
30306 * fvisibility: Code Gen Options. (line 400)
30307 * fvisibility-inlines-hidden: C++ Dialect Options.
30309 * fvpt: Optimize Options. (line 1229)
30310 * fweb: Optimize Options. (line 1004)
30311 * fwhole-program: Optimize Options. (line 1015)
30312 * fwide-exec-charset: Preprocessor Options.
30314 * fworking-directory: Preprocessor Options.
30316 * fwrapv: Code Gen Options. (line 26)
30317 * fzero-link: Objective-C and Objective-C++ Dialect Options.
30319 * G <1>: System V Options. (line 10)
30320 * G <2>: RS/6000 and PowerPC Options.
30322 * G <3>: MIPS Options. (line 216)
30323 * G: M32R/D Options. (line 57)
30324 * g: Debugging Options. (line 10)
30325 * gcoff: Debugging Options. (line 70)
30326 * gdwarf-2: Debugging Options. (line 88)
30327 * gen-decls: Objective-C and Objective-C++ Dialect Options.
30329 * gfull: Darwin Options. (line 64)
30330 * ggdb: Debugging Options. (line 38)
30331 * gnu-ld: HPPA Options. (line 113)
30332 * gstabs: Debugging Options. (line 44)
30333 * gstabs+: Debugging Options. (line 64)
30334 * gused: Darwin Options. (line 59)
30335 * gvms: Debugging Options. (line 95)
30336 * gxcoff: Debugging Options. (line 75)
30337 * gxcoff+: Debugging Options. (line 80)
30338 * H: Preprocessor Options.
30340 * headerpad_max_install_names: Darwin Options. (line 190)
30341 * help <1>: Preprocessor Options.
30343 * help: Overall Options. (line 219)
30344 * hp-ld: HPPA Options. (line 125)
30345 * I <1>: Directory Options. (line 10)
30346 * I: Preprocessor Options.
30348 * I- <1>: Directory Options. (line 107)
30349 * I-: Preprocessor Options.
30351 * idirafter: Preprocessor Options.
30353 * if-conversion: Optimize Options. (line 442)
30354 * if-conversion2: Optimize Options. (line 451)
30355 * imacros: Preprocessor Options.
30357 * image_base: Darwin Options. (line 190)
30358 * imultilib: Preprocessor Options.
30360 * include: Preprocessor Options.
30362 * init: Darwin Options. (line 190)
30363 * install_name: Darwin Options. (line 190)
30364 * iprefix: Preprocessor Options.
30366 * iquote <1>: Directory Options. (line 31)
30367 * iquote: Preprocessor Options.
30369 * isysroot: Preprocessor Options.
30371 * isystem: Preprocessor Options.
30373 * iwithprefix: Preprocessor Options.
30375 * iwithprefixbefore: Preprocessor Options.
30377 * keep_private_externs: Darwin Options. (line 190)
30378 * L: Directory Options. (line 37)
30379 * l: Link Options. (line 26)
30380 * lobjc: Link Options. (line 53)
30381 * M: Preprocessor Options.
30383 * m1: SH Options. (line 9)
30384 * m10: PDP-11 Options. (line 29)
30385 * m128bit-long-double: i386 and x86-64 Options.
30387 * m16-bit: CRIS Options. (line 69)
30388 * m2: SH Options. (line 12)
30389 * m210: MCore Options. (line 43)
30390 * m3: SH Options. (line 18)
30391 * m31: S/390 and zSeries Options.
30393 * m32 <1>: SPARC Options. (line 189)
30394 * m32 <2>: RS/6000 and PowerPC Options.
30396 * m32: i386 and x86-64 Options.
30398 * m32-bit: CRIS Options. (line 69)
30399 * m32r: M32R/D Options. (line 15)
30400 * m32r2: M32R/D Options. (line 9)
30401 * m32rx: M32R/D Options. (line 12)
30402 * m340: MCore Options. (line 43)
30403 * m386: i386 and x86-64 Options.
30405 * m3dnow: i386 and x86-64 Options.
30407 * m3e: SH Options. (line 21)
30408 * m4: SH Options. (line 35)
30409 * m4-nofpu: SH Options. (line 24)
30410 * m4-single: SH Options. (line 31)
30411 * m4-single-only: SH Options. (line 27)
30412 * m40: PDP-11 Options. (line 23)
30413 * m45: PDP-11 Options. (line 26)
30414 * m486: i386 and x86-64 Options.
30416 * m4a: SH Options. (line 50)
30417 * m4a-nofpu: SH Options. (line 38)
30418 * m4a-single: SH Options. (line 46)
30419 * m4a-single-only: SH Options. (line 42)
30420 * m4al: SH Options. (line 53)
30421 * m4byte-functions: MCore Options. (line 27)
30422 * m5200: M680x0 Options. (line 59)
30423 * m64 <1>: SPARC Options. (line 189)
30424 * m64 <2>: S/390 and zSeries Options.
30426 * m64 <3>: RS/6000 and PowerPC Options.
30428 * m64: i386 and x86-64 Options.
30430 * m68000: M680x0 Options. (line 13)
30431 * m68020: M680x0 Options. (line 21)
30432 * m68020-40: M680x0 Options. (line 70)
30433 * m68020-60: M680x0 Options. (line 77)
30434 * m68030: M680x0 Options. (line 30)
30435 * m68040: M680x0 Options. (line 34)
30436 * m68060: M680x0 Options. (line 42)
30437 * m6811: M68hc1x Options. (line 13)
30438 * m6812: M68hc1x Options. (line 18)
30439 * m68881: M680x0 Options. (line 25)
30440 * m68hc11: M68hc1x Options. (line 13)
30441 * m68hc12: M68hc1x Options. (line 18)
30442 * m68hcs12: M68hc1x Options. (line 23)
30443 * m68S12: M68hc1x Options. (line 23)
30444 * m8-bit: CRIS Options. (line 69)
30445 * m96bit-long-double: i386 and x86-64 Options.
30447 * mabi <1>: RS/6000 and PowerPC Options.
30449 * mabi: ARM Options. (line 10)
30450 * mabi-mmixware: MMIX Options. (line 20)
30451 * mabi=32: MIPS Options. (line 89)
30452 * mabi=64: MIPS Options. (line 89)
30453 * mabi=eabi: MIPS Options. (line 89)
30454 * mabi=gnu: MMIX Options. (line 20)
30455 * mabi=ibmlongdouble: RS/6000 and PowerPC Options.
30457 * mabi=ieeelongdouble: RS/6000 and PowerPC Options.
30459 * mabi=n32: MIPS Options. (line 89)
30460 * mabi=no-spe: RS/6000 and PowerPC Options.
30462 * mabi=o64: MIPS Options. (line 89)
30463 * mabi=spe: RS/6000 and PowerPC Options.
30465 * mabicalls: MIPS Options. (line 100)
30466 * mabort-on-noreturn: ARM Options. (line 144)
30467 * mabshi: PDP-11 Options. (line 55)
30468 * mac0: PDP-11 Options. (line 16)
30469 * macc-4: FRV Options. (line 113)
30470 * macc-8: FRV Options. (line 116)
30471 * maccumulate-outgoing-args: i386 and x86-64 Options.
30473 * madjust-unroll: SH Options. (line 175)
30474 * mads: RS/6000 and PowerPC Options.
30476 * maix-struct-return: RS/6000 and PowerPC Options.
30478 * maix32: RS/6000 and PowerPC Options.
30480 * maix64: RS/6000 and PowerPC Options.
30482 * malign-300: H8/300 Options. (line 31)
30483 * malign-double: i386 and x86-64 Options.
30485 * malign-int: M680x0 Options. (line 132)
30486 * malign-labels: FRV Options. (line 104)
30487 * malign-loops: M32R/D Options. (line 73)
30488 * malign-natural: RS/6000 and PowerPC Options.
30490 * malign-power: RS/6000 and PowerPC Options.
30492 * malloc-cc: FRV Options. (line 25)
30493 * malpha-as: DEC Alpha Options. (line 159)
30494 * maltivec: RS/6000 and PowerPC Options.
30496 * mam33: MN10300 Options. (line 17)
30497 * maout: CRIS Options. (line 92)
30498 * mapcs: ARM Options. (line 22)
30499 * mapcs-frame: ARM Options. (line 14)
30500 * mapp-regs <1>: V850 Options. (line 57)
30501 * mapp-regs: SPARC Options. (line 10)
30502 * march <1>: S/390 and zSeries Options.
30504 * march <2>: MT Options. (line 9)
30505 * march <3>: MIPS Options. (line 14)
30506 * march <4>: i386 and x86-64 Options.
30508 * march <5>: HPPA Options. (line 9)
30509 * march <6>: CRIS Options. (line 10)
30510 * march: ARM Options. (line 109)
30511 * masm=DIALECT: i386 and x86-64 Options.
30513 * mauto-incdec: M68hc1x Options. (line 26)
30514 * mauto-pic: IA-64 Options. (line 50)
30515 * mb: SH Options. (line 58)
30516 * mbacc: MT Options. (line 16)
30517 * mbackchain: S/390 and zSeries Options.
30519 * mbase-addresses: MMIX Options. (line 54)
30520 * mbcopy: PDP-11 Options. (line 36)
30521 * mbig <1>: TMS320C3x/C4x Options.
30523 * mbig: RS/6000 and PowerPC Options.
30525 * mbig-endian <1>: RS/6000 and PowerPC Options.
30527 * mbig-endian <2>: MCore Options. (line 39)
30528 * mbig-endian <3>: IA-64 Options. (line 9)
30529 * mbig-endian: ARM Options. (line 72)
30530 * mbig-memory: TMS320C3x/C4x Options.
30532 * mbig-switch <1>: V850 Options. (line 52)
30533 * mbig-switch: HPPA Options. (line 23)
30534 * mbigtable: SH Options. (line 74)
30535 * mbit-align: RS/6000 and PowerPC Options.
30537 * mbitfield: M680x0 Options. (line 104)
30538 * mbk: TMS320C3x/C4x Options.
30540 * mbranch-cheap: PDP-11 Options. (line 65)
30541 * mbranch-cost=NUMBER: M32R/D Options. (line 82)
30542 * mbranch-expensive: PDP-11 Options. (line 61)
30543 * mbranch-likely: MIPS Options. (line 367)
30544 * mbranch-predict: MMIX Options. (line 49)
30545 * mbss-plt: RS/6000 and PowerPC Options.
30547 * mbuild-constants: DEC Alpha Options. (line 142)
30548 * mbwx: DEC Alpha Options. (line 171)
30549 * mc68000: M680x0 Options. (line 13)
30550 * mc68020: M680x0 Options. (line 21)
30551 * mcall-gnu: RS/6000 and PowerPC Options.
30553 * mcall-linux: RS/6000 and PowerPC Options.
30555 * mcall-netbsd: RS/6000 and PowerPC Options.
30557 * mcall-prologues: AVR Options. (line 43)
30558 * mcall-solaris: RS/6000 and PowerPC Options.
30560 * mcall-sysv: RS/6000 and PowerPC Options.
30562 * mcall-sysv-eabi: RS/6000 and PowerPC Options.
30564 * mcall-sysv-noeabi: RS/6000 and PowerPC Options.
30566 * mcallee-super-interworking: ARM Options. (line 234)
30567 * mcaller-super-interworking: ARM Options. (line 240)
30568 * mcallgraph-data: MCore Options. (line 31)
30569 * mcc-init: CRIS Options. (line 46)
30570 * mcfv4e: M680x0 Options. (line 66)
30571 * mcheck-zero-division: MIPS Options. (line 254)
30572 * mcirrus-fix-invalid-insns: ARM Options. (line 187)
30573 * mcix: DEC Alpha Options. (line 171)
30574 * mcmodel=embmedany: SPARC Options. (line 211)
30575 * mcmodel=kernel: i386 and x86-64 Options.
30577 * mcmodel=large: i386 and x86-64 Options.
30579 * mcmodel=medany: SPARC Options. (line 205)
30580 * mcmodel=medium: i386 and x86-64 Options.
30582 * mcmodel=medlow: SPARC Options. (line 194)
30583 * mcmodel=medmid: SPARC Options. (line 199)
30584 * mcmodel=small: i386 and x86-64 Options.
30586 * mcond-exec: FRV Options. (line 152)
30587 * mcond-move: FRV Options. (line 128)
30588 * mconst-align: CRIS Options. (line 60)
30589 * mconst16: Xtensa Options. (line 10)
30590 * mconstant-gp: IA-64 Options. (line 46)
30591 * mcpu <1>: TMS320C3x/C4x Options.
30593 * mcpu <2>: SPARC Options. (line 96)
30594 * mcpu <3>: RS/6000 and PowerPC Options.
30596 * mcpu <4>: i386 and x86-64 Options.
30598 * mcpu <5>: FRV Options. (line 212)
30599 * mcpu <6>: DEC Alpha Options. (line 223)
30600 * mcpu <7>: CRIS Options. (line 10)
30601 * mcpu <8>: ARM Options. (line 84)
30602 * mcpu: ARC Options. (line 23)
30603 * mcpu32: M680x0 Options. (line 51)
30604 * mcpu=: M32C Options. (line 7)
30605 * mcsync-anomaly: Blackfin Options. (line 23)
30606 * MD: Preprocessor Options.
30608 * mdalign: SH Options. (line 64)
30609 * mdata: ARC Options. (line 30)
30610 * mdata-align: CRIS Options. (line 60)
30611 * mdb: TMS320C3x/C4x Options.
30613 * mdebug <1>: S/390 and zSeries Options.
30615 * mdebug: M32R/D Options. (line 69)
30616 * mdec-asm: PDP-11 Options. (line 78)
30617 * mdisable-callt: V850 Options. (line 80)
30618 * mdisable-fpregs: HPPA Options. (line 33)
30619 * mdisable-indexing: HPPA Options. (line 40)
30620 * mdiv: MCore Options. (line 15)
30621 * mdiv=STRATEGY: SH Options. (line 127)
30622 * mdivide-breaks: MIPS Options. (line 259)
30623 * mdivide-traps: MIPS Options. (line 259)
30624 * mdivsi3_libfunc=NAME: SH Options. (line 168)
30625 * mdlmzb: RS/6000 and PowerPC Options.
30627 * mdouble: FRV Options. (line 38)
30628 * mdouble-float: MIPS Options. (line 173)
30629 * mdp-isr-reload: TMS320C3x/C4x Options.
30631 * mdsp: MIPS Options. (line 178)
30632 * mdwarf2-asm: IA-64 Options. (line 79)
30633 * mdword: FRV Options. (line 32)
30634 * mdynamic-no-pic: RS/6000 and PowerPC Options.
30636 * meabi: RS/6000 and PowerPC Options.
30638 * mearly-stop-bits: IA-64 Options. (line 85)
30639 * meb: Score Options. (line 9)
30640 * mel: Score Options. (line 12)
30641 * melf <1>: MMIX Options. (line 44)
30642 * melf: CRIS Options. (line 95)
30643 * melinux: CRIS Options. (line 99)
30644 * melinux-stacksize: CRIS Options. (line 25)
30645 * memb: RS/6000 and PowerPC Options.
30647 * membedded-data: MIPS Options. (line 225)
30648 * memregs=: M32C Options. (line 21)
30649 * mep: V850 Options. (line 16)
30650 * mepsilon: MMIX Options. (line 15)
30651 * mesa: S/390 and zSeries Options.
30653 * metrax100: CRIS Options. (line 31)
30654 * metrax4: CRIS Options. (line 31)
30655 * mexplicit-relocs <1>: MIPS Options. (line 245)
30656 * mexplicit-relocs: DEC Alpha Options. (line 184)
30657 * MF: Preprocessor Options.
30659 * mfast-fix: TMS320C3x/C4x Options.
30661 * mfast-indirect-calls: HPPA Options. (line 52)
30662 * mfaster-structs: SPARC Options. (line 71)
30663 * mfdpic: FRV Options. (line 56)
30664 * mfix: DEC Alpha Options. (line 171)
30665 * mfix-and-continue: Darwin Options. (line 97)
30666 * mfix-r4000: MIPS Options. (line 309)
30667 * mfix-r4400: MIPS Options. (line 323)
30668 * mfix-sb1: MIPS Options. (line 351)
30669 * mfix-vr4120: MIPS Options. (line 330)
30670 * mfix-vr4130: MIPS Options. (line 344)
30671 * mfixed-cc: FRV Options. (line 28)
30672 * mfixed-range <1>: IA-64 Options. (line 90)
30673 * mfixed-range: HPPA Options. (line 59)
30674 * mfloat-abi: ARM Options. (line 59)
30675 * mfloat-gprs: RS/6000 and PowerPC Options.
30677 * mfloat-ieee: DEC Alpha Options. (line 179)
30678 * mfloat-vax: DEC Alpha Options. (line 179)
30679 * mfloat32: PDP-11 Options. (line 52)
30680 * mfloat64: PDP-11 Options. (line 48)
30681 * mflush-func: MIPS Options. (line 357)
30682 * mflush-func=NAME: M32R/D Options. (line 94)
30683 * mflush-trap=NUMBER: M32R/D Options. (line 87)
30684 * mfmovd: SH Options. (line 78)
30685 * mfp: ARM Options. (line 119)
30686 * mfp-exceptions: MIPS Options. (line 378)
30687 * mfp-reg: DEC Alpha Options. (line 25)
30688 * mfp-rounding-mode: DEC Alpha Options. (line 85)
30689 * mfp-trap-mode: DEC Alpha Options. (line 63)
30690 * mfp32: MIPS Options. (line 156)
30691 * mfp64: MIPS Options. (line 159)
30692 * mfpe: ARM Options. (line 119)
30693 * mfpr-32: FRV Options. (line 13)
30694 * mfpr-64: FRV Options. (line 16)
30695 * mfprnd: RS/6000 and PowerPC Options.
30697 * mfpu <1>: SPARC Options. (line 20)
30698 * mfpu <2>: PDP-11 Options. (line 9)
30699 * mfpu: ARM Options. (line 119)
30700 * mfull-toc: RS/6000 and PowerPC Options.
30702 * mfused-madd <1>: Xtensa Options. (line 19)
30703 * mfused-madd <2>: S/390 and zSeries Options.
30705 * mfused-madd <3>: RS/6000 and PowerPC Options.
30707 * mfused-madd: MIPS Options. (line 294)
30708 * mg: VAX Options. (line 17)
30709 * MG: Preprocessor Options.
30711 * mgas <1>: HPPA Options. (line 75)
30712 * mgas: DEC Alpha Options. (line 159)
30713 * mgettrcost=NUMBER: SH Options. (line 190)
30714 * mglibc: GNU/Linux Options. (line 9)
30715 * mgnu: VAX Options. (line 13)
30716 * mgnu-as: IA-64 Options. (line 18)
30717 * mgnu-ld: IA-64 Options. (line 23)
30718 * mgotplt: CRIS Options. (line 86)
30719 * mgp32: MIPS Options. (line 150)
30720 * mgp64: MIPS Options. (line 153)
30721 * mgpr-32: FRV Options. (line 7)
30722 * mgpr-64: FRV Options. (line 10)
30723 * mgprel-ro: FRV Options. (line 79)
30724 * mh: H8/300 Options. (line 14)
30725 * mhard-float <1>: SPARC Options. (line 20)
30726 * mhard-float <2>: S/390 and zSeries Options.
30728 * mhard-float <3>: RS/6000 and PowerPC Options.
30730 * mhard-float <4>: MIPS Options. (line 162)
30731 * mhard-float <5>: FRV Options. (line 19)
30732 * mhard-float: ARM Options. (line 41)
30733 * mhard-quad-float: SPARC Options. (line 41)
30734 * mhardlit: MCore Options. (line 10)
30735 * mhitachi: SH Options. (line 81)
30736 * mid-shared-library: Blackfin Options. (line 39)
30737 * mieee <1>: SH Options. (line 96)
30738 * mieee: DEC Alpha Options. (line 39)
30739 * mieee-conformant: DEC Alpha Options. (line 134)
30740 * mieee-fp: i386 and x86-64 Options.
30742 * mieee-with-inexact: DEC Alpha Options. (line 52)
30743 * milp32: IA-64 Options. (line 114)
30744 * mimpure-text: SPARC Options. (line 81)
30745 * mindexed-addressing: SH Options. (line 180)
30746 * minit-stack: AVR Options. (line 35)
30747 * minline-all-stringops: i386 and x86-64 Options.
30749 * minline-float-divide-max-throughput: IA-64 Options. (line 58)
30750 * minline-float-divide-min-latency: IA-64 Options. (line 54)
30751 * minline-int-divide-max-throughput: IA-64 Options. (line 66)
30752 * minline-int-divide-min-latency: IA-64 Options. (line 62)
30753 * minline-plt: FRV Options. (line 64)
30754 * minline-sqrt-max-throughput: IA-64 Options. (line 74)
30755 * minline-sqrt-min-latency: IA-64 Options. (line 70)
30756 * minmax: M68hc1x Options. (line 31)
30757 * minsert-sched-nops: RS/6000 and PowerPC Options.
30759 * mint16: PDP-11 Options. (line 40)
30760 * mint32 <1>: PDP-11 Options. (line 44)
30761 * mint32: H8/300 Options. (line 28)
30762 * mint8: AVR Options. (line 53)
30763 * minvalid-symbols: SH Options. (line 213)
30764 * mips1: MIPS Options. (line 59)
30765 * mips16: MIPS Options. (line 81)
30766 * mips2: MIPS Options. (line 62)
30767 * mips3: MIPS Options. (line 65)
30768 * mips32: MIPS Options. (line 71)
30769 * mips32r2: MIPS Options. (line 74)
30770 * mips3d: MIPS Options. (line 190)
30771 * mips4: MIPS Options. (line 68)
30772 * mips64: MIPS Options. (line 77)
30773 * misel: RS/6000 and PowerPC Options.
30775 * misize: SH Options. (line 103)
30776 * missue-rate=NUMBER: M32R/D Options. (line 79)
30777 * mjump-in-delay: HPPA Options. (line 28)
30778 * mkernel: Darwin Options. (line 75)
30779 * mknuthdiv: MMIX Options. (line 33)
30780 * ml: SH Options. (line 61)
30781 * mlarge-data: DEC Alpha Options. (line 195)
30782 * mlarge-data-threshold=NUMBER: i386 and x86-64 Options.
30784 * mlarge-text: DEC Alpha Options. (line 213)
30785 * mlibfuncs: MMIX Options. (line 10)
30786 * mlibrary-pic: FRV Options. (line 110)
30787 * mlinked-fp: FRV Options. (line 94)
30788 * mlinker-opt: HPPA Options. (line 85)
30789 * mlinux: CRIS Options. (line 104)
30790 * mlittle: RS/6000 and PowerPC Options.
30792 * mlittle-endian <1>: SPARC Options. (line 183)
30793 * mlittle-endian <2>: RS/6000 and PowerPC Options.
30795 * mlittle-endian <3>: MCore Options. (line 39)
30796 * mlittle-endian <4>: IA-64 Options. (line 13)
30797 * mlittle-endian: ARM Options. (line 68)
30798 * mlong-calls <1>: V850 Options. (line 10)
30799 * mlong-calls <2>: MIPS Options. (line 280)
30800 * mlong-calls <3>: M68hc1x Options. (line 35)
30801 * mlong-calls <4>: FRV Options. (line 99)
30802 * mlong-calls <5>: Blackfin Options. (line 57)
30803 * mlong-calls: ARM Options. (line 149)
30804 * mlong-double-128: S/390 and zSeries Options.
30806 * mlong-double-64: S/390 and zSeries Options.
30808 * mlong-load-store: HPPA Options. (line 66)
30809 * mlong32: MIPS Options. (line 199)
30810 * mlong64: MIPS Options. (line 194)
30811 * mlongcall: RS/6000 and PowerPC Options.
30813 * mlongcalls: Xtensa Options. (line 60)
30814 * mloop-unsigned: TMS320C3x/C4x Options.
30816 * mlow-64k: Blackfin Options. (line 32)
30817 * mlp64: IA-64 Options. (line 114)
30818 * MM: Preprocessor Options.
30820 * mmac <1>: Score Options. (line 21)
30821 * mmac: CRX Options. (line 9)
30822 * mmad: MIPS Options. (line 289)
30823 * mmangle-cpu: ARC Options. (line 15)
30824 * mmax: DEC Alpha Options. (line 171)
30825 * mmax-stack-frame: CRIS Options. (line 22)
30826 * mmcu: AVR Options. (line 9)
30827 * MMD: Preprocessor Options.
30829 * mmedia: FRV Options. (line 44)
30830 * mmemcpy: MIPS Options. (line 274)
30831 * mmemory-latency: DEC Alpha Options. (line 266)
30832 * mmemparm: TMS320C3x/C4x Options.
30834 * mmfcrf: RS/6000 and PowerPC Options.
30836 * mminimal-toc: RS/6000 and PowerPC Options.
30838 * mmmx: i386 and x86-64 Options.
30840 * mmodel=large: M32R/D Options. (line 33)
30841 * mmodel=medium: M32R/D Options. (line 27)
30842 * mmodel=small: M32R/D Options. (line 18)
30843 * mmpyi: TMS320C3x/C4x Options.
30845 * mmul-bug-workaround: CRIS Options. (line 36)
30846 * mmuladd: FRV Options. (line 50)
30847 * mmulhw: RS/6000 and PowerPC Options.
30849 * mmult-bug: MN10300 Options. (line 9)
30850 * mmulti-cond-exec: FRV Options. (line 176)
30851 * mmultiple: RS/6000 and PowerPC Options.
30853 * mmvcle: S/390 and zSeries Options.
30855 * mmvme: RS/6000 and PowerPC Options.
30857 * mn: H8/300 Options. (line 20)
30858 * mnested-cond-exec: FRV Options. (line 189)
30859 * mnew-mnemonics: RS/6000 and PowerPC Options.
30861 * mnhwloop: Score Options. (line 15)
30862 * mno-3dnow: i386 and x86-64 Options.
30864 * mno-4byte-functions: MCore Options. (line 27)
30865 * mno-abicalls: MIPS Options. (line 100)
30866 * mno-abshi: PDP-11 Options. (line 58)
30867 * mno-ac0: PDP-11 Options. (line 20)
30868 * mno-align-double: i386 and x86-64 Options.
30870 * mno-align-int: M680x0 Options. (line 132)
30871 * mno-align-loops: M32R/D Options. (line 76)
30872 * mno-align-stringops: i386 and x86-64 Options.
30874 * mno-altivec: RS/6000 and PowerPC Options.
30876 * mno-am33: MN10300 Options. (line 20)
30877 * mno-app-regs <1>: V850 Options. (line 61)
30878 * mno-app-regs: SPARC Options. (line 10)
30879 * mno-bacc: MT Options. (line 19)
30880 * mno-backchain: S/390 and zSeries Options.
30882 * mno-base-addresses: MMIX Options. (line 54)
30883 * mno-bit-align: RS/6000 and PowerPC Options.
30885 * mno-bk: TMS320C3x/C4x Options.
30887 * mno-branch-likely: MIPS Options. (line 367)
30888 * mno-branch-predict: MMIX Options. (line 49)
30889 * mno-bwx: DEC Alpha Options. (line 171)
30890 * mno-callgraph-data: MCore Options. (line 31)
30891 * mno-check-zero-division: MIPS Options. (line 254)
30892 * mno-cirrus-fix-invalid-insns: ARM Options. (line 187)
30893 * mno-cix: DEC Alpha Options. (line 171)
30894 * mno-cond-exec: FRV Options. (line 158)
30895 * mno-cond-move: FRV Options. (line 134)
30896 * mno-const-align: CRIS Options. (line 60)
30897 * mno-const16: Xtensa Options. (line 10)
30898 * mno-crt0 <1>: MT Options. (line 25)
30899 * mno-crt0: MN10300 Options. (line 31)
30900 * mno-csync-anomaly: Blackfin Options. (line 28)
30901 * mno-data-align: CRIS Options. (line 60)
30902 * mno-db: TMS320C3x/C4x Options.
30904 * mno-debug: S/390 and zSeries Options.
30906 * mno-div: MCore Options. (line 15)
30907 * mno-dlmzb: RS/6000 and PowerPC Options.
30909 * mno-double: FRV Options. (line 41)
30910 * mno-dsp: MIPS Options. (line 178)
30911 * mno-dwarf2-asm: IA-64 Options. (line 79)
30912 * mno-dword: FRV Options. (line 35)
30913 * mno-eabi: RS/6000 and PowerPC Options.
30915 * mno-early-stop-bits: IA-64 Options. (line 85)
30916 * mno-eflags: FRV Options. (line 125)
30917 * mno-embedded-data: MIPS Options. (line 225)
30918 * mno-ep: V850 Options. (line 16)
30919 * mno-epsilon: MMIX Options. (line 15)
30920 * mno-explicit-relocs <1>: MIPS Options. (line 245)
30921 * mno-explicit-relocs: DEC Alpha Options. (line 184)
30922 * mno-fancy-math-387: i386 and x86-64 Options.
30924 * mno-fast-fix: TMS320C3x/C4x Options.
30926 * mno-faster-structs: SPARC Options. (line 71)
30927 * mno-fix: DEC Alpha Options. (line 171)
30928 * mno-fix-r4000: MIPS Options. (line 309)
30929 * mno-fix-r4400: MIPS Options. (line 323)
30930 * mno-float32: PDP-11 Options. (line 48)
30931 * mno-float64: PDP-11 Options. (line 52)
30932 * mno-flush-func: M32R/D Options. (line 99)
30933 * mno-flush-trap: M32R/D Options. (line 91)
30934 * mno-fp-in-toc: RS/6000 and PowerPC Options.
30936 * mno-fp-regs: DEC Alpha Options. (line 25)
30937 * mno-fp-ret-in-387: i386 and x86-64 Options.
30939 * mno-fprnd: RS/6000 and PowerPC Options.
30941 * mno-fpu: SPARC Options. (line 25)
30942 * mno-fused-madd <1>: Xtensa Options. (line 19)
30943 * mno-fused-madd <2>: S/390 and zSeries Options.
30945 * mno-fused-madd <3>: RS/6000 and PowerPC Options.
30947 * mno-fused-madd: MIPS Options. (line 294)
30948 * mno-gnu-as: IA-64 Options. (line 18)
30949 * mno-gnu-ld: IA-64 Options. (line 23)
30950 * mno-gotplt: CRIS Options. (line 86)
30951 * mno-hardlit: MCore Options. (line 10)
30952 * mno-id-shared-library: Blackfin Options. (line 45)
30953 * mno-ieee-fp: i386 and x86-64 Options.
30955 * mno-int16: PDP-11 Options. (line 44)
30956 * mno-int32: PDP-11 Options. (line 40)
30957 * mno-interrupts: AVR Options. (line 39)
30958 * mno-isel: RS/6000 and PowerPC Options.
30960 * mno-knuthdiv: MMIX Options. (line 33)
30961 * mno-libfuncs: MMIX Options. (line 10)
30962 * mno-long-calls <1>: V850 Options. (line 10)
30963 * mno-long-calls <2>: MIPS Options. (line 280)
30964 * mno-long-calls <3>: M68hc1x Options. (line 35)
30965 * mno-long-calls <4>: HPPA Options. (line 138)
30966 * mno-long-calls <5>: Blackfin Options. (line 57)
30967 * mno-long-calls: ARM Options. (line 149)
30968 * mno-longcall: RS/6000 and PowerPC Options.
30970 * mno-longcalls: Xtensa Options. (line 60)
30971 * mno-loop-unsigned: TMS320C3x/C4x Options.
30973 * mno-low-64k: Blackfin Options. (line 36)
30974 * mno-mad: MIPS Options. (line 289)
30975 * mno-max: DEC Alpha Options. (line 171)
30976 * mno-media: FRV Options. (line 47)
30977 * mno-memcpy: MIPS Options. (line 274)
30978 * mno-mfcrf: RS/6000 and PowerPC Options.
30980 * mno-mips16: MIPS Options. (line 81)
30981 * mno-mips3d: MIPS Options. (line 190)
30982 * mno-mmx: i386 and x86-64 Options.
30984 * mno-mpyi: TMS320C3x/C4x Options.
30986 * mno-mul-bug-workaround: CRIS Options. (line 36)
30987 * mno-muladd: FRV Options. (line 53)
30988 * mno-mulhw: RS/6000 and PowerPC Options.
30990 * mno-mult-bug: MN10300 Options. (line 13)
30991 * mno-multi-cond-exec: FRV Options. (line 183)
30992 * mno-multiple: RS/6000 and PowerPC Options.
30994 * mno-mvcle: S/390 and zSeries Options.
30996 * mno-nested-cond-exec: FRV Options. (line 195)
30997 * mno-optimize-membar: FRV Options. (line 205)
30998 * mno-pack: FRV Options. (line 122)
30999 * mno-packed-stack: S/390 and zSeries Options.
31001 * mno-paired-single: MIPS Options. (line 183)
31002 * mno-parallel-insns: TMS320C3x/C4x Options.
31004 * mno-parallel-mpy: TMS320C3x/C4x Options.
31006 * mno-pic: IA-64 Options. (line 26)
31007 * mno-popcntb: RS/6000 and PowerPC Options.
31009 * mno-power: RS/6000 and PowerPC Options.
31011 * mno-power2: RS/6000 and PowerPC Options.
31013 * mno-powerpc: RS/6000 and PowerPC Options.
31015 * mno-powerpc-gfxopt: RS/6000 and PowerPC Options.
31017 * mno-powerpc-gpopt: RS/6000 and PowerPC Options.
31019 * mno-powerpc64: RS/6000 and PowerPC Options.
31021 * mno-prolog-function: V850 Options. (line 23)
31022 * mno-prologue-epilogue: CRIS Options. (line 76)
31023 * mno-prototype: RS/6000 and PowerPC Options.
31025 * mno-push-args: i386 and x86-64 Options.
31027 * mno-register-names: IA-64 Options. (line 37)
31028 * mno-regnames: RS/6000 and PowerPC Options.
31030 * mno-relax-immediate: MCore Options. (line 19)
31031 * mno-relocatable: RS/6000 and PowerPC Options.
31033 * mno-relocatable-lib: RS/6000 and PowerPC Options.
31035 * mno-rptb: TMS320C3x/C4x Options.
31037 * mno-rpts: TMS320C3x/C4x Options.
31039 * mno-scc: FRV Options. (line 146)
31040 * mno-sched-ar-data-spec: IA-64 Options. (line 128)
31041 * mno-sched-ar-in-data-spec: IA-64 Options. (line 149)
31042 * mno-sched-br-data-spec: IA-64 Options. (line 121)
31043 * mno-sched-br-in-data-spec: IA-64 Options. (line 142)
31044 * mno-sched-control-ldc: IA-64 Options. (line 168)
31045 * mno-sched-control-spec: IA-64 Options. (line 135)
31046 * mno-sched-count-spec-in-critical-path: IA-64 Options. (line 194)
31047 * mno-sched-in-control-spec: IA-64 Options. (line 156)
31048 * mno-sched-ldc: IA-64 Options. (line 162)
31049 * mno-sched-prefer-non-control-spec-insns: IA-64 Options. (line 187)
31050 * mno-sched-prefer-non-data-spec-insns: IA-64 Options. (line 180)
31051 * mno-sched-prolog: ARM Options. (line 32)
31052 * mno-sched-spec-verbose: IA-64 Options. (line 176)
31053 * mno-sdata <1>: RS/6000 and PowerPC Options.
31055 * mno-sdata: IA-64 Options. (line 42)
31056 * mno-side-effects: CRIS Options. (line 51)
31057 * mno-single-exit: MMIX Options. (line 66)
31058 * mno-slow-bytes: MCore Options. (line 35)
31059 * mno-small-exec: S/390 and zSeries Options.
31061 * mno-soft-float: DEC Alpha Options. (line 10)
31062 * mno-space-regs: HPPA Options. (line 45)
31063 * mno-spe: RS/6000 and PowerPC Options.
31065 * mno-specld-anomaly: Blackfin Options. (line 19)
31066 * mno-split: PDP-11 Options. (line 71)
31067 * mno-split-addresses: MIPS Options. (line 239)
31068 * mno-sse: i386 and x86-64 Options.
31070 * mno-stack-align: CRIS Options. (line 60)
31071 * mno-stack-bias: SPARC Options. (line 220)
31072 * mno-strict-align <1>: RS/6000 and PowerPC Options.
31074 * mno-strict-align: M680x0 Options. (line 152)
31075 * mno-string: RS/6000 and PowerPC Options.
31077 * mno-sum-in-toc: RS/6000 and PowerPC Options.
31079 * mno-svr3-shlib: i386 and x86-64 Options.
31081 * mno-swdiv: RS/6000 and PowerPC Options.
31083 * mno-sym32: MIPS Options. (line 209)
31084 * mno-tablejump: AVR Options. (line 47)
31085 * mno-target-align: Xtensa Options. (line 47)
31086 * mno-text-section-literals: Xtensa Options. (line 35)
31087 * mno-toc: RS/6000 and PowerPC Options.
31089 * mno-toplevel-symbols: MMIX Options. (line 40)
31090 * mno-tpf-trace: S/390 and zSeries Options.
31092 * mno-unaligned-doubles: SPARC Options. (line 59)
31093 * mno-uninit-const-in-rodata: MIPS Options. (line 233)
31094 * mno-update: RS/6000 and PowerPC Options.
31096 * mno-v8plus: SPARC Options. (line 168)
31097 * mno-vis: SPARC Options. (line 175)
31098 * mno-vliw-branch: FRV Options. (line 170)
31099 * mno-volatile-asm-stop: IA-64 Options. (line 32)
31100 * mno-vrsave: RS/6000 and PowerPC Options.
31102 * mno-wide-bitfields: MCore Options. (line 23)
31103 * mno-xgot: MIPS Options. (line 127)
31104 * mno-xl-compat: RS/6000 and PowerPC Options.
31106 * mno-zero-extend: MMIX Options. (line 27)
31107 * mnobitfield: M680x0 Options. (line 100)
31108 * mnomacsave: SH Options. (line 92)
31109 * mnominmax: M68hc1x Options. (line 31)
31110 * mnop-fun-dllimport: ARM Options. (line 174)
31111 * mold-mnemonics: RS/6000 and PowerPC Options.
31113 * momit-leaf-frame-pointer <1>: i386 and x86-64 Options.
31115 * momit-leaf-frame-pointer: Blackfin Options. (line 7)
31116 * mone-byte-bool: Darwin Options. (line 83)
31117 * moptimize-membar: FRV Options. (line 201)
31118 * MP: Preprocessor Options.
31120 * mpa-risc-1-0: HPPA Options. (line 19)
31121 * mpa-risc-1-1: HPPA Options. (line 19)
31122 * mpa-risc-2-0: HPPA Options. (line 19)
31123 * mpack: FRV Options. (line 119)
31124 * mpacked-stack: S/390 and zSeries Options.
31126 * mpadstruct: SH Options. (line 106)
31127 * mpaired-single: MIPS Options. (line 183)
31128 * mparallel-insns: TMS320C3x/C4x Options.
31130 * mparallel-mpy: TMS320C3x/C4x Options.
31132 * mparanoid: TMS320C3x/C4x Options.
31134 * mpcrel: M680x0 Options. (line 144)
31135 * mpdebug: CRIS Options. (line 40)
31136 * mpe: RS/6000 and PowerPC Options.
31138 * mpentium: i386 and x86-64 Options.
31140 * mpentiumpro: i386 and x86-64 Options.
31142 * mpic-register: ARM Options. (line 183)
31143 * mpoke-function-name: ARM Options. (line 197)
31144 * mpopcntb: RS/6000 and PowerPC Options.
31146 * mportable-runtime: HPPA Options. (line 71)
31147 * mpower: RS/6000 and PowerPC Options.
31149 * mpower2: RS/6000 and PowerPC Options.
31151 * mpowerpc: RS/6000 and PowerPC Options.
31153 * mpowerpc-gfxopt: RS/6000 and PowerPC Options.
31155 * mpowerpc-gpopt: RS/6000 and PowerPC Options.
31157 * mpowerpc64: RS/6000 and PowerPC Options.
31159 * mprefergot: SH Options. (line 113)
31160 * mpreferred-stack-boundary: i386 and x86-64 Options.
31162 * mprioritize-restricted-insns: RS/6000 and PowerPC Options.
31164 * mprolog-function: V850 Options. (line 23)
31165 * mprologue-epilogue: CRIS Options. (line 76)
31166 * mprototype: RS/6000 and PowerPC Options.
31168 * mpt-fixed: SH Options. (line 194)
31169 * mpush-args <1>: i386 and x86-64 Options.
31171 * mpush-args: CRX Options. (line 13)
31172 * MQ: Preprocessor Options.
31174 * mregister-names: IA-64 Options. (line 37)
31175 * mregnames: RS/6000 and PowerPC Options.
31177 * mregparm <1>: TMS320C3x/C4x Options.
31179 * mregparm: i386 and x86-64 Options.
31181 * mrelax <1>: SH Options. (line 70)
31182 * mrelax <2>: MN10300 Options. (line 34)
31183 * mrelax: H8/300 Options. (line 9)
31184 * mrelax-immediate: MCore Options. (line 19)
31185 * mrelocatable: RS/6000 and PowerPC Options.
31187 * mrelocatable-lib: RS/6000 and PowerPC Options.
31189 * mreturn-pointer-on-d0: MN10300 Options. (line 24)
31190 * mrodata: ARC Options. (line 30)
31191 * mrptb: TMS320C3x/C4x Options.
31193 * mrpts: TMS320C3x/C4x Options.
31195 * mrtd <1>: Function Attributes.
31197 * mrtd <2>: M680x0 Options. (line 109)
31198 * mrtd: i386 and x86-64 Options.
31200 * ms: H8/300 Options. (line 17)
31201 * ms2600: H8/300 Options. (line 24)
31202 * mscc: FRV Options. (line 140)
31203 * msched-ar-data-spec: IA-64 Options. (line 128)
31204 * msched-ar-in-data-spec: IA-64 Options. (line 149)
31205 * msched-br-data-spec: IA-64 Options. (line 121)
31206 * msched-br-in-data-spec: IA-64 Options. (line 142)
31207 * msched-control-ldc: IA-64 Options. (line 168)
31208 * msched-control-spec: IA-64 Options. (line 135)
31209 * msched-costly-dep: RS/6000 and PowerPC Options.
31211 * msched-count-spec-in-critical-path: IA-64 Options. (line 194)
31212 * msched-in-control-spec: IA-64 Options. (line 156)
31213 * msched-ldc: IA-64 Options. (line 162)
31214 * msched-prefer-non-control-spec-insns: IA-64 Options. (line 187)
31215 * msched-prefer-non-data-spec-insns: IA-64 Options. (line 180)
31216 * msched-spec-verbose: IA-64 Options. (line 176)
31217 * mschedule: HPPA Options. (line 78)
31218 * mscore5: Score Options. (line 25)
31219 * mscore5u: Score Options. (line 28)
31220 * mscore7: Score Options. (line 31)
31221 * mscore7d: Score Options. (line 34)
31222 * msda: V850 Options. (line 40)
31223 * msdata <1>: RS/6000 and PowerPC Options.
31225 * msdata: IA-64 Options. (line 42)
31226 * msdata-data: RS/6000 and PowerPC Options.
31228 * msdata=default: RS/6000 and PowerPC Options.
31230 * msdata=eabi: RS/6000 and PowerPC Options.
31232 * msdata=none <1>: RS/6000 and PowerPC Options.
31234 * msdata=none: M32R/D Options. (line 40)
31235 * msdata=sdata: M32R/D Options. (line 49)
31236 * msdata=sysv: RS/6000 and PowerPC Options.
31238 * msdata=use: M32R/D Options. (line 53)
31239 * msecure-plt: RS/6000 and PowerPC Options.
31241 * mshared-library-id: Blackfin Options. (line 49)
31242 * mshort <1>: M68hc1x Options. (line 40)
31243 * mshort: M680x0 Options. (line 94)
31244 * msim <1>: Xstormy16 Options. (line 9)
31245 * msim <2>: RS/6000 and PowerPC Options.
31247 * msim <3>: MT Options. (line 22)
31248 * msim: M32C Options. (line 13)
31249 * msingle-exit: MMIX Options. (line 66)
31250 * msingle-float: MIPS Options. (line 169)
31251 * msingle-pic-base: ARM Options. (line 177)
31252 * msio: HPPA Options. (line 107)
31253 * msize: AVR Options. (line 32)
31254 * mslow-bytes: MCore Options. (line 35)
31255 * msmall: TMS320C3x/C4x Options.
31257 * msmall-data: DEC Alpha Options. (line 195)
31258 * msmall-exec: S/390 and zSeries Options.
31260 * msmall-memory: TMS320C3x/C4x Options.
31262 * msmall-text: DEC Alpha Options. (line 213)
31263 * msoft-float <1>: SPARC Options. (line 25)
31264 * msoft-float <2>: S/390 and zSeries Options.
31266 * msoft-float <3>: RS/6000 and PowerPC Options.
31268 * msoft-float <4>: PDP-11 Options. (line 13)
31269 * msoft-float <5>: MIPS Options. (line 165)
31270 * msoft-float <6>: M680x0 Options. (line 84)
31271 * msoft-float <7>: i386 and x86-64 Options.
31273 * msoft-float <8>: HPPA Options. (line 91)
31274 * msoft-float <9>: FRV Options. (line 22)
31275 * msoft-float <10>: DEC Alpha Options. (line 10)
31276 * msoft-float: ARM Options. (line 45)
31277 * msoft-quad-float: SPARC Options. (line 45)
31278 * msoft-reg-count: M68hc1x Options. (line 43)
31279 * mspace <1>: V850 Options. (line 30)
31280 * mspace: SH Options. (line 110)
31281 * mspe: RS/6000 and PowerPC Options.
31283 * mspecld-anomaly: Blackfin Options. (line 14)
31284 * msplit: PDP-11 Options. (line 68)
31285 * msplit-addresses: MIPS Options. (line 239)
31286 * msse: i386 and x86-64 Options.
31288 * msseregparm: i386 and x86-64 Options.
31290 * mstack-align: CRIS Options. (line 60)
31291 * mstack-bias: SPARC Options. (line 220)
31292 * mstack-guard: S/390 and zSeries Options.
31294 * mstack-size: S/390 and zSeries Options.
31296 * mstackrealign: i386 and x86-64 Options.
31298 * mstrict-align <1>: RS/6000 and PowerPC Options.
31300 * mstrict-align: M680x0 Options. (line 152)
31301 * mstring: RS/6000 and PowerPC Options.
31303 * mstructure-size-boundary: ARM Options. (line 129)
31304 * msvr3-shlib: i386 and x86-64 Options.
31306 * msvr4-struct-return: RS/6000 and PowerPC Options.
31308 * mswdiv: RS/6000 and PowerPC Options.
31310 * msym32: MIPS Options. (line 209)
31311 * mt: IA-64 Options. (line 106)
31312 * MT: Preprocessor Options.
31314 * mtarget-align: Xtensa Options. (line 47)
31315 * mtda: V850 Options. (line 34)
31316 * mtext: ARC Options. (line 30)
31317 * mtext-section-literals: Xtensa Options. (line 35)
31318 * mthreads: i386 and x86-64 Options.
31320 * mthumb: ARM Options. (line 218)
31321 * mthumb-interwork: ARM Options. (line 25)
31322 * mti: TMS320C3x/C4x Options.
31324 * mtiny-stack: AVR Options. (line 50)
31325 * mtls-direct-seg-refs: i386 and x86-64 Options.
31327 * mtls-size: IA-64 Options. (line 97)
31328 * mtoc: RS/6000 and PowerPC Options.
31330 * mtomcat-stats: FRV Options. (line 209)
31331 * mtoplevel-symbols: MMIX Options. (line 40)
31332 * mtp: ARM Options. (line 246)
31333 * mtpcs-frame: ARM Options. (line 222)
31334 * mtpcs-leaf-frame: ARM Options. (line 228)
31335 * mtpf-trace: S/390 and zSeries Options.
31337 * mtrap-precision: DEC Alpha Options. (line 109)
31338 * mtune <1>: SPARC Options. (line 156)
31339 * mtune <2>: S/390 and zSeries Options.
31341 * mtune <3>: RS/6000 and PowerPC Options.
31343 * mtune <4>: MIPS Options. (line 44)
31344 * mtune <5>: IA-64 Options. (line 101)
31345 * mtune <6>: i386 and x86-64 Options.
31347 * mtune <7>: DEC Alpha Options. (line 262)
31348 * mtune <8>: CRIS Options. (line 16)
31349 * mtune: ARM Options. (line 99)
31350 * muclibc: GNU/Linux Options. (line 13)
31351 * muls: Score Options. (line 18)
31352 * multcost=NUMBER: SH Options. (line 124)
31353 * multi_module: Darwin Options. (line 190)
31354 * multilib-library-pic: FRV Options. (line 89)
31355 * multiply_defined: Darwin Options. (line 190)
31356 * multiply_defined_unused: Darwin Options. (line 190)
31357 * munaligned-doubles: SPARC Options. (line 59)
31358 * muninit-const-in-rodata: MIPS Options. (line 233)
31359 * munix: VAX Options. (line 9)
31360 * munix-asm: PDP-11 Options. (line 74)
31361 * mupdate: RS/6000 and PowerPC Options.
31363 * musermode: SH Options. (line 118)
31364 * mv850: V850 Options. (line 49)
31365 * mv850e: V850 Options. (line 69)
31366 * mv850e1: V850 Options. (line 64)
31367 * mv8plus: SPARC Options. (line 168)
31368 * mvis: SPARC Options. (line 175)
31369 * mvliw-branch: FRV Options. (line 164)
31370 * mvms-return-codes: DEC Alpha/VMS Options.
31372 * mvolatile-asm-stop: IA-64 Options. (line 32)
31373 * mvr4130-align: MIPS Options. (line 388)
31374 * mvrsave: RS/6000 and PowerPC Options.
31376 * mvxworks: RS/6000 and PowerPC Options.
31378 * mwarn-dynamicstack: S/390 and zSeries Options.
31380 * mwarn-framesize: S/390 and zSeries Options.
31382 * mwide-bitfields: MCore Options. (line 23)
31383 * mwindiss: RS/6000 and PowerPC Options.
31385 * mwords-little-endian: ARM Options. (line 76)
31386 * mxgot: MIPS Options. (line 127)
31387 * mxl-compat: RS/6000 and PowerPC Options.
31389 * myellowknife: RS/6000 and PowerPC Options.
31391 * mzarch: S/390 and zSeries Options.
31393 * mzda: V850 Options. (line 45)
31394 * mzero-extend: MMIX Options. (line 27)
31395 * no-integrated-cpp: C Dialect Options. (line 217)
31396 * no-red-zone: i386 and x86-64 Options.
31398 * no_dead_strip_inits_and_terms: Darwin Options. (line 190)
31399 * noall_load: Darwin Options. (line 190)
31400 * nocpp: MIPS Options. (line 304)
31401 * nodefaultlibs: Link Options. (line 62)
31402 * nofixprebinding: Darwin Options. (line 190)
31403 * nolibdld: HPPA Options. (line 190)
31404 * nomultidefs: Darwin Options. (line 190)
31405 * noprebind: Darwin Options. (line 190)
31406 * noseglinkedit: Darwin Options. (line 190)
31407 * nostartfiles: Link Options. (line 57)
31408 * nostdinc: Preprocessor Options.
31410 * nostdinc++ <1>: Preprocessor Options.
31412 * nostdinc++: C++ Dialect Options.
31414 * nostdlib: Link Options. (line 71)
31415 * o: Preprocessor Options.
31417 * O: Optimize Options. (line 32)
31418 * o: Overall Options. (line 175)
31419 * O0: Optimize Options. (line 104)
31420 * O1: Optimize Options. (line 32)
31421 * O2: Optimize Options. (line 63)
31422 * O3: Optimize Options. (line 99)
31423 * Os: Optimize Options. (line 107)
31424 * P: Preprocessor Options.
31426 * p: Debugging Options. (line 200)
31427 * pagezero_size: Darwin Options. (line 190)
31428 * param: Optimize Options. (line 1358)
31429 * pass-exit-codes: Overall Options. (line 133)
31430 * pedantic <1>: Warnings and Errors.
31432 * pedantic <2>: Alternate Keywords. (line 29)
31433 * pedantic <3>: C Extensions. (line 6)
31434 * pedantic <4>: Preprocessor Options.
31436 * pedantic <5>: Warning Options. (line 27)
31437 * pedantic: Standards. (line 13)
31438 * pedantic-errors <1>: Warnings and Errors.
31440 * pedantic-errors <2>: Non-bugs. (line 216)
31441 * pedantic-errors <3>: Preprocessor Options.
31443 * pedantic-errors <4>: Warning Options. (line 69)
31444 * pedantic-errors: Standards. (line 13)
31445 * pg: Debugging Options. (line 206)
31446 * pie: Link Options. (line 92)
31447 * pipe: Overall Options. (line 197)
31448 * prebind: Darwin Options. (line 190)
31449 * prebind_all_twolevel_modules: Darwin Options. (line 190)
31450 * preprocessor: Preprocessor Options.
31452 * print-file-name: Debugging Options. (line 798)
31453 * print-libgcc-file-name: Debugging Options. (line 819)
31454 * print-multi-directory: Debugging Options. (line 804)
31455 * print-multi-lib: Debugging Options. (line 809)
31456 * print-objc-runtime-info: Objective-C and Objective-C++ Dialect Options.
31458 * print-prog-name: Debugging Options. (line 816)
31459 * print-search-dirs: Debugging Options. (line 827)
31460 * private_bundle: Darwin Options. (line 190)
31461 * pthread <1>: SPARC Options. (line 240)
31462 * pthread <2>: RS/6000 and PowerPC Options.
31464 * pthread: IA-64 Options. (line 106)
31465 * pthreads: SPARC Options. (line 234)
31466 * Q: Debugging Options. (line 212)
31467 * Qn: System V Options. (line 18)
31468 * Qy: System V Options. (line 14)
31469 * rdynamic: Link Options. (line 98)
31470 * read_only_relocs: Darwin Options. (line 190)
31471 * remap: Preprocessor Options.
31473 * s: Link Options. (line 105)
31474 * S <1>: Link Options. (line 20)
31475 * S: Overall Options. (line 158)
31476 * save-temps: Debugging Options. (line 760)
31477 * sectalign: Darwin Options. (line 190)
31478 * sectcreate: Darwin Options. (line 190)
31479 * sectobjectsymbols: Darwin Options. (line 190)
31480 * sectorder: Darwin Options. (line 190)
31481 * seg1addr: Darwin Options. (line 190)
31482 * seg_addr_table: Darwin Options. (line 190)
31483 * seg_addr_table_filename: Darwin Options. (line 190)
31484 * segaddr: Darwin Options. (line 190)
31485 * seglinkedit: Darwin Options. (line 190)
31486 * segprot: Darwin Options. (line 190)
31487 * segs_read_only_addr: Darwin Options. (line 190)
31488 * segs_read_write_addr: Darwin Options. (line 190)
31489 * shared: Link Options. (line 114)
31490 * shared-libgcc: Link Options. (line 122)
31491 * sim: CRIS Options. (line 108)
31492 * sim2: CRIS Options. (line 114)
31493 * single_module: Darwin Options. (line 190)
31494 * specs: Directory Options. (line 84)
31495 * static <1>: HPPA Options. (line 194)
31496 * static <2>: Darwin Options. (line 190)
31497 * static: Link Options. (line 109)
31498 * static-libgcc: Link Options. (line 122)
31499 * std <1>: Non-bugs. (line 107)
31500 * std <2>: Other Builtins. (line 22)
31501 * std <3>: C Dialect Options. (line 47)
31502 * std: Standards. (line 13)
31503 * std=: Preprocessor Options.
31505 * sub_library: Darwin Options. (line 190)
31506 * sub_umbrella: Darwin Options. (line 190)
31507 * symbolic: Link Options. (line 157)
31508 * sysroot: Directory Options. (line 92)
31509 * target-help <1>: Preprocessor Options.
31511 * target-help: Overall Options. (line 228)
31512 * threads <1>: SPARC Options. (line 228)
31513 * threads: HPPA Options. (line 207)
31514 * time: Debugging Options. (line 774)
31515 * tls: FRV Options. (line 75)
31516 * TLS: FRV Options. (line 72)
31517 * traditional <1>: Incompatibilities. (line 6)
31518 * traditional: C Dialect Options. (line 229)
31519 * traditional-cpp <1>: Preprocessor Options.
31521 * traditional-cpp: C Dialect Options. (line 229)
31522 * trigraphs <1>: Preprocessor Options.
31524 * trigraphs: C Dialect Options. (line 213)
31525 * twolevel_namespace: Darwin Options. (line 190)
31526 * u: Link Options. (line 179)
31527 * U: Preprocessor Options.
31529 * umbrella: Darwin Options. (line 190)
31530 * undef: Preprocessor Options.
31532 * undefined: Darwin Options. (line 190)
31533 * unexported_symbols_list: Darwin Options. (line 190)
31534 * V: Target Options. (line 24)
31535 * v <1>: Preprocessor Options.
31537 * v: Overall Options. (line 186)
31538 * version <1>: Preprocessor Options.
31540 * version: Overall Options. (line 232)
31541 * W: Incompatibilities. (line 64)
31542 * w: Preprocessor Options.
31544 * W: Warning Options. (line 593)
31545 * w: Warning Options. (line 73)
31546 * Wa: Assembler Options. (line 9)
31547 * Wabi: C++ Dialect Options.
31549 * Waddress: Warning Options. (line 865)
31550 * Waggregate-return: Warning Options. (line 878)
31551 * Wall <1>: Standard Libraries. (line 6)
31552 * Wall <2>: Preprocessor Options.
31554 * Wall: Warning Options. (line 577)
31555 * Wassign-intercept: Objective-C and Objective-C++ Dialect Options.
31557 * Wattributes: Warning Options. (line 883)
31558 * Wbad-function-cast: Warning Options. (line 813)
31559 * Wcast-align: Warning Options. (line 827)
31560 * Wcast-qual: Warning Options. (line 822)
31561 * Wchar-subscripts: Warning Options. (line 79)
31562 * Wcomment <1>: Preprocessor Options.
31564 * Wcomment: Warning Options. (line 84)
31565 * Wcomments: Preprocessor Options.
31567 * Wconversion <1>: Protoize Caveats. (line 31)
31568 * Wconversion: Warning Options. (line 845)
31569 * Wctor-dtor-privacy: C++ Dialect Options.
31571 * Wdeclaration-after-statement: Warning Options. (line 775)
31572 * Wdisabled-optimization: Warning Options. (line 1136)
31573 * Wdiv-by-zero: Warning Options. (line 667)
31574 * weak_reference_mismatches: Darwin Options. (line 190)
31575 * Weffc++: C++ Dialect Options.
31577 * Wendif-labels <1>: Preprocessor Options.
31579 * Wendif-labels: Warning Options. (line 785)
31580 * Werror <1>: Preprocessor Options.
31582 * Werror: Warning Options. (line 1151)
31583 * Werror-implicit-function-declaration: Warning Options. (line 198)
31584 * Werror=: Warning Options. (line 1154)
31585 * Wextra: Warning Options. (line 593)
31586 * Wfatal-errors: Warning Options. (line 89)
31587 * Wfloat-equal: Warning Options. (line 683)
31588 * Wformat <1>: Function Attributes.
31590 * Wformat: Warning Options. (line 94)
31591 * Wformat-nonliteral <1>: Function Attributes.
31593 * Wformat-nonliteral: Warning Options. (line 151)
31594 * Wformat-security: Warning Options. (line 156)
31595 * Wformat-y2k: Warning Options. (line 129)
31596 * Wformat=2: Warning Options. (line 167)
31597 * Wframe-larger-than: Warning Options. (line 797)
31598 * whatsloaded: Darwin Options. (line 190)
31599 * whyload: Darwin Options. (line 190)
31600 * Wimplicit: Warning Options. (line 204)
31601 * Wimplicit-function-declaration: Warning Options. (line 198)
31602 * Wimplicit-int: Warning Options. (line 193)
31603 * Wimport: Preprocessor Options.
31605 * Winit-self: Warning Options. (line 179)
31606 * Winline <1>: Inline. (line 42)
31607 * Winline: Warning Options. (line 1076)
31608 * Winvalid-pch: Warning Options. (line 1111)
31609 * Wl: Link Options. (line 175)
31610 * Wlarger-than: Warning Options. (line 794)
31611 * Wlong-long: Warning Options. (line 1115)
31612 * Wmain: Warning Options. (line 208)
31613 * Wmissing-braces: Warning Options. (line 214)
31614 * Wmissing-declarations: Warning Options. (line 905)
31615 * Wmissing-field-initializers: Warning Options. (line 911)
31616 * Wmissing-format-attribute: Warning Options. (line 937)
31617 * Wmissing-include-dirs: Warning Options. (line 224)
31618 * Wmissing-noreturn: Warning Options. (line 929)
31619 * Wmissing-prototypes: Warning Options. (line 899)
31620 * Wmultichar: Warning Options. (line 956)
31621 * Wnested-externs: Warning Options. (line 1051)
31622 * Wno-address: Warning Options. (line 865)
31623 * Wno-attributes: Warning Options. (line 883)
31624 * Wno-deprecated: C++ Dialect Options.
31626 * Wno-deprecated-declarations: Warning Options. (line 1005)
31627 * Wno-div-by-zero: Warning Options. (line 667)
31628 * Wno-endif-labels: Warning Options. (line 785)
31629 * Wno-format-extra-args: Warning Options. (line 133)
31630 * Wno-format-zero-length: Warning Options. (line 147)
31631 * Wno-import: Warning Options. (line 76)
31632 * Wno-int-to-pointer-cast: Warning Options. (line 1103)
31633 * Wno-invalid-offsetof: Warning Options. (line 1089)
31634 * Wno-long-long: Warning Options. (line 1115)
31635 * Wno-multichar: Warning Options. (line 956)
31636 * Wno-non-template-friend: C++ Dialect Options.
31638 * Wno-overflow: Warning Options. (line 1011)
31639 * Wno-pmf-conversions <1>: Bound member functions.
31641 * Wno-pmf-conversions: C++ Dialect Options.
31643 * Wno-pointer-sign: Warning Options. (line 1145)
31644 * Wno-pointer-to-int-cast: Warning Options. (line 1107)
31645 * Wno-pragmas: Warning Options. (line 479)
31646 * Wno-protocol: Objective-C and Objective-C++ Dialect Options.
31648 * Wno-variadic-macros: Warning Options. (line 1121)
31649 * Wno-vla: Warning Options. (line 1127)
31650 * Wno-volatile-register-var: Warning Options. (line 1131)
31651 * Wnon-virtual-dtor: C++ Dialect Options.
31653 * Wnonnull: Warning Options. (line 172)
31654 * Wnormalized: Warning Options. (line 962)
31655 * Wold-style-cast: C++ Dialect Options.
31657 * Wold-style-definition: Warning Options. (line 895)
31658 * Woverlength-strings: Warning Options. (line 1173)
31659 * Woverloaded-virtual: C++ Dialect Options.
31661 * Woverride-init: Warning Options. (line 1014)
31662 * Wp: Preprocessor Options.
31664 * Wpacked: Warning Options. (line 1022)
31665 * Wpadded: Warning Options. (line 1039)
31666 * Wparentheses: Warning Options. (line 227)
31667 * Wpointer-arith <1>: Pointer Arith. (line 13)
31668 * Wpointer-arith: Warning Options. (line 807)
31669 * Wpointer-sign: Warning Options. (line 1145)
31670 * Wpragmas: Warning Options. (line 479)
31671 * Wredundant-decls: Warning Options. (line 1046)
31672 * Wreorder: C++ Dialect Options.
31674 * Wreturn-type: Warning Options. (line 317)
31675 * Wselector: Objective-C and Objective-C++ Dialect Options.
31677 * Wsequence-point: Warning Options. (line 271)
31678 * Wshadow: Warning Options. (line 789)
31679 * Wsign-compare: Warning Options. (line 858)
31680 * Wsign-promo: C++ Dialect Options.
31682 * Wstack-protector: Warning Options. (line 1168)
31683 * Wstrict-aliasing: Warning Options. (line 484)
31684 * Wstrict-aliasing=n: Warning Options. (line 492)
31685 * Wstrict-null-sentinel: C++ Dialect Options.
31687 * Wstrict-overflow: Warning Options. (line 526)
31688 * Wstrict-prototypes: Warning Options. (line 889)
31689 * Wstrict-selector-match: Objective-C and Objective-C++ Dialect Options.
31691 * Wswitch: Warning Options. (line 336)
31692 * Wswitch-enum: Warning Options. (line 347)
31693 * Wswitch-switch: Warning Options. (line 344)
31694 * Wsystem-headers <1>: Preprocessor Options.
31696 * Wsystem-headers: Warning Options. (line 672)
31697 * Wtraditional <1>: Preprocessor Options.
31699 * Wtraditional: Warning Options. (line 698)
31700 * Wtrigraphs <1>: Preprocessor Options.
31702 * Wtrigraphs: Warning Options. (line 353)
31703 * Wundeclared-selector: Objective-C and Objective-C++ Dialect Options.
31705 * Wundef <1>: Preprocessor Options.
31707 * Wundef: Warning Options. (line 782)
31708 * Wuninitialized: Warning Options. (line 398)
31709 * Wunknown-pragmas: Warning Options. (line 472)
31710 * Wunreachable-code: Warning Options. (line 1054)
31711 * Wunsafe-loop-optimizations: Warning Options. (line 801)
31712 * Wunused: Warning Options. (line 391)
31713 * Wunused-function: Warning Options. (line 358)
31714 * Wunused-label: Warning Options. (line 363)
31715 * Wunused-macros: Preprocessor Options.
31717 * Wunused-parameter: Warning Options. (line 370)
31718 * Wunused-value: Warning Options. (line 385)
31719 * Wunused-variable: Warning Options. (line 377)
31720 * Wvariadic-macros: Warning Options. (line 1121)
31721 * Wvla: Warning Options. (line 1127)
31722 * Wvolatile-register-var: Warning Options. (line 1131)
31723 * Wwrite-strings: Warning Options. (line 833)
31724 * x <1>: Preprocessor Options.
31726 * x: Overall Options. (line 109)
31727 * Xassembler: Assembler Options. (line 13)
31728 * Xlinker: Link Options. (line 163)
31729 * Ym: System V Options. (line 26)
31730 * YP: System V Options. (line 22)
31733 File: gcc.info, Node: Keyword Index, Prev: Option Index, Up: Top
31741 * ! in constraint: Multi-Alternative. (line 33)
31742 * # in constraint: Modifiers. (line 57)
31743 * #pragma: Pragmas. (line 6)
31744 * #pragma implementation: C++ Interface. (line 39)
31745 * #pragma implementation, implied: C++ Interface. (line 46)
31746 * #pragma interface: C++ Interface. (line 20)
31747 * #pragma, reason for not using: Function Attributes.
31749 * $: Dollar Signs. (line 6)
31750 * % in constraint: Modifiers. (line 45)
31751 * %include: Spec Files. (line 27)
31752 * %include_noerr: Spec Files. (line 31)
31753 * %rename: Spec Files. (line 35)
31754 * & in constraint: Modifiers. (line 25)
31755 * ': Incompatibilities. (line 116)
31756 * * in constraint: Modifiers. (line 62)
31757 * + in constraint: Modifiers. (line 12)
31758 * -lgcc, use with -nodefaultlibs: Link Options. (line 79)
31759 * -lgcc, use with -nostdlib: Link Options. (line 79)
31760 * -nodefaultlibs and unresolved references: Link Options. (line 79)
31761 * -nostdlib and unresolved references: Link Options. (line 79)
31762 * .sdata/.sdata2 references (PowerPC): RS/6000 and PowerPC Options.
31764 * //: C++ Comments. (line 6)
31765 * 0 in constraint: Simple Constraints. (line 115)
31766 * < in constraint: Simple Constraints. (line 46)
31767 * = in constraint: Modifiers. (line 8)
31768 * > in constraint: Simple Constraints. (line 50)
31769 * ? in constraint: Multi-Alternative. (line 27)
31770 * ?: extensions: Conditionals. (line 6)
31771 * ?: side effect: Conditionals. (line 20)
31772 * _ in variables in macros: Typeof. (line 42)
31773 * __builtin___fprintf_chk: Object Size Checking.
31775 * __builtin___memcpy_chk: Object Size Checking.
31777 * __builtin___memmove_chk: Object Size Checking.
31779 * __builtin___mempcpy_chk: Object Size Checking.
31781 * __builtin___memset_chk: Object Size Checking.
31783 * __builtin___printf_chk: Object Size Checking.
31785 * __builtin___snprintf_chk: Object Size Checking.
31787 * __builtin___sprintf_chk: Object Size Checking.
31789 * __builtin___stpcpy_chk: Object Size Checking.
31791 * __builtin___strcat_chk: Object Size Checking.
31793 * __builtin___strcpy_chk: Object Size Checking.
31795 * __builtin___strncat_chk: Object Size Checking.
31797 * __builtin___strncpy_chk: Object Size Checking.
31799 * __builtin___vfprintf_chk: Object Size Checking.
31801 * __builtin___vprintf_chk: Object Size Checking.
31803 * __builtin___vsnprintf_chk: Object Size Checking.
31805 * __builtin___vsprintf_chk: Object Size Checking.
31807 * __builtin_apply: Constructing Calls. (line 31)
31808 * __builtin_apply_args: Constructing Calls. (line 20)
31809 * __builtin_choose_expr: Other Builtins. (line 150)
31810 * __builtin_clz: Other Builtins. (line 383)
31811 * __builtin_clzl: Other Builtins. (line 401)
31812 * __builtin_clzll: Other Builtins. (line 421)
31813 * __builtin_constant_p: Other Builtins. (line 190)
31814 * __builtin_ctz: Other Builtins. (line 387)
31815 * __builtin_ctzl: Other Builtins. (line 405)
31816 * __builtin_ctzll: Other Builtins. (line 425)
31817 * __builtin_expect: Other Builtins. (line 236)
31818 * __builtin_ffs: Other Builtins. (line 379)
31819 * __builtin_ffsl: Other Builtins. (line 397)
31820 * __builtin_ffsll: Other Builtins. (line 417)
31821 * __builtin_frame_address: Return Address. (line 34)
31822 * __builtin_huge_val: Other Builtins. (line 300)
31823 * __builtin_huge_valf: Other Builtins. (line 305)
31824 * __builtin_huge_vall: Other Builtins. (line 308)
31825 * __builtin_inf: Other Builtins. (line 312)
31826 * __builtin_infd128: Other Builtins. (line 322)
31827 * __builtin_infd32: Other Builtins. (line 316)
31828 * __builtin_infd64: Other Builtins. (line 319)
31829 * __builtin_inff: Other Builtins. (line 326)
31830 * __builtin_infl: Other Builtins. (line 331)
31831 * __builtin_isgreater: Other Builtins. (line 6)
31832 * __builtin_isgreaterequal: Other Builtins. (line 6)
31833 * __builtin_isless: Other Builtins. (line 6)
31834 * __builtin_islessequal: Other Builtins. (line 6)
31835 * __builtin_islessgreater: Other Builtins. (line 6)
31836 * __builtin_isunordered: Other Builtins. (line 6)
31837 * __builtin_nan: Other Builtins. (line 335)
31838 * __builtin_nand128: Other Builtins. (line 357)
31839 * __builtin_nand32: Other Builtins. (line 351)
31840 * __builtin_nand64: Other Builtins. (line 354)
31841 * __builtin_nanf: Other Builtins. (line 361)
31842 * __builtin_nanl: Other Builtins. (line 364)
31843 * __builtin_nans: Other Builtins. (line 368)
31844 * __builtin_nansf: Other Builtins. (line 372)
31845 * __builtin_nansl: Other Builtins. (line 375)
31846 * __builtin_object_size: Object Size Checking.
31848 * __builtin_offsetof: Offsetof. (line 6)
31849 * __builtin_parity: Other Builtins. (line 394)
31850 * __builtin_parityl: Other Builtins. (line 413)
31851 * __builtin_parityll: Other Builtins. (line 433)
31852 * __builtin_popcount: Other Builtins. (line 391)
31853 * __builtin_popcountl: Other Builtins. (line 409)
31854 * __builtin_popcountll: Other Builtins. (line 429)
31855 * __builtin_powi: Other Builtins. (line 6)
31856 * __builtin_powif: Other Builtins. (line 6)
31857 * __builtin_powil: Other Builtins. (line 6)
31858 * __builtin_prefetch: Other Builtins. (line 261)
31859 * __builtin_return: Constructing Calls. (line 48)
31860 * __builtin_return_address: Return Address. (line 11)
31861 * __builtin_types_compatible_p: Other Builtins. (line 104)
31862 * __complex__ keyword: Complex. (line 6)
31863 * __declspec(dllexport): Function Attributes.
31865 * __declspec(dllimport): Function Attributes.
31867 * __extension__: Alternate Keywords. (line 29)
31868 * __func__ identifier: Function Names. (line 6)
31869 * __FUNCTION__ identifier: Function Names. (line 6)
31870 * __imag__ keyword: Complex. (line 27)
31871 * __PRETTY_FUNCTION__ identifier: Function Names. (line 6)
31872 * __real__ keyword: Complex. (line 27)
31873 * __STDC_HOSTED__: Standards. (line 6)
31874 * __sync_add_and_fetch: Atomic Builtins. (line 57)
31875 * __sync_and_and_fetch: Atomic Builtins. (line 57)
31876 * __sync_bool_compare_and_swap: Atomic Builtins. (line 65)
31877 * __sync_fetch_and_add: Atomic Builtins. (line 45)
31878 * __sync_fetch_and_and: Atomic Builtins. (line 45)
31879 * __sync_fetch_and_nand: Atomic Builtins. (line 45)
31880 * __sync_fetch_and_or: Atomic Builtins. (line 45)
31881 * __sync_fetch_and_sub: Atomic Builtins. (line 45)
31882 * __sync_fetch_and_xor: Atomic Builtins. (line 45)
31883 * __sync_lock_release: Atomic Builtins. (line 95)
31884 * __sync_lock_test_and_set: Atomic Builtins. (line 77)
31885 * __sync_nand_and_fetch: Atomic Builtins. (line 57)
31886 * __sync_or_and_fetch: Atomic Builtins. (line 57)
31887 * __sync_sub_and_fetch: Atomic Builtins. (line 57)
31888 * __sync_synchronize: Atomic Builtins. (line 74)
31889 * __sync_val_compare_and_swap: Atomic Builtins. (line 65)
31890 * __sync_xor_and_fetch: Atomic Builtins. (line 57)
31891 * __thread: Thread-Local. (line 6)
31892 * _Complex keyword: Complex. (line 6)
31893 * _Decimal128 data type: Decimal Float. (line 6)
31894 * _Decimal32 data type: Decimal Float. (line 6)
31895 * _Decimal64 data type: Decimal Float. (line 6)
31896 * _exit: Other Builtins. (line 6)
31897 * _Exit: Other Builtins. (line 6)
31898 * ABI: Compatibility. (line 6)
31899 * abort: Other Builtins. (line 6)
31900 * abs: Other Builtins. (line 6)
31901 * accessing volatiles: Volatiles. (line 6)
31902 * acos: Other Builtins. (line 6)
31903 * acosf: Other Builtins. (line 6)
31904 * acosh: Other Builtins. (line 6)
31905 * acoshf: Other Builtins. (line 6)
31906 * acoshl: Other Builtins. (line 6)
31907 * acosl: Other Builtins. (line 6)
31908 * Ada: G++ and GCC. (line 6)
31909 * address constraints: Simple Constraints. (line 142)
31910 * address of a label: Labels as Values. (line 6)
31911 * address_operand: Simple Constraints. (line 146)
31912 * alias attribute: Function Attributes.
31914 * aliasing of parameters: Code Gen Options. (line 360)
31915 * aligned attribute <1>: Type Attributes. (line 30)
31916 * aligned attribute: Variable Attributes.
31918 * alignment: Alignment. (line 6)
31919 * alloca: Other Builtins. (line 6)
31920 * alloca vs variable-length arrays: Variable Length. (line 27)
31921 * Allow nesting in an interrupt handler on the Blackfin processor.: Function Attributes.
31923 * alternate keywords: Alternate Keywords. (line 6)
31924 * always_inline function attribute: Function Attributes.
31926 * AMD x86-64 Options: i386 and x86-64 Options.
31928 * AMD1: Standards. (line 6)
31929 * ANSI C: Standards. (line 6)
31930 * ANSI C standard: Standards. (line 6)
31931 * ANSI C89: Standards. (line 6)
31932 * ANSI support: C Dialect Options. (line 10)
31933 * ANSI X3.159-1989: Standards. (line 6)
31934 * apostrophes: Incompatibilities. (line 116)
31935 * application binary interface: Compatibility. (line 6)
31936 * ARC Options: ARC Options. (line 6)
31937 * ARM [Annotated C++ Reference Manual]: Backwards Compatibility.
31939 * ARM options: ARM Options. (line 6)
31940 * arrays of length zero: Zero Length. (line 6)
31941 * arrays of variable length: Variable Length. (line 6)
31942 * arrays, non-lvalue: Subscripting. (line 6)
31943 * asin: Other Builtins. (line 6)
31944 * asinf: Other Builtins. (line 6)
31945 * asinh: Other Builtins. (line 6)
31946 * asinhf: Other Builtins. (line 6)
31947 * asinhl: Other Builtins. (line 6)
31948 * asinl: Other Builtins. (line 6)
31949 * asm constraints: Constraints. (line 6)
31950 * asm expressions: Extended Asm. (line 6)
31951 * assembler instructions: Extended Asm. (line 6)
31952 * assembler names for identifiers: Asm Labels. (line 6)
31953 * assembly code, invalid: Bug Criteria. (line 12)
31954 * atan: Other Builtins. (line 6)
31955 * atan2: Other Builtins. (line 6)
31956 * atan2f: Other Builtins. (line 6)
31957 * atan2l: Other Builtins. (line 6)
31958 * atanf: Other Builtins. (line 6)
31959 * atanh: Other Builtins. (line 6)
31960 * atanhf: Other Builtins. (line 6)
31961 * atanhl: Other Builtins. (line 6)
31962 * atanl: Other Builtins. (line 6)
31963 * attribute of types: Type Attributes. (line 6)
31964 * attribute of variables: Variable Attributes.
31966 * attribute syntax: Attribute Syntax. (line 6)
31967 * autoincrement/decrement addressing: Simple Constraints. (line 28)
31968 * automatic inline for C++ member fns: Inline. (line 53)
31969 * AVR Options: AVR Options. (line 6)
31970 * Backwards Compatibility: Backwards Compatibility.
31972 * base class members: Name lookup. (line 6)
31973 * bcmp: Other Builtins. (line 6)
31974 * below100 attribute: Variable Attributes.
31976 * binary compatibility: Compatibility. (line 6)
31977 * Blackfin Options: Blackfin Options. (line 6)
31978 * bound pointer to member function: Bound member functions.
31980 * bounds checking: Optimize Options. (line 333)
31981 * bug criteria: Bug Criteria. (line 6)
31982 * bugs: Bugs. (line 6)
31983 * bugs, known: Trouble. (line 6)
31984 * built-in functions <1>: Other Builtins. (line 6)
31985 * built-in functions: C Dialect Options. (line 149)
31986 * bzero: Other Builtins. (line 6)
31987 * C compilation options: Invoking GCC. (line 17)
31988 * C intermediate output, nonexistent: G++ and GCC. (line 35)
31989 * C language extensions: C Extensions. (line 6)
31990 * C language, traditional: C Dialect Options. (line 227)
31991 * C standard: Standards. (line 6)
31992 * C standards: Standards. (line 6)
31993 * c++: Invoking G++. (line 13)
31994 * C++: G++ and GCC. (line 30)
31995 * C++ comments: C++ Comments. (line 6)
31996 * C++ compilation options: Invoking GCC. (line 23)
31997 * C++ interface and implementation headers: C++ Interface. (line 6)
31998 * C++ language extensions: C++ Extensions. (line 6)
31999 * C++ member fns, automatically inline: Inline. (line 53)
32000 * C++ misunderstandings: C++ Misunderstandings.
32002 * C++ options, command line: C++ Dialect Options.
32004 * C++ pragmas, effect on inlining: C++ Interface. (line 66)
32005 * C++ source file suffixes: Invoking G++. (line 6)
32006 * C++ static data, declaring and defining: Static Definitions.
32008 * C89: Standards. (line 6)
32009 * C90: Standards. (line 6)
32010 * C94: Standards. (line 6)
32011 * C95: Standards. (line 6)
32012 * C99: Standards. (line 6)
32013 * C9X: Standards. (line 6)
32014 * C_INCLUDE_PATH: Environment Variables.
32016 * cabs: Other Builtins. (line 6)
32017 * cabsf: Other Builtins. (line 6)
32018 * cabsl: Other Builtins. (line 6)
32019 * cacos: Other Builtins. (line 6)
32020 * cacosf: Other Builtins. (line 6)
32021 * cacosh: Other Builtins. (line 6)
32022 * cacoshf: Other Builtins. (line 6)
32023 * cacoshl: Other Builtins. (line 6)
32024 * cacosl: Other Builtins. (line 6)
32025 * calling functions through the function vector on the H8/300 processors: Function Attributes.
32027 * calloc: Other Builtins. (line 6)
32028 * carg: Other Builtins. (line 6)
32029 * cargf: Other Builtins. (line 6)
32030 * cargl: Other Builtins. (line 6)
32031 * case labels in initializers: Designated Inits. (line 6)
32032 * case ranges: Case Ranges. (line 6)
32033 * casin: Other Builtins. (line 6)
32034 * casinf: Other Builtins. (line 6)
32035 * casinh: Other Builtins. (line 6)
32036 * casinhf: Other Builtins. (line 6)
32037 * casinhl: Other Builtins. (line 6)
32038 * casinl: Other Builtins. (line 6)
32039 * cast to a union: Cast to Union. (line 6)
32040 * catan: Other Builtins. (line 6)
32041 * catanf: Other Builtins. (line 6)
32042 * catanh: Other Builtins. (line 6)
32043 * catanhf: Other Builtins. (line 6)
32044 * catanhl: Other Builtins. (line 6)
32045 * catanl: Other Builtins. (line 6)
32046 * cbrt: Other Builtins. (line 6)
32047 * cbrtf: Other Builtins. (line 6)
32048 * cbrtl: Other Builtins. (line 6)
32049 * ccos: Other Builtins. (line 6)
32050 * ccosf: Other Builtins. (line 6)
32051 * ccosh: Other Builtins. (line 6)
32052 * ccoshf: Other Builtins. (line 6)
32053 * ccoshl: Other Builtins. (line 6)
32054 * ccosl: Other Builtins. (line 6)
32055 * ceil: Other Builtins. (line 6)
32056 * ceilf: Other Builtins. (line 6)
32057 * ceill: Other Builtins. (line 6)
32058 * cexp: Other Builtins. (line 6)
32059 * cexpf: Other Builtins. (line 6)
32060 * cexpl: Other Builtins. (line 6)
32061 * character set, execution: Preprocessor Options.
32063 * character set, input: Preprocessor Options.
32065 * character set, input normalization: Warning Options. (line 962)
32066 * character set, wide execution: Preprocessor Options.
32068 * cimag: Other Builtins. (line 6)
32069 * cimagf: Other Builtins. (line 6)
32070 * cimagl: Other Builtins. (line 6)
32071 * cleanup attribute: Variable Attributes.
32073 * clog: Other Builtins. (line 6)
32074 * clogf: Other Builtins. (line 6)
32075 * clogl: Other Builtins. (line 6)
32076 * COBOL: G++ and GCC. (line 23)
32077 * code generation conventions: Code Gen Options. (line 6)
32078 * code, mixed with declarations: Mixed Declarations. (line 6)
32079 * command options: Invoking GCC. (line 6)
32080 * comments, C++ style: C++ Comments. (line 6)
32081 * common attribute: Variable Attributes.
32083 * comparison of signed and unsigned values, warning: Warning Options.
32085 * compiler bugs, reporting: Bug Reporting. (line 6)
32086 * compiler compared to C++ preprocessor: G++ and GCC. (line 35)
32087 * compiler options, C++: C++ Dialect Options.
32089 * compiler options, Objective-C and Objective-C++: Objective-C and Objective-C++ Dialect Options.
32091 * compiler version, specifying: Target Options. (line 6)
32092 * COMPILER_PATH: Environment Variables.
32094 * complex conjugation: Complex. (line 34)
32095 * complex numbers: Complex. (line 6)
32096 * compound literals: Compound Literals. (line 6)
32097 * computed gotos: Labels as Values. (line 6)
32098 * conditional expressions, extensions: Conditionals. (line 6)
32099 * conflicting types: Disappointments. (line 21)
32100 * conj: Other Builtins. (line 6)
32101 * conjf: Other Builtins. (line 6)
32102 * conjl: Other Builtins. (line 6)
32103 * const applied to function: Function Attributes.
32105 * const function attribute: Function Attributes.
32107 * constants in constraints: Simple Constraints. (line 58)
32108 * constraint modifier characters: Modifiers. (line 6)
32109 * constraint, matching: Simple Constraints. (line 127)
32110 * constraints, asm: Constraints. (line 6)
32111 * constraints, machine specific: Machine Constraints.
32113 * constructing calls: Constructing Calls. (line 6)
32114 * constructor expressions: Compound Literals. (line 6)
32115 * constructor function attribute: Function Attributes.
32117 * contributors: Contributors. (line 6)
32118 * copysign: Other Builtins. (line 6)
32119 * copysignf: Other Builtins. (line 6)
32120 * copysignl: Other Builtins. (line 6)
32121 * core dump: Bug Criteria. (line 9)
32122 * cos: Other Builtins. (line 6)
32123 * cosf: Other Builtins. (line 6)
32124 * cosh: Other Builtins. (line 6)
32125 * coshf: Other Builtins. (line 6)
32126 * coshl: Other Builtins. (line 6)
32127 * cosl: Other Builtins. (line 6)
32128 * CPATH: Environment Variables.
32130 * CPLUS_INCLUDE_PATH: Environment Variables.
32132 * cpow: Other Builtins. (line 6)
32133 * cpowf: Other Builtins. (line 6)
32134 * cpowl: Other Builtins. (line 6)
32135 * cproj: Other Builtins. (line 6)
32136 * cprojf: Other Builtins. (line 6)
32137 * cprojl: Other Builtins. (line 6)
32138 * creal: Other Builtins. (line 6)
32139 * crealf: Other Builtins. (line 6)
32140 * creall: Other Builtins. (line 6)
32141 * CRIS Options: CRIS Options. (line 6)
32142 * cross compiling: Target Options. (line 6)
32143 * CRX Options: CRX Options. (line 6)
32144 * csin: Other Builtins. (line 6)
32145 * csinf: Other Builtins. (line 6)
32146 * csinh: Other Builtins. (line 6)
32147 * csinhf: Other Builtins. (line 6)
32148 * csinhl: Other Builtins. (line 6)
32149 * csinl: Other Builtins. (line 6)
32150 * csqrt: Other Builtins. (line 6)
32151 * csqrtf: Other Builtins. (line 6)
32152 * csqrtl: Other Builtins. (line 6)
32153 * ctan: Other Builtins. (line 6)
32154 * ctanf: Other Builtins. (line 6)
32155 * ctanh: Other Builtins. (line 6)
32156 * ctanhf: Other Builtins. (line 6)
32157 * ctanhl: Other Builtins. (line 6)
32158 * ctanl: Other Builtins. (line 6)
32159 * Darwin options: Darwin Options. (line 6)
32160 * dcgettext: Other Builtins. (line 6)
32161 * DD integer suffix: Decimal Float. (line 6)
32162 * dd integer suffix: Decimal Float. (line 6)
32163 * deallocating variable length arrays: Variable Length. (line 23)
32164 * debugging information options: Debugging Options. (line 6)
32165 * decimal floating types: Decimal Float. (line 6)
32166 * declaration scope: Incompatibilities. (line 80)
32167 * declarations inside expressions: Statement Exprs. (line 6)
32168 * declarations, mixed with code: Mixed Declarations. (line 6)
32169 * declaring attributes of functions: Function Attributes.
32171 * declaring static data in C++: Static Definitions. (line 6)
32172 * defining static data in C++: Static Definitions. (line 6)
32173 * dependencies for make as output: Environment Variables.
32175 * dependencies, make: Preprocessor Options.
32177 * DEPENDENCIES_OUTPUT: Environment Variables.
32179 * dependent name lookup: Name lookup. (line 6)
32180 * deprecated attribute: Variable Attributes.
32182 * deprecated attribute.: Function Attributes.
32184 * designated initializers: Designated Inits. (line 6)
32185 * designator lists: Designated Inits. (line 94)
32186 * designators: Designated Inits. (line 61)
32187 * destructor function attribute: Function Attributes.
32189 * DF integer suffix: Decimal Float. (line 6)
32190 * df integer suffix: Decimal Float. (line 6)
32191 * dgettext: Other Builtins. (line 6)
32192 * diagnostic messages: Language Independent Options.
32194 * dialect options: C Dialect Options. (line 6)
32195 * digits in constraint: Simple Constraints. (line 115)
32196 * directory options: Directory Options. (line 6)
32197 * DL integer suffix: Decimal Float. (line 6)
32198 * dl integer suffix: Decimal Float. (line 6)
32199 * dollar signs in identifier names: Dollar Signs. (line 6)
32200 * double-word arithmetic: Long Long. (line 6)
32201 * downward funargs: Nested Functions. (line 6)
32202 * drem: Other Builtins. (line 6)
32203 * dremf: Other Builtins. (line 6)
32204 * dreml: Other Builtins. (line 6)
32205 * E in constraint: Simple Constraints. (line 77)
32206 * earlyclobber operand: Modifiers. (line 25)
32207 * eight bit data on the H8/300, H8/300H, and H8S: Function Attributes.
32209 * empty structures: Empty Structures. (line 6)
32210 * environment variables: Environment Variables.
32212 * erf: Other Builtins. (line 6)
32213 * erfc: Other Builtins. (line 6)
32214 * erfcf: Other Builtins. (line 6)
32215 * erfcl: Other Builtins. (line 6)
32216 * erff: Other Builtins. (line 6)
32217 * erfl: Other Builtins. (line 6)
32218 * error messages: Warnings and Errors.
32220 * escaped newlines: Escaped Newlines. (line 6)
32221 * exception handler functions on the Blackfin processor: Function Attributes.
32223 * exclamation point: Multi-Alternative. (line 33)
32224 * exit: Other Builtins. (line 6)
32225 * exp: Other Builtins. (line 6)
32226 * exp10: Other Builtins. (line 6)
32227 * exp10f: Other Builtins. (line 6)
32228 * exp10l: Other Builtins. (line 6)
32229 * exp2: Other Builtins. (line 6)
32230 * exp2f: Other Builtins. (line 6)
32231 * exp2l: Other Builtins. (line 6)
32232 * expf: Other Builtins. (line 6)
32233 * expl: Other Builtins. (line 6)
32234 * explicit register variables: Explicit Reg Vars. (line 6)
32235 * expm1: Other Builtins. (line 6)
32236 * expm1f: Other Builtins. (line 6)
32237 * expm1l: Other Builtins. (line 6)
32238 * expressions containing statements: Statement Exprs. (line 6)
32239 * expressions, constructor: Compound Literals. (line 6)
32240 * extended asm: Extended Asm. (line 6)
32241 * extensible constraints: Simple Constraints. (line 151)
32242 * extensions, ?:: Conditionals. (line 6)
32243 * extensions, C language: C Extensions. (line 6)
32244 * extensions, C++ language: C++ Extensions. (line 6)
32245 * external declaration scope: Incompatibilities. (line 80)
32246 * externally_visible attribute.: Function Attributes.
32248 * F in constraint: Simple Constraints. (line 82)
32249 * fabs: Other Builtins. (line 6)
32250 * fabsf: Other Builtins. (line 6)
32251 * fabsl: Other Builtins. (line 6)
32252 * fatal signal: Bug Criteria. (line 9)
32253 * fdim: Other Builtins. (line 6)
32254 * fdimf: Other Builtins. (line 6)
32255 * fdiml: Other Builtins. (line 6)
32256 * FDL, GNU Free Documentation License: GNU Free Documentation License.
32258 * ffs: Other Builtins. (line 6)
32259 * file name suffix: Overall Options. (line 14)
32260 * file names: Link Options. (line 10)
32261 * flatten function attribute: Function Attributes.
32263 * flexible array members: Zero Length. (line 6)
32264 * float as function value type: Incompatibilities. (line 141)
32265 * floating point precision <1>: Disappointments. (line 68)
32266 * floating point precision: Optimize Options. (line 1060)
32267 * floor: Other Builtins. (line 6)
32268 * floorf: Other Builtins. (line 6)
32269 * floorl: Other Builtins. (line 6)
32270 * fma: Other Builtins. (line 6)
32271 * fmaf: Other Builtins. (line 6)
32272 * fmal: Other Builtins. (line 6)
32273 * fmax: Other Builtins. (line 6)
32274 * fmaxf: Other Builtins. (line 6)
32275 * fmaxl: Other Builtins. (line 6)
32276 * fmin: Other Builtins. (line 6)
32277 * fminf: Other Builtins. (line 6)
32278 * fminl: Other Builtins. (line 6)
32279 * fmod: Other Builtins. (line 6)
32280 * fmodf: Other Builtins. (line 6)
32281 * fmodl: Other Builtins. (line 6)
32282 * force_align_arg_pointer attribute: Function Attributes.
32284 * format function attribute: Function Attributes.
32286 * format_arg function attribute: Function Attributes.
32288 * Fortran: G++ and GCC. (line 6)
32289 * forwarding calls: Constructing Calls. (line 6)
32290 * fprintf: Other Builtins. (line 6)
32291 * fprintf_unlocked: Other Builtins. (line 6)
32292 * fputs: Other Builtins. (line 6)
32293 * fputs_unlocked: Other Builtins. (line 6)
32294 * freestanding environment: Standards. (line 6)
32295 * freestanding implementation: Standards. (line 6)
32296 * frexp: Other Builtins. (line 6)
32297 * frexpf: Other Builtins. (line 6)
32298 * frexpl: Other Builtins. (line 6)
32299 * FRV Options: FRV Options. (line 6)
32300 * fscanf: Other Builtins. (line 6)
32301 * fscanf, and constant strings: Incompatibilities. (line 17)
32302 * function addressability on the M32R/D: Function Attributes.
32304 * function attributes: Function Attributes.
32306 * function pointers, arithmetic: Pointer Arith. (line 6)
32307 * function prototype declarations: Function Prototypes.
32309 * function without a prologue/epilogue code: Function Attributes.
32311 * function, size of pointer to: Pointer Arith. (line 6)
32312 * functions called via pointer on the RS/6000 and PowerPC: Function Attributes.
32314 * functions in arbitrary sections: Function Attributes.
32316 * functions that are passed arguments in registers on the 386: Function Attributes.
32318 * functions that behave like malloc: Function Attributes.
32320 * functions that do not pop the argument stack on the 386: Function Attributes.
32322 * functions that do pop the argument stack on the 386: Function Attributes.
32324 * functions that have no side effects: Function Attributes.
32326 * functions that never return: Function Attributes.
32328 * functions that pop the argument stack on the 386: Function Attributes.
32330 * functions that return more than once: Function Attributes.
32332 * functions which do not handle memory bank switching on 68HC11/68HC12: Function Attributes.
32334 * functions which handle memory bank switching: Function Attributes.
32336 * functions with non-null pointer arguments: Function Attributes.
32338 * functions with printf, scanf, strftime or strfmon style arguments: Function Attributes.
32340 * g in constraint: Simple Constraints. (line 108)
32341 * G in constraint: Simple Constraints. (line 86)
32342 * g++: Invoking G++. (line 13)
32343 * G++: G++ and GCC. (line 30)
32344 * gamma: Other Builtins. (line 6)
32345 * gammaf: Other Builtins. (line 6)
32346 * gammal: Other Builtins. (line 6)
32347 * GCC: G++ and GCC. (line 6)
32348 * GCC command options: Invoking GCC. (line 6)
32349 * GCC_EXEC_PREFIX: Environment Variables.
32351 * gcc_struct: Type Attributes. (line 302)
32352 * gcc_struct attribute: Variable Attributes.
32354 * gcov: Debugging Options. (line 238)
32355 * gettext: Other Builtins. (line 6)
32356 * global offset table: Code Gen Options. (line 163)
32357 * global register after longjmp: Global Reg Vars. (line 66)
32358 * global register variables: Global Reg Vars. (line 6)
32359 * GNAT: G++ and GCC. (line 30)
32360 * GNU C Compiler: G++ and GCC. (line 6)
32361 * GNU Compiler Collection: G++ and GCC. (line 6)
32362 * gnu_inline function attribute: Function Attributes.
32364 * goto with computed label: Labels as Values. (line 6)
32365 * gp-relative references (MIPS): MIPS Options. (line 216)
32366 * gprof: Debugging Options. (line 205)
32367 * grouping options: Invoking GCC. (line 26)
32368 * H in constraint: Simple Constraints. (line 86)
32369 * hardware models and configurations, specifying: Submodel Options.
32371 * hex floats: Hex Floats. (line 6)
32372 * hosted environment <1>: C Dialect Options. (line 183)
32373 * hosted environment: Standards. (line 6)
32374 * hosted implementation: Standards. (line 6)
32375 * HPPA Options: HPPA Options. (line 6)
32376 * hypot: Other Builtins. (line 6)
32377 * hypotf: Other Builtins. (line 6)
32378 * hypotl: Other Builtins. (line 6)
32379 * I in constraint: Simple Constraints. (line 69)
32380 * i in constraint: Simple Constraints. (line 58)
32381 * i386 Options: i386 and x86-64 Options.
32383 * IA-64 Options: IA-64 Options. (line 6)
32384 * IBM RS/6000 and PowerPC Options: RS/6000 and PowerPC Options.
32386 * identifier names, dollar signs in: Dollar Signs. (line 6)
32387 * identifiers, names in assembler code: Asm Labels. (line 6)
32388 * ilogb: Other Builtins. (line 6)
32389 * ilogbf: Other Builtins. (line 6)
32390 * ilogbl: Other Builtins. (line 6)
32391 * imaxabs: Other Builtins. (line 6)
32392 * implementation-defined behavior, C language: C Implementation.
32394 * implied #pragma implementation: C++ Interface. (line 46)
32395 * incompatibilities of GCC: Incompatibilities. (line 6)
32396 * increment operators: Bug Criteria. (line 17)
32397 * index: Other Builtins. (line 6)
32398 * indirect calls on ARM: Function Attributes.
32400 * indirect calls on MIPS: Function Attributes.
32402 * init_priority attribute: C++ Attributes. (line 9)
32403 * initializations in expressions: Compound Literals. (line 6)
32404 * initializers with labeled elements: Designated Inits. (line 6)
32405 * initializers, non-constant: Initializers. (line 6)
32406 * inline automatic for C++ member fns: Inline. (line 53)
32407 * inline functions: Inline. (line 6)
32408 * inline functions, omission of: Inline. (line 58)
32409 * inlining and C++ pragmas: C++ Interface. (line 66)
32410 * installation trouble: Trouble. (line 6)
32411 * integrating function code: Inline. (line 6)
32412 * Intel 386 Options: i386 and x86-64 Options.
32414 * interface and implementation headers, C++: C++ Interface. (line 6)
32415 * intermediate C version, nonexistent: G++ and GCC. (line 35)
32416 * interrupt handler functions: Function Attributes.
32418 * interrupt handler functions on the Blackfin, m68k, H8/300 and SH processors: Function Attributes.
32420 * introduction: Top. (line 6)
32421 * invalid assembly code: Bug Criteria. (line 12)
32422 * invalid input: Bug Criteria. (line 42)
32423 * invoking g++: Invoking G++. (line 21)
32424 * isalnum: Other Builtins. (line 6)
32425 * isalpha: Other Builtins. (line 6)
32426 * isascii: Other Builtins. (line 6)
32427 * isblank: Other Builtins. (line 6)
32428 * iscntrl: Other Builtins. (line 6)
32429 * isdigit: Other Builtins. (line 6)
32430 * isgraph: Other Builtins. (line 6)
32431 * islower: Other Builtins. (line 6)
32432 * ISO 9899: Standards. (line 6)
32433 * ISO C: Standards. (line 6)
32434 * ISO C standard: Standards. (line 6)
32435 * ISO C90: Standards. (line 6)
32436 * ISO C94: Standards. (line 6)
32437 * ISO C95: Standards. (line 6)
32438 * ISO C99: Standards. (line 6)
32439 * ISO C9X: Standards. (line 6)
32440 * ISO support: C Dialect Options. (line 10)
32441 * ISO/IEC 9899: Standards. (line 6)
32442 * isprint: Other Builtins. (line 6)
32443 * ispunct: Other Builtins. (line 6)
32444 * isspace: Other Builtins. (line 6)
32445 * isupper: Other Builtins. (line 6)
32446 * iswalnum: Other Builtins. (line 6)
32447 * iswalpha: Other Builtins. (line 6)
32448 * iswblank: Other Builtins. (line 6)
32449 * iswcntrl: Other Builtins. (line 6)
32450 * iswdigit: Other Builtins. (line 6)
32451 * iswgraph: Other Builtins. (line 6)
32452 * iswlower: Other Builtins. (line 6)
32453 * iswprint: Other Builtins. (line 6)
32454 * iswpunct: Other Builtins. (line 6)
32455 * iswspace: Other Builtins. (line 6)
32456 * iswupper: Other Builtins. (line 6)
32457 * iswxdigit: Other Builtins. (line 6)
32458 * isxdigit: Other Builtins. (line 6)
32459 * j0: Other Builtins. (line 6)
32460 * j0f: Other Builtins. (line 6)
32461 * j0l: Other Builtins. (line 6)
32462 * j1: Other Builtins. (line 6)
32463 * j1f: Other Builtins. (line 6)
32464 * j1l: Other Builtins. (line 6)
32465 * Java: G++ and GCC. (line 6)
32466 * java_interface attribute: C++ Attributes. (line 29)
32467 * jn: Other Builtins. (line 6)
32468 * jnf: Other Builtins. (line 6)
32469 * jnl: Other Builtins. (line 6)
32470 * keywords, alternate: Alternate Keywords. (line 6)
32471 * known causes of trouble: Trouble. (line 6)
32472 * labeled elements in initializers: Designated Inits. (line 6)
32473 * labels as values: Labels as Values. (line 6)
32474 * labs: Other Builtins. (line 6)
32475 * LANG: Environment Variables.
32477 * language dialect options: C Dialect Options. (line 6)
32478 * LC_ALL: Environment Variables.
32480 * LC_CTYPE: Environment Variables.
32482 * LC_MESSAGES: Environment Variables.
32484 * ldexp: Other Builtins. (line 6)
32485 * ldexpf: Other Builtins. (line 6)
32486 * ldexpl: Other Builtins. (line 6)
32487 * length-zero arrays: Zero Length. (line 6)
32488 * lgamma: Other Builtins. (line 6)
32489 * lgammaf: Other Builtins. (line 6)
32490 * lgammal: Other Builtins. (line 6)
32491 * Libraries: Link Options. (line 24)
32492 * LIBRARY_PATH: Environment Variables.
32494 * link options: Link Options. (line 6)
32495 * LL integer suffix: Long Long. (line 6)
32496 * llabs: Other Builtins. (line 6)
32497 * llrint: Other Builtins. (line 6)
32498 * llrintf: Other Builtins. (line 6)
32499 * llrintl: Other Builtins. (line 6)
32500 * llround: Other Builtins. (line 6)
32501 * llroundf: Other Builtins. (line 6)
32502 * llroundl: Other Builtins. (line 6)
32503 * load address instruction: Simple Constraints. (line 142)
32504 * local labels: Local Labels. (line 6)
32505 * local variables in macros: Typeof. (line 42)
32506 * local variables, specifying registers: Local Reg Vars. (line 6)
32507 * locale: Environment Variables.
32509 * locale definition: Environment Variables.
32511 * log: Other Builtins. (line 6)
32512 * log10: Other Builtins. (line 6)
32513 * log10f: Other Builtins. (line 6)
32514 * log10l: Other Builtins. (line 6)
32515 * log1p: Other Builtins. (line 6)
32516 * log1pf: Other Builtins. (line 6)
32517 * log1pl: Other Builtins. (line 6)
32518 * log2: Other Builtins. (line 6)
32519 * log2f: Other Builtins. (line 6)
32520 * log2l: Other Builtins. (line 6)
32521 * logb: Other Builtins. (line 6)
32522 * logbf: Other Builtins. (line 6)
32523 * logbl: Other Builtins. (line 6)
32524 * logf: Other Builtins. (line 6)
32525 * logl: Other Builtins. (line 6)
32526 * long long data types: Long Long. (line 6)
32527 * longjmp: Global Reg Vars. (line 66)
32528 * longjmp incompatibilities: Incompatibilities. (line 39)
32529 * longjmp warnings: Warning Options. (line 455)
32530 * lrint: Other Builtins. (line 6)
32531 * lrintf: Other Builtins. (line 6)
32532 * lrintl: Other Builtins. (line 6)
32533 * lround: Other Builtins. (line 6)
32534 * lroundf: Other Builtins. (line 6)
32535 * lroundl: Other Builtins. (line 6)
32536 * m in constraint: Simple Constraints. (line 17)
32537 * M32C options: M32C Options. (line 6)
32538 * M32R/D options: M32R/D Options. (line 6)
32539 * M680x0 options: M680x0 Options. (line 6)
32540 * M68hc1x options: M68hc1x Options. (line 6)
32541 * machine dependent options: Submodel Options. (line 6)
32542 * machine specific constraints: Machine Constraints.
32544 * macro with variable arguments: Variadic Macros. (line 6)
32545 * macros containing asm: Extended Asm. (line 239)
32546 * macros, inline alternative: Inline. (line 6)
32547 * macros, local labels: Local Labels. (line 6)
32548 * macros, local variables in: Typeof. (line 42)
32549 * macros, statements in expressions: Statement Exprs. (line 6)
32550 * macros, types of arguments: Typeof. (line 6)
32551 * make: Preprocessor Options.
32553 * malloc: Other Builtins. (line 6)
32554 * malloc attribute: Function Attributes.
32556 * matching constraint: Simple Constraints. (line 127)
32557 * MCore options: MCore Options. (line 6)
32558 * member fns, automatically inline: Inline. (line 53)
32559 * memcmp: Other Builtins. (line 6)
32560 * memcpy: Other Builtins. (line 6)
32561 * memory references in constraints: Simple Constraints. (line 17)
32562 * mempcpy: Other Builtins. (line 6)
32563 * memset: Other Builtins. (line 6)
32564 * Mercury: G++ and GCC. (line 23)
32565 * message formatting: Language Independent Options.
32567 * messages, warning: Warning Options. (line 6)
32568 * messages, warning and error: Warnings and Errors.
32570 * middle-operands, omitted: Conditionals. (line 6)
32571 * MIPS options: MIPS Options. (line 6)
32572 * misunderstandings in C++: C++ Misunderstandings.
32574 * mixed declarations and code: Mixed Declarations. (line 6)
32575 * mktemp, and constant strings: Incompatibilities. (line 13)
32576 * MMIX Options: MMIX Options. (line 6)
32577 * MN10300 options: MN10300 Options. (line 6)
32578 * mode attribute: Variable Attributes.
32580 * modf: Other Builtins. (line 6)
32581 * modff: Other Builtins. (line 6)
32582 * modfl: Other Builtins. (line 6)
32583 * modifiers in constraints: Modifiers. (line 6)
32584 * ms_struct: Type Attributes. (line 302)
32585 * ms_struct attribute: Variable Attributes.
32587 * MT options: MT Options. (line 6)
32588 * mudflap: Optimize Options. (line 333)
32589 * multiple alternative constraints: Multi-Alternative. (line 6)
32590 * multiprecision arithmetic: Long Long. (line 6)
32591 * n in constraint: Simple Constraints. (line 63)
32592 * names used in assembler code: Asm Labels. (line 6)
32593 * naming convention, implementation headers: C++ Interface. (line 46)
32594 * nearbyint: Other Builtins. (line 6)
32595 * nearbyintf: Other Builtins. (line 6)
32596 * nearbyintl: Other Builtins. (line 6)
32597 * nested functions: Nested Functions. (line 6)
32598 * newlines (escaped): Escaped Newlines. (line 6)
32599 * nextafter: Other Builtins. (line 6)
32600 * nextafterf: Other Builtins. (line 6)
32601 * nextafterl: Other Builtins. (line 6)
32602 * nexttoward: Other Builtins. (line 6)
32603 * nexttowardf: Other Builtins. (line 6)
32604 * nexttowardl: Other Builtins. (line 6)
32605 * NFC: Warning Options. (line 962)
32606 * NFKC: Warning Options. (line 962)
32607 * NMI handler functions on the Blackfin processor: Function Attributes.
32609 * no_instrument_function function attribute: Function Attributes.
32611 * nocommon attribute: Variable Attributes.
32613 * noinline function attribute: Function Attributes.
32615 * non-constant initializers: Initializers. (line 6)
32616 * non-static inline function: Inline. (line 70)
32617 * nonnull function attribute: Function Attributes.
32619 * noreturn function attribute: Function Attributes.
32621 * nothrow function attribute: Function Attributes.
32623 * o in constraint: Simple Constraints. (line 21)
32624 * OBJC_INCLUDE_PATH: Environment Variables.
32626 * Objective-C <1>: Standards. (line 110)
32627 * Objective-C: G++ and GCC. (line 6)
32628 * Objective-C and Objective-C++ options, command line: Objective-C and Objective-C++ Dialect Options.
32630 * Objective-C++ <1>: Standards. (line 110)
32631 * Objective-C++: G++ and GCC. (line 6)
32632 * offsettable address: Simple Constraints. (line 21)
32633 * old-style function definitions: Function Prototypes.
32635 * omitted middle-operands: Conditionals. (line 6)
32636 * open coding: Inline. (line 6)
32637 * openmp parallel: C Dialect Options. (line 200)
32638 * operand constraints, asm: Constraints. (line 6)
32639 * optimize options: Optimize Options. (line 6)
32640 * options to control diagnostics formatting: Language Independent Options.
32642 * options to control warnings: Warning Options. (line 6)
32643 * options, C++: C++ Dialect Options.
32645 * options, code generation: Code Gen Options. (line 6)
32646 * options, debugging: Debugging Options. (line 6)
32647 * options, dialect: C Dialect Options. (line 6)
32648 * options, directory search: Directory Options. (line 6)
32649 * options, GCC command: Invoking GCC. (line 6)
32650 * options, grouping: Invoking GCC. (line 26)
32651 * options, linking: Link Options. (line 6)
32652 * options, Objective-C and Objective-C++: Objective-C and Objective-C++ Dialect Options.
32654 * options, optimization: Optimize Options. (line 6)
32655 * options, order: Invoking GCC. (line 30)
32656 * options, preprocessor: Preprocessor Options.
32658 * order of evaluation, side effects: Non-bugs. (line 196)
32659 * order of options: Invoking GCC. (line 30)
32660 * other register constraints: Simple Constraints. (line 151)
32661 * output file option: Overall Options. (line 174)
32662 * overloaded virtual fn, warning: C++ Dialect Options.
32664 * p in constraint: Simple Constraints. (line 142)
32665 * packed attribute: Variable Attributes.
32667 * parameter forward declaration: Variable Length. (line 60)
32668 * parameters, aliased: Code Gen Options. (line 360)
32669 * Pascal: G++ and GCC. (line 23)
32670 * PDP-11 Options: PDP-11 Options. (line 6)
32671 * PIC: Code Gen Options. (line 163)
32672 * pmf: Bound member functions.
32674 * pointer arguments: Function Attributes.
32676 * pointer to member function: Bound member functions.
32678 * portions of temporary objects, pointers to: Temporaries. (line 6)
32679 * pow: Other Builtins. (line 6)
32680 * pow10: Other Builtins. (line 6)
32681 * pow10f: Other Builtins. (line 6)
32682 * pow10l: Other Builtins. (line 6)
32683 * PowerPC options: PowerPC Options. (line 6)
32684 * powf: Other Builtins. (line 6)
32685 * powl: Other Builtins. (line 6)
32686 * pragma, align: Solaris Pragmas. (line 11)
32687 * pragma, diagnostic: Diagnostic Pragmas. (line 14)
32688 * pragma, extern_prefix: Symbol-Renaming Pragmas.
32690 * pragma, fini: Solaris Pragmas. (line 19)
32691 * pragma, init: Solaris Pragmas. (line 24)
32692 * pragma, long_calls: ARM Pragmas. (line 11)
32693 * pragma, long_calls_off: ARM Pragmas. (line 17)
32694 * pragma, longcall: RS/6000 and PowerPC Pragmas.
32696 * pragma, mark: Darwin Pragmas. (line 11)
32697 * pragma, memregs: M32C Pragmas. (line 7)
32698 * pragma, no_long_calls: ARM Pragmas. (line 14)
32699 * pragma, options align: Darwin Pragmas. (line 14)
32700 * pragma, reason for not using: Function Attributes.
32702 * pragma, redefine_extname: Symbol-Renaming Pragmas.
32704 * pragma, segment: Darwin Pragmas. (line 21)
32705 * pragma, unused: Darwin Pragmas. (line 24)
32706 * pragma, visibility: Visibility Pragmas. (line 8)
32707 * pragma, weak: Weak Pragmas. (line 10)
32708 * pragmas: Pragmas. (line 6)
32709 * pragmas in C++, effect on inlining: C++ Interface. (line 66)
32710 * pragmas, interface and implementation: C++ Interface. (line 6)
32711 * pragmas, warning of unknown: Warning Options. (line 472)
32712 * precompiled headers: Precompiled Headers.
32714 * preprocessing numbers: Incompatibilities. (line 173)
32715 * preprocessing tokens: Incompatibilities. (line 173)
32716 * preprocessor options: Preprocessor Options.
32718 * printf: Other Builtins. (line 6)
32719 * printf_unlocked: Other Builtins. (line 6)
32720 * prof: Debugging Options. (line 199)
32721 * promotion of formal parameters: Function Prototypes.
32723 * pure function attribute: Function Attributes.
32725 * push address instruction: Simple Constraints. (line 142)
32726 * putchar: Other Builtins. (line 6)
32727 * puts: Other Builtins. (line 6)
32728 * qsort, and global register variables: Global Reg Vars. (line 42)
32729 * question mark: Multi-Alternative. (line 27)
32730 * r in constraint: Simple Constraints. (line 54)
32731 * ranges in case statements: Case Ranges. (line 6)
32732 * read-only strings: Incompatibilities. (line 9)
32733 * register variable after longjmp: Global Reg Vars. (line 66)
32734 * registers: Extended Asm. (line 6)
32735 * registers for local variables: Local Reg Vars. (line 6)
32736 * registers in constraints: Simple Constraints. (line 54)
32737 * registers, global allocation: Explicit Reg Vars. (line 6)
32738 * registers, global variables in: Global Reg Vars. (line 6)
32739 * regparm attribute: Function Attributes.
32741 * relocation truncated to fit (MIPS): MIPS Options. (line 135)
32742 * remainder: Other Builtins. (line 6)
32743 * remainderf: Other Builtins. (line 6)
32744 * remainderl: Other Builtins. (line 6)
32745 * remquo: Other Builtins. (line 6)
32746 * remquof: Other Builtins. (line 6)
32747 * remquol: Other Builtins. (line 6)
32748 * reordering, warning: C++ Dialect Options.
32750 * reporting bugs: Bugs. (line 6)
32751 * rest argument (in macro): Variadic Macros. (line 6)
32752 * restricted pointers: Restricted Pointers.
32754 * restricted references: Restricted Pointers.
32756 * restricted this pointer: Restricted Pointers.
32758 * returns_twice attribute: Function Attributes.
32760 * rindex: Other Builtins. (line 6)
32761 * rint: Other Builtins. (line 6)
32762 * rintf: Other Builtins. (line 6)
32763 * rintl: Other Builtins. (line 6)
32764 * round: Other Builtins. (line 6)
32765 * roundf: Other Builtins. (line 6)
32766 * roundl: Other Builtins. (line 6)
32767 * RS/6000 and PowerPC Options: RS/6000 and PowerPC Options.
32769 * RTTI: Vague Linkage. (line 43)
32770 * run-time options: Code Gen Options. (line 6)
32771 * s in constraint: Simple Constraints. (line 90)
32772 * S/390 and zSeries Options: S/390 and zSeries Options.
32774 * save all registers on the Blackfin, H8/300, H8/300H, and H8S: Function Attributes.
32776 * scalb: Other Builtins. (line 6)
32777 * scalbf: Other Builtins. (line 6)
32778 * scalbl: Other Builtins. (line 6)
32779 * scalbln: Other Builtins. (line 6)
32780 * scalblnf: Other Builtins. (line 6)
32781 * scalbn: Other Builtins. (line 6)
32782 * scalbnf: Other Builtins. (line 6)
32783 * scanf, and constant strings: Incompatibilities. (line 17)
32784 * scanfnl: Other Builtins. (line 6)
32785 * scope of a variable length array: Variable Length. (line 23)
32786 * scope of declaration: Disappointments. (line 21)
32787 * scope of external declarations: Incompatibilities. (line 80)
32788 * Score Options: Score Options. (line 6)
32789 * search path: Directory Options. (line 6)
32790 * section function attribute: Function Attributes.
32792 * section variable attribute: Variable Attributes.
32794 * sentinel function attribute: Function Attributes.
32796 * setjmp: Global Reg Vars. (line 66)
32797 * setjmp incompatibilities: Incompatibilities. (line 39)
32798 * shared strings: Incompatibilities. (line 9)
32799 * shared variable attribute: Variable Attributes.
32801 * side effect in ?:: Conditionals. (line 20)
32802 * side effects, macro argument: Statement Exprs. (line 35)
32803 * side effects, order of evaluation: Non-bugs. (line 196)
32804 * signal handler functions on the AVR processors: Function Attributes.
32806 * signbit: Other Builtins. (line 6)
32807 * signbitf: Other Builtins. (line 6)
32808 * signbitl: Other Builtins. (line 6)
32809 * signed and unsigned values, comparison warning: Warning Options.
32811 * significand: Other Builtins. (line 6)
32812 * significandf: Other Builtins. (line 6)
32813 * significandl: Other Builtins. (line 6)
32814 * simple constraints: Simple Constraints. (line 6)
32815 * sin: Other Builtins. (line 6)
32816 * sincos: Other Builtins. (line 6)
32817 * sincosf: Other Builtins. (line 6)
32818 * sincosl: Other Builtins. (line 6)
32819 * sinf: Other Builtins. (line 6)
32820 * sinh: Other Builtins. (line 6)
32821 * sinhf: Other Builtins. (line 6)
32822 * sinhl: Other Builtins. (line 6)
32823 * sinl: Other Builtins. (line 6)
32824 * sizeof: Typeof. (line 6)
32825 * smaller data references: M32R/D Options. (line 57)
32826 * smaller data references (MIPS): MIPS Options. (line 216)
32827 * smaller data references (PowerPC): RS/6000 and PowerPC Options.
32829 * snprintf: Other Builtins. (line 6)
32830 * SPARC options: SPARC Options. (line 6)
32831 * Spec Files: Spec Files. (line 6)
32832 * specified registers: Explicit Reg Vars. (line 6)
32833 * specifying compiler version and target machine: Target Options.
32835 * specifying hardware config: Submodel Options. (line 6)
32836 * specifying machine version: Target Options. (line 6)
32837 * specifying registers for local variables: Local Reg Vars. (line 6)
32838 * speed of compilation: Precompiled Headers.
32840 * sprintf: Other Builtins. (line 6)
32841 * sqrt: Other Builtins. (line 6)
32842 * sqrtf: Other Builtins. (line 6)
32843 * sqrtl: Other Builtins. (line 6)
32844 * sscanf: Other Builtins. (line 6)
32845 * sscanf, and constant strings: Incompatibilities. (line 17)
32846 * sseregparm attribute: Function Attributes.
32848 * statements inside expressions: Statement Exprs. (line 6)
32849 * static data in C++, declaring and defining: Static Definitions.
32851 * stpcpy: Other Builtins. (line 6)
32852 * stpncpy: Other Builtins. (line 6)
32853 * strcasecmp: Other Builtins. (line 6)
32854 * strcat: Other Builtins. (line 6)
32855 * strchr: Other Builtins. (line 6)
32856 * strcmp: Other Builtins. (line 6)
32857 * strcpy: Other Builtins. (line 6)
32858 * strcspn: Other Builtins. (line 6)
32859 * strdup: Other Builtins. (line 6)
32860 * strfmon: Other Builtins. (line 6)
32861 * strftime: Other Builtins. (line 6)
32862 * string constants: Incompatibilities. (line 9)
32863 * strlen: Other Builtins. (line 6)
32864 * strncasecmp: Other Builtins. (line 6)
32865 * strncat: Other Builtins. (line 6)
32866 * strncmp: Other Builtins. (line 6)
32867 * strncpy: Other Builtins. (line 6)
32868 * strndup: Other Builtins. (line 6)
32869 * strpbrk: Other Builtins. (line 6)
32870 * strrchr: Other Builtins. (line 6)
32871 * strspn: Other Builtins. (line 6)
32872 * strstr: Other Builtins. (line 6)
32873 * struct: Unnamed Fields. (line 6)
32874 * structures: Incompatibilities. (line 146)
32875 * structures, constructor expression: Compound Literals. (line 6)
32876 * submodel options: Submodel Options. (line 6)
32877 * subscripting: Subscripting. (line 6)
32878 * subscripting and function values: Subscripting. (line 6)
32879 * suffixes for C++ source: Invoking G++. (line 6)
32880 * SUNPRO_DEPENDENCIES: Environment Variables.
32882 * suppressing warnings: Warning Options. (line 6)
32883 * surprises in C++: C++ Misunderstandings.
32885 * syntax checking: Warning Options. (line 22)
32886 * system headers, warnings from: Warning Options. (line 672)
32887 * tan: Other Builtins. (line 6)
32888 * tanf: Other Builtins. (line 6)
32889 * tanh: Other Builtins. (line 6)
32890 * tanhf: Other Builtins. (line 6)
32891 * tanhl: Other Builtins. (line 6)
32892 * tanl: Other Builtins. (line 6)
32893 * target machine, specifying: Target Options. (line 6)
32894 * target options: Target Options. (line 6)
32895 * TC1: Standards. (line 6)
32896 * TC2: Standards. (line 6)
32897 * Technical Corrigenda: Standards. (line 6)
32898 * Technical Corrigendum 1: Standards. (line 6)
32899 * Technical Corrigendum 2: Standards. (line 6)
32900 * template instantiation: Template Instantiation.
32902 * temporaries, lifetime of: Temporaries. (line 6)
32903 * tgamma: Other Builtins. (line 6)
32904 * tgammaf: Other Builtins. (line 6)
32905 * tgammal: Other Builtins. (line 6)
32906 * Thread-Local Storage: Thread-Local. (line 6)
32907 * thunks: Nested Functions. (line 6)
32908 * tiny data section on the H8/300H and H8S: Function Attributes.
32910 * TLS: Thread-Local. (line 6)
32911 * tls_model attribute: Variable Attributes.
32913 * TMPDIR: Environment Variables.
32915 * TMS320C3x/C4x Options: TMS320C3x/C4x Options.
32917 * toascii: Other Builtins. (line 6)
32918 * tolower: Other Builtins. (line 6)
32919 * toupper: Other Builtins. (line 6)
32920 * towlower: Other Builtins. (line 6)
32921 * towupper: Other Builtins. (line 6)
32922 * traditional C language: C Dialect Options. (line 227)
32923 * treelang <1>: Standards. (line 123)
32924 * treelang: G++ and GCC. (line 6)
32925 * trunc: Other Builtins. (line 6)
32926 * truncf: Other Builtins. (line 6)
32927 * truncl: Other Builtins. (line 6)
32928 * two-stage name lookup: Name lookup. (line 6)
32929 * type alignment: Alignment. (line 6)
32930 * type attributes: Type Attributes. (line 6)
32931 * type_info: Vague Linkage. (line 43)
32932 * typedef names as function parameters: Incompatibilities. (line 97)
32933 * typeof: Typeof. (line 6)
32934 * ULL integer suffix: Long Long. (line 6)
32935 * Ultrix calling convention: Interoperation. (line 150)
32936 * undefined behavior: Bug Criteria. (line 17)
32937 * undefined function value: Bug Criteria. (line 17)
32938 * underscores in variables in macros: Typeof. (line 42)
32939 * union: Unnamed Fields. (line 6)
32940 * union, casting to a: Cast to Union. (line 6)
32941 * unions: Incompatibilities. (line 146)
32942 * unknown pragmas, warning: Warning Options. (line 472)
32943 * unresolved references and -nodefaultlibs: Link Options. (line 79)
32944 * unresolved references and -nostdlib: Link Options. (line 79)
32945 * unused attribute.: Function Attributes.
32947 * used attribute.: Function Attributes.
32949 * User stack pointer in interrupts on the Blackfin: Function Attributes.
32951 * V in constraint: Simple Constraints. (line 41)
32952 * V850 Options: V850 Options. (line 6)
32953 * vague linkage: Vague Linkage. (line 6)
32954 * value after longjmp: Global Reg Vars. (line 66)
32955 * variable addressability on the IA-64: Function Attributes.
32957 * variable addressability on the M32R/D: Variable Attributes.
32959 * variable alignment: Alignment. (line 6)
32960 * variable attributes: Variable Attributes.
32962 * variable number of arguments: Variadic Macros. (line 6)
32963 * variable-length array scope: Variable Length. (line 23)
32964 * variable-length arrays: Variable Length. (line 6)
32965 * variables in specified registers: Explicit Reg Vars. (line 6)
32966 * variables, local, in macros: Typeof. (line 42)
32967 * variadic macros: Variadic Macros. (line 6)
32968 * VAX calling convention: Interoperation. (line 150)
32969 * VAX options: VAX Options. (line 6)
32970 * vfprintf: Other Builtins. (line 6)
32971 * vfscanf: Other Builtins. (line 6)
32972 * visibility attribute: Function Attributes.
32974 * VLAs: Variable Length. (line 6)
32975 * void pointers, arithmetic: Pointer Arith. (line 6)
32976 * void, size of pointer to: Pointer Arith. (line 6)
32977 * volatile access: Volatiles. (line 6)
32978 * volatile applied to function: Function Attributes.
32980 * volatile read: Volatiles. (line 6)
32981 * volatile write: Volatiles. (line 6)
32982 * vprintf: Other Builtins. (line 6)
32983 * vscanf: Other Builtins. (line 6)
32984 * vsnprintf: Other Builtins. (line 6)
32985 * vsprintf: Other Builtins. (line 6)
32986 * vsscanf: Other Builtins. (line 6)
32987 * vtable: Vague Linkage. (line 28)
32988 * warn_unused_result attribute: Function Attributes.
32990 * warning for comparison of signed and unsigned values: Warning Options.
32992 * warning for overloaded virtual fn: C++ Dialect Options.
32994 * warning for reordering of member initializers: C++ Dialect Options.
32996 * warning for unknown pragmas: Warning Options. (line 472)
32997 * warning messages: Warning Options. (line 6)
32998 * warnings from system headers: Warning Options. (line 672)
32999 * warnings vs errors: Warnings and Errors.
33001 * weak attribute: Function Attributes.
33003 * weakref attribute: Function Attributes.
33005 * whitespace: Incompatibilities. (line 112)
33006 * X in constraint: Simple Constraints. (line 112)
33007 * X3.159-1989: Standards. (line 6)
33008 * x86-64 options: x86-64 Options. (line 6)
33009 * x86-64 Options: i386 and x86-64 Options.
33011 * Xstormy16 Options: Xstormy16 Options. (line 6)
33012 * Xtensa Options: Xtensa Options. (line 6)
33013 * y0: Other Builtins. (line 6)
33014 * y0f: Other Builtins. (line 6)
33015 * y0l: Other Builtins. (line 6)
33016 * y1: Other Builtins. (line 6)
33017 * y1f: Other Builtins. (line 6)
33018 * y1l: Other Builtins. (line 6)
33019 * yn: Other Builtins. (line 6)
33020 * ynf: Other Builtins. (line 6)
33021 * ynl: Other Builtins. (line 6)
33022 * zero-length arrays: Zero Length. (line 6)
33023 * zero-size structures: Empty Structures. (line 6)
33024 * zSeries options: zSeries Options. (line 6)
33030 Node: G++ and GCC
\7f3745
33031 Node: Standards
\7f5810
33032 Node: Invoking GCC
\7f12938
33033 Node: Option Summary
\7f16699
33034 Node: Overall Options
\7f45558
33035 Node: Invoking G++
\7f54784
33036 Node: C Dialect Options
\7f56263
33037 Node: C++ Dialect Options
\7f68676
33038 Node: Objective-C and Objective-C++ Dialect Options
\7f87726
33039 Node: Language Independent Options
\7f99322
33040 Node: Warning Options
\7f101404
33041 Node: Debugging Options
\7f154270
33042 Node: Optimize Options
\7f189426
33043 Node: Preprocessor Options
\7f269700
33044 Ref: Wtrigraphs
\7f273664
33045 Ref: dashMF
\7f278421
33046 Ref: fdollars-in-identifiers
\7f288276
33047 Node: Assembler Options
\7f296332
33048 Node: Link Options
\7f297037
33049 Ref: Link Options-Footnote-1
\7f305605
33050 Node: Directory Options
\7f305939
33051 Node: Spec Files
\7f312001
33052 Node: Target Options
\7f331307
33053 Node: Submodel Options
\7f332731
33054 Node: ARC Options
\7f334361
33055 Node: ARM Options
\7f335551
33056 Node: AVR Options
\7f347162
33057 Node: Blackfin Options
\7f349295
33058 Node: CRIS Options
\7f352063
33059 Node: CRX Options
\7f356282
33060 Node: Darwin Options
\7f356707
33061 Node: DEC Alpha Options
\7f363660
33062 Node: DEC Alpha/VMS Options
\7f375137
33063 Node: FRV Options
\7f375522
33064 Node: GNU/Linux Options
\7f382192
33065 Node: H8/300 Options
\7f382650
33066 Node: HPPA Options
\7f383717
33067 Node: i386 and x86-64 Options
\7f393310
33068 Node: IA-64 Options
\7f414755
33069 Node: M32C Options
\7f422072
33070 Node: M32R/D Options
\7f423363
33071 Node: M680x0 Options
\7f426950
33072 Node: M68hc1x Options
\7f434327
33073 Node: MCore Options
\7f435895
33074 Node: MIPS Options
\7f436916
33075 Node: MMIX Options
\7f451999
33076 Node: MN10300 Options
\7f454481
33077 Node: MT Options
\7f455899
33078 Node: PDP-11 Options
\7f456813
33079 Node: PowerPC Options
\7f458647
33080 Node: RS/6000 and PowerPC Options
\7f458881
33081 Node: S/390 and zSeries Options
\7f487550
33082 Node: Score Options
\7f494865
33083 Node: SH Options
\7f495693
33084 Node: SPARC Options
\7f504917
33085 Node: System V Options
\7f515760
33086 Node: TMS320C3x/C4x Options
\7f516594
33087 Node: V850 Options
\7f522119
33088 Node: VAX Options
\7f525264
33089 Node: x86-64 Options
\7f525811
33090 Node: Xstormy16 Options
\7f526025
33091 Node: Xtensa Options
\7f526314
33092 Node: zSeries Options
\7f530154
33093 Node: Code Gen Options
\7f530350
33094 Node: Environment Variables
\7f552407
33095 Node: Precompiled Headers
\7f560079
33096 Node: Running Protoize
\7f566316
33097 Node: C Implementation
\7f572653
33098 Node: Translation implementation
\7f574316
33099 Node: Environment implementation
\7f574890
33100 Node: Identifiers implementation
\7f575440
33101 Node: Characters implementation
\7f576494
33102 Node: Integers implementation
\7f579300
33103 Node: Floating point implementation
\7f581125
33104 Node: Arrays and pointers implementation
\7f584054
33105 Ref: Arrays and pointers implementation-Footnote-1
\7f585489
33106 Node: Hints implementation
\7f585613
33107 Node: Structures unions enumerations and bit-fields implementation
\7f587079
33108 Node: Qualifiers implementation
\7f589042
33109 Node: Declarators implementation
\7f590814
33110 Node: Statements implementation
\7f591156
33111 Node: Preprocessing directives implementation
\7f591483
33112 Node: Library functions implementation
\7f593588
33113 Node: Architecture implementation
\7f594228
33114 Node: Locale-specific behavior implementation
\7f594931
33115 Node: C Extensions
\7f595236
33116 Node: Statement Exprs
\7f599634
33117 Node: Local Labels
\7f604147
33118 Node: Labels as Values
\7f607126
33119 Ref: Labels as Values-Footnote-1
\7f609180
33120 Node: Nested Functions
\7f609363
33121 Node: Constructing Calls
\7f613257
33122 Node: Typeof
\7f615593
33123 Node: Conditionals
\7f618759
33124 Node: Long Long
\7f619650
33125 Node: Complex
\7f621151
33126 Node: Decimal Float
\7f623720
33127 Node: Hex Floats
\7f625401
33128 Node: Zero Length
\7f626442
33129 Node: Empty Structures
\7f629719
33130 Node: Variable Length
\7f630135
33131 Node: Variadic Macros
\7f632902
33132 Node: Escaped Newlines
\7f635284
33133 Node: Subscripting
\7f636123
33134 Node: Pointer Arith
\7f636846
33135 Node: Initializers
\7f637414
33136 Node: Compound Literals
\7f637910
33137 Node: Designated Inits
\7f640085
33138 Node: Case Ranges
\7f643740
33139 Node: Cast to Union
\7f644423
33140 Node: Mixed Declarations
\7f645519
33141 Node: Function Attributes
\7f646025
33142 Node: Attribute Syntax
\7f689870
33143 Node: Function Prototypes
\7f700741
33144 Node: C++ Comments
\7f702522
33145 Node: Dollar Signs
\7f703041
33146 Node: Character Escapes
\7f703506
33147 Node: Alignment
\7f703800
33148 Node: Variable Attributes
\7f705117
33149 Ref: i386 Variable Attributes
\7f718140
33150 Node: Type Attributes
\7f723637
33151 Ref: i386 Type Attributes
\7f736939
33152 Ref: PowerPC Type Attributes
\7f737783
33153 Node: Inline
\7f738636
33154 Node: Extended Asm
\7f743968
33155 Ref: Example of asm with clobbered asm reg
\7f750054
33156 Node: Constraints
\7f764150
33157 Node: Simple Constraints
\7f765000
33158 Node: Multi-Alternative
\7f771527
33159 Node: Modifiers
\7f773244
33160 Node: Machine Constraints
\7f776138
33161 Node: Asm Labels
\7f803385
33162 Node: Explicit Reg Vars
\7f805061
33163 Node: Global Reg Vars
\7f806669
33164 Node: Local Reg Vars
\7f811219
33165 Node: Alternate Keywords
\7f813660
33166 Node: Incomplete Enums
\7f815088
33167 Node: Function Names
\7f815845
33168 Node: Return Address
\7f818035
33169 Node: Vector Extensions
\7f820832
33170 Node: Offsetof
\7f824334
33171 Node: Atomic Builtins
\7f825120
33172 Node: Object Size Checking
\7f830205
33173 Node: Other Builtins
\7f835562
33174 Node: Target Builtins
\7f857650
33175 Node: Alpha Built-in Functions
\7f858383
33176 Node: ARM Built-in Functions
\7f861375
33177 Node: Blackfin Built-in Functions
\7f868082
33178 Node: FR-V Built-in Functions
\7f868699
33179 Node: Argument Types
\7f869558
33180 Node: Directly-mapped Integer Functions
\7f871314
33181 Node: Directly-mapped Media Functions
\7f872396
33182 Node: Raw read/write Functions
\7f879428
33183 Node: Other Built-in Functions
\7f880340
33184 Node: X86 Built-in Functions
\7f881529
33185 Node: MIPS DSP Built-in Functions
\7f899652
33186 Node: MIPS Paired-Single Support
\7f908077
33187 Node: Paired-Single Arithmetic
\7f909687
33188 Node: Paired-Single Built-in Functions
\7f910627
33189 Node: MIPS-3D Built-in Functions
\7f913291
33190 Node: PowerPC AltiVec Built-in Functions
\7f918660
33191 Node: SPARC VIS Built-in Functions
\7f1019964
33192 Node: Target Format Checks
\7f1021623
33193 Node: Solaris Format Checks
\7f1022030
33194 Node: Pragmas
\7f1022427
33195 Node: ARM Pragmas
\7f1023057
33196 Node: M32C Pragmas
\7f1023660
33197 Node: RS/6000 and PowerPC Pragmas
\7f1024236
33198 Node: Darwin Pragmas
\7f1024978
33199 Node: Solaris Pragmas
\7f1026045
33200 Node: Symbol-Renaming Pragmas
\7f1027206
33201 Node: Structure-Packing Pragmas
\7f1029828
33202 Node: Weak Pragmas
\7f1031459
33203 Node: Diagnostic Pragmas
\7f1032261
33204 Node: Visibility Pragmas
\7f1034254
33205 Node: Unnamed Fields
\7f1034975
33206 Node: Thread-Local
\7f1036485
33207 Node: C99 Thread-Local Edits
\7f1038569
33208 Node: C++98 Thread-Local Edits
\7f1040581
33209 Node: C++ Extensions
\7f1044026
33210 Node: Volatiles
\7f1045602
33211 Node: Restricted Pointers
\7f1048278
33212 Node: Vague Linkage
\7f1049872
33213 Node: C++ Interface
\7f1053528
33214 Ref: C++ Interface-Footnote-1
\7f1057825
33215 Node: Template Instantiation
\7f1057962
33216 Node: Bound member functions
\7f1064974
33217 Node: C++ Attributes
\7f1066517
33218 Node: Namespace Association
\7f1068175
33219 Node: Java Exceptions
\7f1069593
33220 Node: Deprecated Features
\7f1070998
33221 Node: Backwards Compatibility
\7f1073973
33222 Node: Objective-C
\7f1075328
33223 Node: Executing code before main
\7f1075909
33224 Node: What you can and what you cannot do in +load
\7f1078515
33225 Node: Type encoding
\7f1080682
33226 Node: Garbage Collection
\7f1084069
33227 Node: Constant string objects
\7f1086693
33228 Node: compatibility_alias
\7f1089201
33229 Node: Compatibility
\7f1090079
33230 Node: Gcov
\7f1096646
33231 Node: Gcov Intro
\7f1097170
33232 Node: Invoking Gcov
\7f1099886
33233 Node: Gcov and Optimization
\7f1111746
33234 Node: Gcov Data Files
\7f1114399
33235 Node: Cross-profiling
\7f1115537
33236 Node: Trouble
\7f1117363
33237 Node: Actual Bugs
\7f1118903
33238 Node: Cross-Compiler Problems
\7f1119643
33239 Node: Interoperation
\7f1120057
33240 Node: Incompatibilities
\7f1127655
33241 Node: Fixed Headers
\7f1135805
33242 Node: Standard Libraries
\7f1137468
33243 Node: Disappointments
\7f1138840
33244 Node: C++ Misunderstandings
\7f1143198
33245 Node: Static Definitions
\7f1144017
33246 Node: Name lookup
\7f1145070
33247 Ref: Name lookup-Footnote-1
\7f1149848
33248 Node: Temporaries
\7f1150035
33249 Node: Copy Assignment
\7f1152011
33250 Node: Protoize Caveats
\7f1153818
33251 Node: Non-bugs
\7f1157780
33252 Node: Warnings and Errors
\7f1168284
33253 Node: Bugs
\7f1170048
33254 Node: Bug Criteria
\7f1170612
33255 Node: Bug Reporting
\7f1172822
33256 Node: Service
\7f1173214
33257 Node: Contributing
\7f1174033
33258 Node: Funding
\7f1174773
33259 Node: GNU Project
\7f1177262
33260 Node: Copying
\7f1177908
33261 Node: GNU Free Documentation License
\7f1197085
33262 Node: Contributors
\7f1219491
33263 Node: Option Index
\7f1255347
33264 Node: Keyword Index
\7f1391791