motify compile link error

motify compile link error
This commit is contained in:
ant 2016-09-18 09:03:25 +08:00
parent 923914edae
commit 03e74a8e50
5418 changed files with 1367914 additions and 206149 deletions

View file

@ -0,0 +1,139 @@
<html lang="en">
<head>
<title>AArch64 Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="next" href="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options" title="Adapteva Epiphany Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="AArch64-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options">Adapteva Epiphany Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.1 AArch64 Options</h4>
<p><a name="index-AArch64-Options-1082"></a>
These options are defined for AArch64 implementations:
<dl>
<dt><code>-mbig-endian</code><dd><a name="index-mbig_002dendian-1083"></a>Generate big-endian code. This is the default when GCC is configured for an
&lsquo;<samp><span class="samp">aarch64_be-*-*</span></samp>&rsquo; target.
<br><dt><code>-mgeneral-regs-only</code><dd><a name="index-mgeneral_002dregs_002donly-1084"></a>Generate code which uses only the general registers.
<br><dt><code>-mlittle-endian</code><dd><a name="index-mlittle_002dendian-1085"></a>Generate little-endian code. This is the default when GCC is configured for an
&lsquo;<samp><span class="samp">aarch64-*-*</span></samp>&rsquo; but not an &lsquo;<samp><span class="samp">aarch64_be-*-*</span></samp>&rsquo; target.
<br><dt><code>-mcmodel=tiny</code><dd><a name="index-mcmodel_003dtiny-1086"></a>Generate code for the tiny code model. The program and its statically defined
symbols must be within 1GB of each other. Pointers are 64 bits. Programs can
be statically or dynamically linked. This model is not fully implemented and
mostly treated as &lsquo;<samp><span class="samp">small</span></samp>&rsquo;.
<br><dt><code>-mcmodel=small</code><dd><a name="index-mcmodel_003dsmall-1087"></a>Generate code for the small code model. The program and its statically defined
symbols must be within 4GB of each other. Pointers are 64 bits. Programs can
be statically or dynamically linked. This is the default code model.
<br><dt><code>-mcmodel=large</code><dd><a name="index-mcmodel_003dlarge-1088"></a>Generate code for the large code model. This makes no assumptions about
addresses and sizes of sections. Pointers are 64 bits. Programs can be
statically linked only.
<br><dt><code>-mstrict-align</code><dd><a name="index-mstrict_002dalign-1089"></a>Do not assume that unaligned memory references will be handled by the system.
<br><dt><code>-momit-leaf-frame-pointer</code><dt><code>-mno-omit-leaf-frame-pointer</code><dd><a name="index-momit_002dleaf_002dframe_002dpointer-1090"></a><a name="index-mno_002domit_002dleaf_002dframe_002dpointer-1091"></a>Omit or keep the frame pointer in leaf functions. The former behaviour is the
default.
<br><dt><code>-mtls-dialect=desc</code><dd><a name="index-mtls_002ddialect_003ddesc-1092"></a>Use TLS descriptors as the thread-local storage mechanism for dynamic accesses
of TLS variables. This is the default.
<br><dt><code>-mtls-dialect=traditional</code><dd><a name="index-mtls_002ddialect_003dtraditional-1093"></a>Use traditional TLS as the thread-local storage mechanism for dynamic accesses
of TLS variables.
<br><dt><code>-march=</code><var>name</var><dd><a name="index-march-1094"></a>Specify the name of the target architecture, optionally suffixed by one or
more feature modifiers. This option has the form
<samp><span class="option">-march=</span><var>arch</var><span class="option">{+[no]</span><var>feature</var><span class="option">}*</span></samp>, where the
only value for <var>arch</var> is &lsquo;<samp><span class="samp">armv8-a</span></samp>&rsquo;. The possible values for
<var>feature</var> are documented in the sub-section below.
<p>Where conflicting feature modifiers are specified, the right-most feature is
used.
<p>GCC uses this name to determine what kind of instructions it can emit when
generating assembly code. This option can be used in conjunction with or
instead of the <samp><span class="option">-mcpu=</span></samp> option.
<br><dt><code>-mcpu=</code><var>name</var><dd><a name="index-mcpu-1095"></a>Specify the name of the target processor, optionally suffixed by one or more
feature modifiers. This option has the form
<samp><span class="option">-mcpu=</span><var>cpu</var><span class="option">{+[no]</span><var>feature</var><span class="option">}*</span></samp>, where the
possible values for <var>cpu</var> are &lsquo;<samp><span class="samp">generic</span></samp>&rsquo;, &lsquo;<samp><span class="samp">large</span></samp>&rsquo;. The
possible values for <var>feature</var> are documented in the sub-section
below.
<p>Where conflicting feature modifiers are specified, the right-most feature is
used.
<p>GCC uses this name to determine what kind of instructions it can emit when
generating assembly code.
<br><dt><code>-mtune=</code><var>name</var><dd><a name="index-mtune-1096"></a>Specify the name of the processor to tune the performance for. The code will
be tuned as if the target processor were of the type specified in this option,
but still using instructions compatible with the target processor specified
by a <samp><span class="option">-mcpu=</span></samp> option. This option cannot be suffixed by feature
modifiers.
</dl>
<h5 class="subsubsection">3.17.1.1 <samp><span class="option">-march</span></samp> and <samp><span class="option">-mcpu</span></samp> feature modifiers</h5>
<p><a name="index-g_t_0040option_007b_002dmarch_007d-feature-modifiers-1097"></a><a name="index-g_t_0040option_007b_002dmcpu_007d-feature-modifiers-1098"></a>Feature modifiers used with <samp><span class="option">-march</span></samp> and <samp><span class="option">-mcpu</span></samp> can be one
the following:
<dl>
<dt>&lsquo;<samp><span class="samp">crypto</span></samp>&rsquo;<dd>Enable Crypto extension. This implies Advanced SIMD is enabled.
<br><dt>&lsquo;<samp><span class="samp">fp</span></samp>&rsquo;<dd>Enable floating-point instructions.
<br><dt>&lsquo;<samp><span class="samp">simd</span></samp>&rsquo;<dd>Enable Advanced SIMD instructions. This implies floating-point instructions
are enabled. This is the default for all current possible values for options
<samp><span class="option">-march</span></samp> and <samp><span class="option">-mcpu=</span></samp>.
</dl>
</body></html>

View file

@ -0,0 +1,369 @@
<html lang="en">
<head>
<title>ARM Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options" title="Adapteva Epiphany Options">
<link rel="next" href="AVR-Options.html#AVR-Options" title="AVR Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="ARM-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="AVR-Options.html#AVR-Options">AVR Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options">Adapteva Epiphany Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.3 ARM Options</h4>
<p><a name="index-ARM-options-1118"></a>
These &lsquo;<samp><span class="samp">-m</span></samp>&rsquo; options are defined for Advanced RISC Machines (ARM)
architectures:
<dl>
<dt><code>-mabi=</code><var>name</var><dd><a name="index-mabi-1119"></a>Generate code for the specified ABI. Permissible values are: &lsquo;<samp><span class="samp">apcs-gnu</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">atpcs</span></samp>&rsquo;, &lsquo;<samp><span class="samp">aapcs</span></samp>&rsquo;, &lsquo;<samp><span class="samp">aapcs-linux</span></samp>&rsquo; and &lsquo;<samp><span class="samp">iwmmxt</span></samp>&rsquo;.
<br><dt><code>-mapcs-frame</code><dd><a name="index-mapcs_002dframe-1120"></a>Generate a stack frame that is compliant with the ARM Procedure Call
Standard for all functions, even if this is not strictly necessary for
correct execution of the code. Specifying <samp><span class="option">-fomit-frame-pointer</span></samp>
with this option causes the stack frames not to be generated for
leaf functions. The default is <samp><span class="option">-mno-apcs-frame</span></samp>.
<br><dt><code>-mapcs</code><dd><a name="index-mapcs-1121"></a>This is a synonym for <samp><span class="option">-mapcs-frame</span></samp>.
<br><dt><code>-mthumb-interwork</code><dd><a name="index-mthumb_002dinterwork-1122"></a>Generate code that supports calling between the ARM and Thumb
instruction sets. Without this option, on pre-v5 architectures, the
two instruction sets cannot be reliably used inside one program. The
default is <samp><span class="option">-mno-thumb-interwork</span></samp>, since slightly larger code
is generated when <samp><span class="option">-mthumb-interwork</span></samp> is specified. In AAPCS
configurations this option is meaningless.
<br><dt><code>-mno-sched-prolog</code><dd><a name="index-mno_002dsched_002dprolog-1123"></a>Prevent the reordering of instructions in the function prologue, or the
merging of those instruction with the instructions in the function's
body. This means that all functions start with a recognizable set
of instructions (or in fact one of a choice from a small set of
different function prologues), and this information can be used to
locate the start of functions inside an executable piece of code. The
default is <samp><span class="option">-msched-prolog</span></samp>.
<br><dt><code>-mfloat-abi=</code><var>name</var><dd><a name="index-mfloat_002dabi-1124"></a>Specifies which floating-point ABI to use. Permissible values
are: &lsquo;<samp><span class="samp">soft</span></samp>&rsquo;, &lsquo;<samp><span class="samp">softfp</span></samp>&rsquo; and &lsquo;<samp><span class="samp">hard</span></samp>&rsquo;.
<p>Specifying &lsquo;<samp><span class="samp">soft</span></samp>&rsquo; causes GCC to generate output containing
library calls for floating-point operations.
&lsquo;<samp><span class="samp">softfp</span></samp>&rsquo; allows the generation of code using hardware floating-point
instructions, but still uses the soft-float calling conventions.
&lsquo;<samp><span class="samp">hard</span></samp>&rsquo; allows generation of floating-point instructions
and uses FPU-specific calling conventions.
<p>The default depends on the specific target configuration. Note that
the hard-float and soft-float ABIs are not link-compatible; you must
compile your entire program with the same ABI, and link with a
compatible set of libraries.
<br><dt><code>-mlittle-endian</code><dd><a name="index-mlittle_002dendian-1125"></a>Generate code for a processor running in little-endian mode. This is
the default for all standard configurations.
<br><dt><code>-mbig-endian</code><dd><a name="index-mbig_002dendian-1126"></a>Generate code for a processor running in big-endian mode; the default is
to compile code for a little-endian processor.
<br><dt><code>-mwords-little-endian</code><dd><a name="index-mwords_002dlittle_002dendian-1127"></a>This option only applies when generating code for big-endian processors.
Generate code for a little-endian word order but a big-endian byte
order. That is, a byte order of the form &lsquo;<samp><span class="samp">32107654</span></samp>&rsquo;. Note: this
option should only be used if you require compatibility with code for
big-endian ARM processors generated by versions of the compiler prior to
2.8. This option is now deprecated.
<br><dt><code>-march=</code><var>name</var><dd><a name="index-march-1128"></a>This specifies the name of the target ARM architecture. GCC uses this
name to determine what kind of instructions it can emit when generating
assembly code. This option can be used in conjunction with or instead
of the <samp><span class="option">-mcpu=</span></samp> option. Permissible names are: &lsquo;<samp><span class="samp">armv2</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">armv2a</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv3</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv3m</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv4</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv4t</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">armv5</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv5t</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv5e</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv5te</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">armv6</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv6j</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">armv6t2</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv6z</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv6zk</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv6-m</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">armv7</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv7-a</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv7-r</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv7-m</span></samp>&rsquo;, &lsquo;<samp><span class="samp">armv7e-m</span></samp>&rsquo;
&lsquo;<samp><span class="samp">armv8-a</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">iwmmxt</span></samp>&rsquo;, &lsquo;<samp><span class="samp">iwmmxt2</span></samp>&rsquo;, &lsquo;<samp><span class="samp">ep9312</span></samp>&rsquo;.
<p><samp><span class="option">-march=native</span></samp> causes the compiler to auto-detect the architecture
of the build computer. At present, this feature is only supported on
Linux, and not all architectures are recognized. If the auto-detect is
unsuccessful the option has no effect.
<br><dt><code>-mtune=</code><var>name</var><dd><a name="index-mtune-1129"></a>This option specifies the name of the target ARM processor for
which GCC should tune the performance of the code.
For some ARM implementations better performance can be obtained by using
this option.
Permissible names are: &lsquo;<samp><span class="samp">arm2</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm250</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm3</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm6</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm60</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm600</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm610</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm620</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm7</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm7m</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm7d</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm7dm</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm7di</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm7dmi</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm70</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm700</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm700i</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm710</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm710c</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm7100</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm720</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm7500</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm7500fe</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm7tdmi</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm7tdmi-s</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm710t</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm720t</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm740t</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">strongarm</span></samp>&rsquo;, &lsquo;<samp><span class="samp">strongarm110</span></samp>&rsquo;, &lsquo;<samp><span class="samp">strongarm1100</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">strongarm1110</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm8</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm810</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm9</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm9e</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm920</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm920t</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm922t</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm946e-s</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm966e-s</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm968e-s</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm926ej-s</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm940t</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm9tdmi</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm10tdmi</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm1020t</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm1026ej-s</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm10e</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm1020e</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm1022e</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm1136j-s</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm1136jf-s</span></samp>&rsquo;, &lsquo;<samp><span class="samp">mpcore</span></samp>&rsquo;, &lsquo;<samp><span class="samp">mpcorenovfp</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">arm1156t2-s</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm1156t2f-s</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm1176jz-s</span></samp>&rsquo;, &lsquo;<samp><span class="samp">arm1176jzf-s</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">cortex-a5</span></samp>&rsquo;, &lsquo;<samp><span class="samp">cortex-a7</span></samp>&rsquo;, &lsquo;<samp><span class="samp">cortex-a8</span></samp>&rsquo;, &lsquo;<samp><span class="samp">cortex-a9</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">cortex-a15</span></samp>&rsquo;, &lsquo;<samp><span class="samp">cortex-r4</span></samp>&rsquo;, &lsquo;<samp><span class="samp">cortex-r4f</span></samp>&rsquo;, &lsquo;<samp><span class="samp">cortex-r5</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">cortex-r7</span></samp>&rsquo;, &lsquo;<samp><span class="samp">cortex-m4</span></samp>&rsquo;, &lsquo;<samp><span class="samp">cortex-m3</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">cortex-m1</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">cortex-m0</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">cortex-m0plus</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">marvell-pj4</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">xscale</span></samp>&rsquo;, &lsquo;<samp><span class="samp">iwmmxt</span></samp>&rsquo;, &lsquo;<samp><span class="samp">iwmmxt2</span></samp>&rsquo;, &lsquo;<samp><span class="samp">ep9312</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">fa526</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fa626</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">fa606te</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fa626te</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fmp626</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fa726te</span></samp>&rsquo;.
<p><samp><span class="option">-mtune=generic-</span><var>arch</var></samp> specifies that GCC should tune the
performance for a blend of processors within architecture <var>arch</var>.
The aim is to generate code that run well on the current most popular
processors, balancing between optimizations that benefit some CPUs in the
range, and avoiding performance pitfalls of other CPUs. The effects of
this option may change in future GCC versions as CPU models come and go.
<p><samp><span class="option">-mtune=native</span></samp> causes the compiler to auto-detect the CPU
of the build computer. At present, this feature is only supported on
Linux, and not all architectures are recognized. If the auto-detect is
unsuccessful the option has no effect.
<br><dt><code>-mcpu=</code><var>name</var><dd><a name="index-mcpu-1130"></a>This specifies the name of the target ARM processor. GCC uses this name
to derive the name of the target ARM architecture (as if specified
by <samp><span class="option">-march</span></samp>) and the ARM processor type for which to tune for
performance (as if specified by <samp><span class="option">-mtune</span></samp>). Where this option
is used in conjunction with <samp><span class="option">-march</span></samp> or <samp><span class="option">-mtune</span></samp>,
those options take precedence over the appropriate part of this option.
<p>Permissible names for this option are the same as those for
<samp><span class="option">-mtune</span></samp>.
<p><samp><span class="option">-mcpu=generic-</span><var>arch</var></samp> is also permissible, and is
equivalent to <samp><span class="option">-march=</span><var>arch</var><span class="option"> -mtune=generic-</span><var>arch</var></samp>.
See <samp><span class="option">-mtune</span></samp> for more information.
<p><samp><span class="option">-mcpu=native</span></samp> causes the compiler to auto-detect the CPU
of the build computer. At present, this feature is only supported on
Linux, and not all architectures are recognized. If the auto-detect is
unsuccessful the option has no effect.
<br><dt><code>-mfpu=</code><var>name</var><dd><a name="index-mfpu-1131"></a>This specifies what floating-point hardware (or hardware emulation) is
available on the target. Permissible names are: &lsquo;<samp><span class="samp">vfp</span></samp>&rsquo;, &lsquo;<samp><span class="samp">vfpv3</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">vfpv3-fp16</span></samp>&rsquo;, &lsquo;<samp><span class="samp">vfpv3-d16</span></samp>&rsquo;, &lsquo;<samp><span class="samp">vfpv3-d16-fp16</span></samp>&rsquo;, &lsquo;<samp><span class="samp">vfpv3xd</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">vfpv3xd-fp16</span></samp>&rsquo;, &lsquo;<samp><span class="samp">neon</span></samp>&rsquo;, &lsquo;<samp><span class="samp">neon-fp16</span></samp>&rsquo;, &lsquo;<samp><span class="samp">vfpv4</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">vfpv4-d16</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fpv4-sp-d16</span></samp>&rsquo;, &lsquo;<samp><span class="samp">neon-vfpv4</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">fp-armv8</span></samp>&rsquo;, &lsquo;<samp><span class="samp">neon-fp-armv8</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">crypto-neon-fp-armv8</span></samp>&rsquo;.
<p>If <samp><span class="option">-msoft-float</span></samp> is specified this specifies the format of
floating-point values.
<p>If the selected floating-point hardware includes the NEON extension
(e.g. <samp><span class="option">-mfpu</span></samp>=&lsquo;<samp><span class="samp">neon</span></samp>&rsquo;), note that floating-point
operations are not generated by GCC's auto-vectorization pass unless
<samp><span class="option">-funsafe-math-optimizations</span></samp> is also specified. This is
because NEON hardware does not fully implement the IEEE 754 standard for
floating-point arithmetic (in particular denormal values are treated as
zero), so the use of NEON instructions may lead to a loss of precision.
<br><dt><code>-mfp16-format=</code><var>name</var><dd><a name="index-mfp16_002dformat-1132"></a>Specify the format of the <code>__fp16</code> half-precision floating-point type.
Permissible names are &lsquo;<samp><span class="samp">none</span></samp>&rsquo;, &lsquo;<samp><span class="samp">ieee</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">alternative</span></samp>&rsquo;;
the default is &lsquo;<samp><span class="samp">none</span></samp>&rsquo;, in which case the <code>__fp16</code> type is not
defined. See <a href="Half_002dPrecision.html#Half_002dPrecision">Half-Precision</a>, for more information.
<br><dt><code>-mstructure-size-boundary=</code><var>n</var><dd><a name="index-mstructure_002dsize_002dboundary-1133"></a>The sizes of all structures and unions are rounded up to a multiple
of the number of bits set by this option. Permissible values are 8, 32
and 64. The default value varies for different toolchains. For the COFF
targeted toolchain the default value is 8. A value of 64 is only allowed
if the underlying ABI supports it.
<p>Specifying a larger number can produce faster, more efficient code, but
can also increase the size of the program. Different values are potentially
incompatible. Code compiled with one value cannot necessarily expect to
work with code or libraries compiled with another value, if they exchange
information using structures or unions.
<br><dt><code>-mabort-on-noreturn</code><dd><a name="index-mabort_002don_002dnoreturn-1134"></a>Generate a call to the function <code>abort</code> at the end of a
<code>noreturn</code> function. It is executed if the function tries to
return.
<br><dt><code>-mlong-calls</code><dt><code>-mno-long-calls</code><dd><a name="index-mlong_002dcalls-1135"></a><a name="index-mno_002dlong_002dcalls-1136"></a>Tells the compiler to perform function calls by first loading the
address of the function into a register and then performing a subroutine
call on this register. This switch is needed if the target function
lies outside of the 64-megabyte addressing range of the offset-based
version of subroutine call instruction.
<p>Even if this switch is enabled, not all function calls are turned
into long calls. The heuristic is that static functions, functions
that have the &lsquo;<samp><span class="samp">short-call</span></samp>&rsquo; attribute, functions that are inside
the scope of a &lsquo;<samp><span class="samp">#pragma no_long_calls</span></samp>&rsquo; directive, and functions whose
definitions have already been compiled within the current compilation
unit are not turned into long calls. The exceptions to this rule are
that weak function definitions, functions with the &lsquo;<samp><span class="samp">long-call</span></samp>&rsquo;
attribute or the &lsquo;<samp><span class="samp">section</span></samp>&rsquo; attribute, and functions that are within
the scope of a &lsquo;<samp><span class="samp">#pragma long_calls</span></samp>&rsquo; directive are always
turned into long calls.
<p>This feature is not enabled by default. Specifying
<samp><span class="option">-mno-long-calls</span></samp> restores the default behavior, as does
placing the function calls within the scope of a &lsquo;<samp><span class="samp">#pragma
long_calls_off</span></samp>&rsquo; directive. Note these switches have no effect on how
the compiler generates code to handle function calls via function
pointers.
<br><dt><code>-msingle-pic-base</code><dd><a name="index-msingle_002dpic_002dbase-1137"></a>Treat the register used for PIC addressing as read-only, rather than
loading it in the prologue for each function. The runtime system is
responsible for initializing this register with an appropriate value
before execution begins.
<br><dt><code>-mpic-register=</code><var>reg</var><dd><a name="index-mpic_002dregister-1138"></a>Specify the register to be used for PIC addressing.
For standard PIC base case, the default will be any suitable register
determined by compiler. For single PIC base case, the default is
&lsquo;<samp><span class="samp">R9</span></samp>&rsquo; if target is EABI based or stack-checking is enabled,
otherwise the default is &lsquo;<samp><span class="samp">R10</span></samp>&rsquo;.
<br><dt><code>-mpic-data-is-text-relative</code><dd><a name="index-mpic_002ddata_002dis_002dtext_002drelative-1139"></a>Assume that each data segments are relative to text segment at load time.
Therefore, it permits addressing data using PC-relative operations.
This option is on by default for targets other than VxWorks RTP.
<br><dt><code>-mpoke-function-name</code><dd><a name="index-mpoke_002dfunction_002dname-1140"></a>Write the name of each function into the text section, directly
preceding the function prologue. The generated code is similar to this:
<pre class="smallexample"> t0
.ascii "arm_poke_function_name", 0
.align
t1
.word 0xff000000 + (t1 - t0)
arm_poke_function_name
mov ip, sp
stmfd sp!, {fp, ip, lr, pc}
sub fp, ip, #4
</pre>
<p>When performing a stack backtrace, code can inspect the value of
<code>pc</code> stored at <code>fp + 0</code>. If the trace function then looks at
location <code>pc - 12</code> and the top 8 bits are set, then we know that
there is a function name embedded immediately preceding this location
and has length <code>((pc[-3]) &amp; 0xff000000)</code>.
<br><dt><code>-mthumb</code><dt><code>-marm</code><dd><a name="index-marm-1141"></a><a name="index-mthumb-1142"></a>
Select between generating code that executes in ARM and Thumb
states. The default for most configurations is to generate code
that executes in ARM state, but the default can be changed by
configuring GCC with the <samp><span class="option">--with-mode=</span></samp><var>state</var>
configure option.
<br><dt><code>-mtpcs-frame</code><dd><a name="index-mtpcs_002dframe-1143"></a>Generate a stack frame that is compliant with the Thumb Procedure Call
Standard for all non-leaf functions. (A leaf function is one that does
not call any other functions.) The default is <samp><span class="option">-mno-tpcs-frame</span></samp>.
<br><dt><code>-mtpcs-leaf-frame</code><dd><a name="index-mtpcs_002dleaf_002dframe-1144"></a>Generate a stack frame that is compliant with the Thumb Procedure Call
Standard for all leaf functions. (A leaf function is one that does
not call any other functions.) The default is <samp><span class="option">-mno-apcs-leaf-frame</span></samp>.
<br><dt><code>-mcallee-super-interworking</code><dd><a name="index-mcallee_002dsuper_002dinterworking-1145"></a>Gives all externally visible functions in the file being compiled an ARM
instruction set header which switches to Thumb mode before executing the
rest of the function. This allows these functions to be called from
non-interworking code. This option is not valid in AAPCS configurations
because interworking is enabled by default.
<br><dt><code>-mcaller-super-interworking</code><dd><a name="index-mcaller_002dsuper_002dinterworking-1146"></a>Allows calls via function pointers (including virtual functions) to
execute correctly regardless of whether the target code has been
compiled for interworking or not. There is a small overhead in the cost
of executing a function pointer if this option is enabled. This option
is not valid in AAPCS configurations because interworking is enabled
by default.
<br><dt><code>-mtp=</code><var>name</var><dd><a name="index-mtp-1147"></a>Specify the access model for the thread local storage pointer. The valid
models are <samp><span class="option">soft</span></samp>, which generates calls to <code>__aeabi_read_tp</code>,
<samp><span class="option">cp15</span></samp>, which fetches the thread pointer from <code>cp15</code> directly
(supported in the arm6k architecture), and <samp><span class="option">auto</span></samp>, which uses the
best available method for the selected processor. The default setting is
<samp><span class="option">auto</span></samp>.
<br><dt><code>-mtls-dialect=</code><var>dialect</var><dd><a name="index-mtls_002ddialect-1148"></a>Specify the dialect to use for accessing thread local storage. Two
<var>dialect</var>s are supported&mdash;&lsquo;<samp><span class="samp">gnu</span></samp>&rsquo; and &lsquo;<samp><span class="samp">gnu2</span></samp>&rsquo;. The
&lsquo;<samp><span class="samp">gnu</span></samp>&rsquo; dialect selects the original GNU scheme for supporting
local and global dynamic TLS models. The &lsquo;<samp><span class="samp">gnu2</span></samp>&rsquo; dialect
selects the GNU descriptor scheme, which provides better performance
for shared libraries. The GNU descriptor scheme is compatible with
the original scheme, but does require new assembler, linker and
library support. Initial and local exec TLS models are unaffected by
this option and always use the original scheme.
<br><dt><code>-mword-relocations</code><dd><a name="index-mword_002drelocations-1149"></a>Only generate absolute relocations on word-sized values (i.e. R_ARM_ABS32).
This is enabled by default on targets (uClinux, SymbianOS) where the runtime
loader imposes this restriction, and when <samp><span class="option">-fpic</span></samp> or <samp><span class="option">-fPIC</span></samp>
is specified.
<br><dt><code>-mfix-cortex-m3-ldrd</code><dd><a name="index-mfix_002dcortex_002dm3_002dldrd-1150"></a>Some Cortex-M3 cores can cause data corruption when <code>ldrd</code> instructions
with overlapping destination and base registers are used. This option avoids
generating these instructions. This option is enabled by default when
<samp><span class="option">-mcpu=cortex-m3</span></samp> is specified.
<br><dt><code>-mslow-flash-data</code><dd><a name="index-mslow_002dflash_002ddata-1151"></a>Assume loading data from flash is slower than fetching instruction.
Therefore literal load is minimized for better performance.
This option is only supported when compiling for ARMv7 M-profile and
off by default.
<br><dt><code>-munaligned-access</code><dt><code>-mno-unaligned-access</code><dd><a name="index-munaligned_002daccess-1152"></a><a name="index-mno_002dunaligned_002daccess-1153"></a>Enables (or disables) reading and writing of 16- and 32- bit values
from addresses that are not 16- or 32- bit aligned. By default
unaligned access is disabled for all pre-ARMv6 and all ARMv6-M
architectures, and enabled for all other architectures. If unaligned
access is not enabled then words in packed data structures will be
accessed a byte at a time.
<p>The ARM attribute <code>Tag_CPU_unaligned_access</code> will be set in the
generated object file to either true or false, depending upon the
setting of this option. If unaligned access is enabled then the
preprocessor symbol <code>__ARM_FEATURE_UNALIGNED</code> will also be
defined.
</dl>
</body></html>

View file

@ -0,0 +1,70 @@
<html lang="en">
<head>
<title>ARM Pragmas - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Pragmas.html#Pragmas" title="Pragmas">
<link rel="next" href="M32C-Pragmas.html#M32C-Pragmas" title="M32C Pragmas">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="ARM-Pragmas"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="M32C-Pragmas.html#M32C-Pragmas">M32C Pragmas</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Pragmas.html#Pragmas">Pragmas</a>
<hr>
</div>
<h4 class="subsection">6.58.1 ARM Pragmas</h4>
<p>The ARM target defines pragmas for controlling the default addition of
<code>long_call</code> and <code>short_call</code> attributes to functions.
See <a href="Function-Attributes.html#Function-Attributes">Function Attributes</a>, for information about the effects of these
attributes.
<dl>
<dt><code>long_calls</code><dd><a name="index-pragma_002c-long_005fcalls-3459"></a>Set all subsequent functions to have the <code>long_call</code> attribute.
<br><dt><code>no_long_calls</code><dd><a name="index-pragma_002c-no_005flong_005fcalls-3460"></a>Set all subsequent functions to have the <code>short_call</code> attribute.
<br><dt><code>long_calls_off</code><dd><a name="index-pragma_002c-long_005fcalls_005foff-3461"></a>Do not affect the <code>long_call</code> or <code>short_call</code> attributes of
subsequent functions.
</dl>
</body></html>

View file

@ -0,0 +1,207 @@
<html lang="en">
<head>
<title>ARM iWMMXt Built-in Functions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Target-Builtins.html#Target-Builtins" title="Target Builtins">
<link rel="prev" href="Alpha-Built_002din-Functions.html#Alpha-Built_002din-Functions" title="Alpha Built-in Functions">
<link rel="next" href="ARM-NEON-Intrinsics.html#ARM-NEON-Intrinsics" title="ARM NEON Intrinsics">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="ARM-iWMMXt-Built-in-Functions"></a>
<a name="ARM-iWMMXt-Built_002din-Functions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="ARM-NEON-Intrinsics.html#ARM-NEON-Intrinsics">ARM NEON Intrinsics</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Alpha-Built_002din-Functions.html#Alpha-Built_002din-Functions">Alpha Built-in Functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Target-Builtins.html#Target-Builtins">Target Builtins</a>
<hr>
</div>
<h4 class="subsection">6.56.2 ARM iWMMXt Built-in Functions</h4>
<p>These built-in functions are available for the ARM family of
processors when the <samp><span class="option">-mcpu=iwmmxt</span></samp> switch is used:
<pre class="smallexample"> typedef int v2si __attribute__ ((vector_size (8)));
typedef short v4hi __attribute__ ((vector_size (8)));
typedef char v8qi __attribute__ ((vector_size (8)));
int __builtin_arm_getwcgr0 (void)
void __builtin_arm_setwcgr0 (int)
int __builtin_arm_getwcgr1 (void)
void __builtin_arm_setwcgr1 (int)
int __builtin_arm_getwcgr2 (void)
void __builtin_arm_setwcgr2 (int)
int __builtin_arm_getwcgr3 (void)
void __builtin_arm_setwcgr3 (int)
int __builtin_arm_textrmsb (v8qi, int)
int __builtin_arm_textrmsh (v4hi, int)
int __builtin_arm_textrmsw (v2si, int)
int __builtin_arm_textrmub (v8qi, int)
int __builtin_arm_textrmuh (v4hi, int)
int __builtin_arm_textrmuw (v2si, int)
v8qi __builtin_arm_tinsrb (v8qi, int, int)
v4hi __builtin_arm_tinsrh (v4hi, int, int)
v2si __builtin_arm_tinsrw (v2si, int, int)
long long __builtin_arm_tmia (long long, int, int)
long long __builtin_arm_tmiabb (long long, int, int)
long long __builtin_arm_tmiabt (long long, int, int)
long long __builtin_arm_tmiaph (long long, int, int)
long long __builtin_arm_tmiatb (long long, int, int)
long long __builtin_arm_tmiatt (long long, int, int)
int __builtin_arm_tmovmskb (v8qi)
int __builtin_arm_tmovmskh (v4hi)
int __builtin_arm_tmovmskw (v2si)
long long __builtin_arm_waccb (v8qi)
long long __builtin_arm_wacch (v4hi)
long long __builtin_arm_waccw (v2si)
v8qi __builtin_arm_waddb (v8qi, v8qi)
v8qi __builtin_arm_waddbss (v8qi, v8qi)
v8qi __builtin_arm_waddbus (v8qi, v8qi)
v4hi __builtin_arm_waddh (v4hi, v4hi)
v4hi __builtin_arm_waddhss (v4hi, v4hi)
v4hi __builtin_arm_waddhus (v4hi, v4hi)
v2si __builtin_arm_waddw (v2si, v2si)
v2si __builtin_arm_waddwss (v2si, v2si)
v2si __builtin_arm_waddwus (v2si, v2si)
v8qi __builtin_arm_walign (v8qi, v8qi, int)
long long __builtin_arm_wand(long long, long long)
long long __builtin_arm_wandn (long long, long long)
v8qi __builtin_arm_wavg2b (v8qi, v8qi)
v8qi __builtin_arm_wavg2br (v8qi, v8qi)
v4hi __builtin_arm_wavg2h (v4hi, v4hi)
v4hi __builtin_arm_wavg2hr (v4hi, v4hi)
v8qi __builtin_arm_wcmpeqb (v8qi, v8qi)
v4hi __builtin_arm_wcmpeqh (v4hi, v4hi)
v2si __builtin_arm_wcmpeqw (v2si, v2si)
v8qi __builtin_arm_wcmpgtsb (v8qi, v8qi)
v4hi __builtin_arm_wcmpgtsh (v4hi, v4hi)
v2si __builtin_arm_wcmpgtsw (v2si, v2si)
v8qi __builtin_arm_wcmpgtub (v8qi, v8qi)
v4hi __builtin_arm_wcmpgtuh (v4hi, v4hi)
v2si __builtin_arm_wcmpgtuw (v2si, v2si)
long long __builtin_arm_wmacs (long long, v4hi, v4hi)
long long __builtin_arm_wmacsz (v4hi, v4hi)
long long __builtin_arm_wmacu (long long, v4hi, v4hi)
long long __builtin_arm_wmacuz (v4hi, v4hi)
v4hi __builtin_arm_wmadds (v4hi, v4hi)
v4hi __builtin_arm_wmaddu (v4hi, v4hi)
v8qi __builtin_arm_wmaxsb (v8qi, v8qi)
v4hi __builtin_arm_wmaxsh (v4hi, v4hi)
v2si __builtin_arm_wmaxsw (v2si, v2si)
v8qi __builtin_arm_wmaxub (v8qi, v8qi)
v4hi __builtin_arm_wmaxuh (v4hi, v4hi)
v2si __builtin_arm_wmaxuw (v2si, v2si)
v8qi __builtin_arm_wminsb (v8qi, v8qi)
v4hi __builtin_arm_wminsh (v4hi, v4hi)
v2si __builtin_arm_wminsw (v2si, v2si)
v8qi __builtin_arm_wminub (v8qi, v8qi)
v4hi __builtin_arm_wminuh (v4hi, v4hi)
v2si __builtin_arm_wminuw (v2si, v2si)
v4hi __builtin_arm_wmulsm (v4hi, v4hi)
v4hi __builtin_arm_wmulul (v4hi, v4hi)
v4hi __builtin_arm_wmulum (v4hi, v4hi)
long long __builtin_arm_wor (long long, long long)
v2si __builtin_arm_wpackdss (long long, long long)
v2si __builtin_arm_wpackdus (long long, long long)
v8qi __builtin_arm_wpackhss (v4hi, v4hi)
v8qi __builtin_arm_wpackhus (v4hi, v4hi)
v4hi __builtin_arm_wpackwss (v2si, v2si)
v4hi __builtin_arm_wpackwus (v2si, v2si)
long long __builtin_arm_wrord (long long, long long)
long long __builtin_arm_wrordi (long long, int)
v4hi __builtin_arm_wrorh (v4hi, long long)
v4hi __builtin_arm_wrorhi (v4hi, int)
v2si __builtin_arm_wrorw (v2si, long long)
v2si __builtin_arm_wrorwi (v2si, int)
v2si __builtin_arm_wsadb (v2si, v8qi, v8qi)
v2si __builtin_arm_wsadbz (v8qi, v8qi)
v2si __builtin_arm_wsadh (v2si, v4hi, v4hi)
v2si __builtin_arm_wsadhz (v4hi, v4hi)
v4hi __builtin_arm_wshufh (v4hi, int)
long long __builtin_arm_wslld (long long, long long)
long long __builtin_arm_wslldi (long long, int)
v4hi __builtin_arm_wsllh (v4hi, long long)
v4hi __builtin_arm_wsllhi (v4hi, int)
v2si __builtin_arm_wsllw (v2si, long long)
v2si __builtin_arm_wsllwi (v2si, int)
long long __builtin_arm_wsrad (long long, long long)
long long __builtin_arm_wsradi (long long, int)
v4hi __builtin_arm_wsrah (v4hi, long long)
v4hi __builtin_arm_wsrahi (v4hi, int)
v2si __builtin_arm_wsraw (v2si, long long)
v2si __builtin_arm_wsrawi (v2si, int)
long long __builtin_arm_wsrld (long long, long long)
long long __builtin_arm_wsrldi (long long, int)
v4hi __builtin_arm_wsrlh (v4hi, long long)
v4hi __builtin_arm_wsrlhi (v4hi, int)
v2si __builtin_arm_wsrlw (v2si, long long)
v2si __builtin_arm_wsrlwi (v2si, int)
v8qi __builtin_arm_wsubb (v8qi, v8qi)
v8qi __builtin_arm_wsubbss (v8qi, v8qi)
v8qi __builtin_arm_wsubbus (v8qi, v8qi)
v4hi __builtin_arm_wsubh (v4hi, v4hi)
v4hi __builtin_arm_wsubhss (v4hi, v4hi)
v4hi __builtin_arm_wsubhus (v4hi, v4hi)
v2si __builtin_arm_wsubw (v2si, v2si)
v2si __builtin_arm_wsubwss (v2si, v2si)
v2si __builtin_arm_wsubwus (v2si, v2si)
v4hi __builtin_arm_wunpckehsb (v8qi)
v2si __builtin_arm_wunpckehsh (v4hi)
long long __builtin_arm_wunpckehsw (v2si)
v4hi __builtin_arm_wunpckehub (v8qi)
v2si __builtin_arm_wunpckehuh (v4hi)
long long __builtin_arm_wunpckehuw (v2si)
v4hi __builtin_arm_wunpckelsb (v8qi)
v2si __builtin_arm_wunpckelsh (v4hi)
long long __builtin_arm_wunpckelsw (v2si)
v4hi __builtin_arm_wunpckelub (v8qi)
v2si __builtin_arm_wunpckeluh (v4hi)
long long __builtin_arm_wunpckeluw (v2si)
v8qi __builtin_arm_wunpckihb (v8qi, v8qi)
v4hi __builtin_arm_wunpckihh (v4hi, v4hi)
v2si __builtin_arm_wunpckihw (v2si, v2si)
v8qi __builtin_arm_wunpckilb (v8qi, v8qi)
v4hi __builtin_arm_wunpckilh (v4hi, v4hi)
v2si __builtin_arm_wunpckilw (v2si, v2si)
long long __builtin_arm_wxor (long long, long long)
long long __builtin_arm_wzero ()
</pre>
</body></html>

View file

@ -0,0 +1,133 @@
<html lang="en">
<head>
<title>AVR Built-in Functions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Target-Builtins.html#Target-Builtins" title="Target Builtins">
<link rel="prev" href="ARM-NEON-Intrinsics.html#ARM-NEON-Intrinsics" title="ARM NEON Intrinsics">
<link rel="next" href="Blackfin-Built_002din-Functions.html#Blackfin-Built_002din-Functions" title="Blackfin Built-in Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="AVR-Built-in-Functions"></a>
<a name="AVR-Built_002din-Functions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Blackfin-Built_002din-Functions.html#Blackfin-Built_002din-Functions">Blackfin Built-in Functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="ARM-NEON-Intrinsics.html#ARM-NEON-Intrinsics">ARM NEON Intrinsics</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Target-Builtins.html#Target-Builtins">Target Builtins</a>
<hr>
</div>
<h4 class="subsection">6.56.4 AVR Built-in Functions</h4>
<p>For each built-in function for AVR, there is an equally named,
uppercase built-in macro defined. That way users can easily query if
or if not a specific built-in is implemented or not. For example, if
<code>__builtin_avr_nop</code> is available the macro
<code>__BUILTIN_AVR_NOP</code> is defined to <code>1</code> and undefined otherwise.
<p>The following built-in functions map to the respective machine
instruction, i.e. <code>nop</code>, <code>sei</code>, <code>cli</code>, <code>sleep</code>,
<code>wdr</code>, <code>swap</code>, <code>fmul</code>, <code>fmuls</code>
resp. <code>fmulsu</code>. The three <code>fmul*</code> built-ins are implemented
as library call if no hardware multiplier is available.
<pre class="smallexample"> void __builtin_avr_nop (void)
void __builtin_avr_sei (void)
void __builtin_avr_cli (void)
void __builtin_avr_sleep (void)
void __builtin_avr_wdr (void)
unsigned char __builtin_avr_swap (unsigned char)
unsigned int __builtin_avr_fmul (unsigned char, unsigned char)
int __builtin_avr_fmuls (char, char)
int __builtin_avr_fmulsu (char, unsigned char)
</pre>
<p>In order to delay execution for a specific number of cycles, GCC
implements
<pre class="smallexample"> void __builtin_avr_delay_cycles (unsigned long ticks)
</pre>
<p class="noindent"><code>ticks</code> is the number of ticks to delay execution. Note that this
built-in does not take into account the effect of interrupts that
might increase delay time. <code>ticks</code> must be a compile-time
integer constant; delays with a variable number of cycles are not supported.
<pre class="smallexample"> char __builtin_avr_flash_segment (const __memx void*)
</pre>
<p class="noindent">This built-in takes a byte address to the 24-bit
<a href="AVR-Named-Address-Spaces.html#AVR-Named-Address-Spaces">address space</a> <code>__memx</code> and returns
the number of the flash segment (the 64 KiB chunk) where the address
points to. Counting starts at <code>0</code>.
If the address does not point to flash memory, return <code>-1</code>.
<pre class="smallexample"> unsigned char __builtin_avr_insert_bits (unsigned long map, unsigned char bits, unsigned char val)
</pre>
<p class="noindent">Insert bits from <var>bits</var> into <var>val</var> and return the resulting
value. The nibbles of <var>map</var> determine how the insertion is
performed: Let <var>X</var> be the <var>n</var>-th nibble of <var>map</var>
<ol type=1 start=1>
<li>If <var>X</var> is <code>0xf</code>,
then the <var>n</var>-th bit of <var>val</var> is returned unaltered.
<li>If X is in the range 0<small class="dots">...</small>7,
then the <var>n</var>-th result bit is set to the <var>X</var>-th bit of <var>bits</var>
<li>If X is in the range 8<small class="dots">...</small><code>0xe</code>,
then the <var>n</var>-th result bit is undefined.
</ol>
<p class="noindent">One typical use case for this built-in is adjusting input and
output values to non-contiguous port layouts. Some examples:
<pre class="smallexample"> // same as val, bits is unused
__builtin_avr_insert_bits (0xffffffff, bits, val)
</pre>
<pre class="smallexample"> // same as bits, val is unused
__builtin_avr_insert_bits (0x76543210, bits, val)
</pre>
<pre class="smallexample"> // same as rotating bits by 4
__builtin_avr_insert_bits (0x32107654, bits, 0)
</pre>
<pre class="smallexample"> // high nibble of result is the high nibble of val
// low nibble of result is the low nibble of bits
__builtin_avr_insert_bits (0xffff3210, bits, val)
</pre>
<pre class="smallexample"> // reverse the bit order of bits
__builtin_avr_insert_bits (0x01234567, bits, 0)
</pre>
</body></html>

View file

@ -0,0 +1 @@
<meta http-equiv="refresh" content="0; url=Named-Address-Spaces.html#AVR%20Named%20Address%20Spaces">

View file

@ -0,0 +1,452 @@
<html lang="en">
<head>
<title>AVR Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="ARM-Options.html#ARM-Options" title="ARM Options">
<link rel="next" href="Blackfin-Options.html#Blackfin-Options" title="Blackfin Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="AVR-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Blackfin-Options.html#Blackfin-Options">Blackfin Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="ARM-Options.html#ARM-Options">ARM Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.4 AVR Options</h4>
<p><a name="index-AVR-Options-1154"></a>
These options are defined for AVR implementations:
<dl>
<dt><code>-mmcu=</code><var>mcu</var><dd><a name="index-mmcu-1155"></a>Specify Atmel AVR instruction set architectures (ISA) or MCU type.
<p>The default for this option is&nbsp;<code>avr2</code>.
<p>GCC supports the following AVR devices and ISAs:
<!-- Copyright (C) 2012-2013 Free Software Foundation, Inc. -->
<!-- This is part of the GCC manual. -->
<!-- For copying conditions, see the file gcc/doc/include/fdl.texi. -->
<!-- This file is generated automatically using -->
<!-- gcc/config/avr/gen-avr-mmcu-texi.c from: -->
<!-- gcc/config/avr/avr-arch.h -->
<!-- gcc/config/avr/avr-devices.c -->
<!-- gcc/config/avr/avr-mcus.def -->
<!-- Please do not edit manually. -->
<dl>
<dt><code>avr2</code><dd>&ldquo;Classic&rdquo; devices with up to 8&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>attiny22</code>, <code>attiny26</code>, <code>at90c8534</code>, <code>at90s2313</code>, <code>at90s2323</code>, <code>at90s2333</code>, <code>at90s2343</code>, <code>at90s4414</code>, <code>at90s4433</code>, <code>at90s4434</code>, <code>at90s8515</code>, <code>at90s8535</code>.
<br><dt><code>avr25</code><dd>&ldquo;Classic&rdquo; devices with up to 8&nbsp;KiB of program memory and with the <code>MOVW</code> instruction.
<br><var>mcu</var>&nbsp;= <code>ata5272</code>, <code>ata6289</code>, <code>attiny13</code>, <code>attiny13a</code>, <code>attiny2313</code>, <code>attiny2313a</code>, <code>attiny24</code>, <code>attiny24a</code>, <code>attiny25</code>, <code>attiny261</code>, <code>attiny261a</code>, <code>attiny43u</code>, <code>attiny4313</code>, <code>attiny44</code>, <code>attiny44a</code>, <code>attiny45</code>, <code>attiny461</code>, <code>attiny461a</code>, <code>attiny48</code>, <code>attiny84</code>, <code>attiny84a</code>, <code>attiny85</code>, <code>attiny861</code>, <code>attiny861a</code>, <code>attiny87</code>, <code>attiny88</code>, <code>at86rf401</code>.
<br><dt><code>avr3</code><dd>&ldquo;Classic&rdquo; devices with 16&nbsp;KiB up to 64&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>at43usb355</code>, <code>at76c711</code>.
<br><dt><code>avr31</code><dd>&ldquo;Classic&rdquo; devices with 128&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>atmega103</code>, <code>at43usb320</code>.
<br><dt><code>avr35</code><dd>&ldquo;Classic&rdquo; devices with 16&nbsp;KiB up to 64&nbsp;KiB of program memory and with the <code>MOVW</code> instruction.
<br><var>mcu</var>&nbsp;= <code>ata5505</code>, <code>atmega16u2</code>, <code>atmega32u2</code>, <code>atmega8u2</code>, <code>attiny1634</code>, <code>attiny167</code>, <code>at90usb162</code>, <code>at90usb82</code>.
<br><dt><code>avr4</code><dd>&ldquo;Enhanced&rdquo; devices with up to 8&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>ata6285</code>, <code>ata6286</code>, <code>atmega48</code>, <code>atmega48a</code>, <code>atmega48p</code>, <code>atmega48pa</code>, <code>atmega8</code>, <code>atmega8a</code>, <code>atmega8hva</code>, <code>atmega8515</code>, <code>atmega8535</code>, <code>atmega88</code>, <code>atmega88a</code>, <code>atmega88p</code>, <code>atmega88pa</code>, <code>at90pwm1</code>, <code>at90pwm2</code>, <code>at90pwm2b</code>, <code>at90pwm3</code>, <code>at90pwm3b</code>, <code>at90pwm81</code>.
<br><dt><code>avr5</code><dd>&ldquo;Enhanced&rdquo; devices with 16&nbsp;KiB up to 64&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>ata5790</code>, <code>ata5790n</code>, <code>ata5795</code>, <code>atmega16</code>, <code>atmega16a</code>, <code>atmega16hva</code>, <code>atmega16hva2</code>, <code>atmega16hvb</code>, <code>atmega16hvbrevb</code>, <code>atmega16m1</code>, <code>atmega16u4</code>, <code>atmega161</code>, <code>atmega162</code>, <code>atmega163</code>, <code>atmega164a</code>, <code>atmega164p</code>, <code>atmega164pa</code>, <code>atmega165</code>, <code>atmega165a</code>, <code>atmega165p</code>, <code>atmega165pa</code>, <code>atmega168</code>, <code>atmega168a</code>, <code>atmega168p</code>, <code>atmega168pa</code>, <code>atmega169</code>, <code>atmega169a</code>, <code>atmega169p</code>, <code>atmega169pa</code>, <code>atmega26hvg</code>, <code>atmega32</code>, <code>atmega32a</code>, <code>atmega32c1</code>, <code>atmega32hvb</code>, <code>atmega32hvbrevb</code>, <code>atmega32m1</code>, <code>atmega32u4</code>, <code>atmega32u6</code>, <code>atmega323</code>, <code>atmega324a</code>, <code>atmega324p</code>, <code>atmega324pa</code>, <code>atmega325</code>, <code>atmega325a</code>, <code>atmega325p</code>, <code>atmega3250</code>, <code>atmega3250a</code>, <code>atmega3250p</code>, <code>atmega3250pa</code>, <code>atmega328</code>, <code>atmega328p</code>, <code>atmega329</code>, <code>atmega329a</code>, <code>atmega329p</code>, <code>atmega329pa</code>, <code>atmega3290</code>, <code>atmega3290a</code>, <code>atmega3290p</code>, <code>atmega3290pa</code>, <code>atmega406</code>, <code>atmega48hvf</code>, <code>atmega64</code>, <code>atmega64a</code>, <code>atmega64c1</code>, <code>atmega64hve</code>, <code>atmega64m1</code>, <code>atmega64rfa2</code>, <code>atmega64rfr2</code>, <code>atmega640</code>, <code>atmega644</code>, <code>atmega644a</code>, <code>atmega644p</code>, <code>atmega644pa</code>, <code>atmega645</code>, <code>atmega645a</code>, <code>atmega645p</code>, <code>atmega6450</code>, <code>atmega6450a</code>, <code>atmega6450p</code>, <code>atmega649</code>, <code>atmega649a</code>, <code>atmega649p</code>, <code>atmega6490</code>, <code>atmega6490a</code>, <code>atmega6490p</code>, <code>at90can32</code>, <code>at90can64</code>, <code>at90pwm161</code>, <code>at90pwm216</code>, <code>at90pwm316</code>, <code>at90scr100</code>, <code>at90usb646</code>, <code>at90usb647</code>, <code>at94k</code>, <code>m3000</code>.
<br><dt><code>avr51</code><dd>&ldquo;Enhanced&rdquo; devices with 128&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>atmega128</code>, <code>atmega128a</code>, <code>atmega128rfa1</code>, <code>atmega1280</code>, <code>atmega1281</code>, <code>atmega1284</code>, <code>atmega1284p</code>, <code>at90can128</code>, <code>at90usb1286</code>, <code>at90usb1287</code>.
<br><dt><code>avr6</code><dd>&ldquo;Enhanced&rdquo; devices with 3-byte PC, i.e. with more than 128&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>atmega2560</code>, <code>atmega2561</code>.
<br><dt><code>avrxmega2</code><dd>&ldquo;XMEGA&rdquo; devices with more than 8&nbsp;KiB and up to 64&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>atmxt112sl</code>, <code>atmxt224</code>, <code>atmxt224e</code>, <code>atmxt336s</code>, <code>atxmega16a4</code>, <code>atxmega16a4u</code>, <code>atxmega16c4</code>, <code>atxmega16d4</code>, <code>atxmega16x1</code>, <code>atxmega32a4</code>, <code>atxmega32a4u</code>, <code>atxmega32c4</code>, <code>atxmega32d4</code>, <code>atxmega32e5</code>, <code>atxmega32x1</code>.
<br><dt><code>avrxmega4</code><dd>&ldquo;XMEGA&rdquo; devices with more than 64&nbsp;KiB and up to 128&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>atxmega64a3</code>, <code>atxmega64a3u</code>, <code>atxmega64a4u</code>, <code>atxmega64b1</code>, <code>atxmega64b3</code>, <code>atxmega64c3</code>, <code>atxmega64d3</code>, <code>atxmega64d4</code>.
<br><dt><code>avrxmega5</code><dd>&ldquo;XMEGA&rdquo; devices with more than 64&nbsp;KiB and up to 128&nbsp;KiB of program memory and more than 64&nbsp;KiB of RAM.
<br><var>mcu</var>&nbsp;= <code>atxmega64a1</code>, <code>atxmega64a1u</code>.
<br><dt><code>avrxmega6</code><dd>&ldquo;XMEGA&rdquo; devices with more than 128&nbsp;KiB of program memory.
<br><var>mcu</var>&nbsp;= <code>atmxt540s</code>, <code>atmxt540sreva</code>, <code>atxmega128a3</code>, <code>atxmega128a3u</code>, <code>atxmega128b1</code>, <code>atxmega128b3</code>, <code>atxmega128c3</code>, <code>atxmega128d3</code>, <code>atxmega128d4</code>, <code>atxmega192a3</code>, <code>atxmega192a3u</code>, <code>atxmega192c3</code>, <code>atxmega192d3</code>, <code>atxmega256a3</code>, <code>atxmega256a3b</code>, <code>atxmega256a3bu</code>, <code>atxmega256a3u</code>, <code>atxmega256c3</code>, <code>atxmega256d3</code>, <code>atxmega384c3</code>, <code>atxmega384d3</code>.
<br><dt><code>avrxmega7</code><dd>&ldquo;XMEGA&rdquo; devices with more than 128&nbsp;KiB of program memory and more than 64&nbsp;KiB of RAM.
<br><var>mcu</var>&nbsp;= <code>atxmega128a1</code>, <code>atxmega128a1u</code>, <code>atxmega128a4u</code>.
<br><dt><code>avr1</code><dd>This ISA is implemented by the minimal AVR core and supported for assembler only.
<br><var>mcu</var>&nbsp;= <code>attiny11</code>, <code>attiny12</code>, <code>attiny15</code>, <code>attiny28</code>, <code>at90s1200</code>.
</dl>
<br><dt><code>-maccumulate-args</code><dd><a name="index-maccumulate_002dargs-1156"></a>Accumulate outgoing function arguments and acquire/release the needed
stack space for outgoing function arguments once in function
prologue/epilogue. Without this option, outgoing arguments are pushed
before calling a function and popped afterwards.
<p>Popping the arguments after the function call can be expensive on
AVR so that accumulating the stack space might lead to smaller
executables because arguments need not to be removed from the
stack after such a function call.
<p>This option can lead to reduced code size for functions that perform
several calls to functions that get their arguments on the stack like
calls to printf-like functions.
<br><dt><code>-mbranch-cost=</code><var>cost</var><dd><a name="index-mbranch_002dcost-1157"></a>Set the branch costs for conditional branch instructions to
<var>cost</var>. Reasonable values for <var>cost</var> are small, non-negative
integers. The default branch cost is 0.
<br><dt><code>-mcall-prologues</code><dd><a name="index-mcall_002dprologues-1158"></a>Functions prologues/epilogues are expanded as calls to appropriate
subroutines. Code size is smaller.
<br><dt><code>-mint8</code><dd><a name="index-mint8-1159"></a>Assume <code>int</code> to be 8-bit integer. This affects the sizes of all types: a
<code>char</code> is 1 byte, an <code>int</code> is 1 byte, a <code>long</code> is 2 bytes,
and <code>long long</code> is 4 bytes. Please note that this option does not
conform to the C standards, but it results in smaller code
size.
<br><dt><code>-mno-interrupts</code><dd><a name="index-mno_002dinterrupts-1160"></a>Generated code is not compatible with hardware interrupts.
Code size is smaller.
<br><dt><code>-mrelax</code><dd><a name="index-mrelax-1161"></a>Try to replace <code>CALL</code> resp. <code>JMP</code> instruction by the shorter
<code>RCALL</code> resp. <code>RJMP</code> instruction if applicable.
Setting <code>-mrelax</code> just adds the <code>--relax</code> option to the
linker command line when the linker is called.
<p>Jump relaxing is performed by the linker because jump offsets are not
known before code is located. Therefore, the assembler code generated by the
compiler is the same, but the instructions in the executable may
differ from instructions in the assembler code.
<p>Relaxing must be turned on if linker stubs are needed, see the
section on <code>EIND</code> and linker stubs below.
<br><dt><code>-msp8</code><dd><a name="index-msp8-1162"></a>Treat the stack pointer register as an 8-bit register,
i.e. assume the high byte of the stack pointer is zero.
In general, you don't need to set this option by hand.
<p>This option is used internally by the compiler to select and
build multilibs for architectures <code>avr2</code> and <code>avr25</code>.
These architectures mix devices with and without <code>SPH</code>.
For any setting other than <code>-mmcu=avr2</code> or <code>-mmcu=avr25</code>
the compiler driver will add or remove this option from the compiler
proper's command line, because the compiler then knows if the device
or architecture has an 8-bit stack pointer and thus no <code>SPH</code>
register or not.
<br><dt><code>-mstrict-X</code><dd><a name="index-mstrict_002dX-1163"></a>Use address register <code>X</code> in a way proposed by the hardware. This means
that <code>X</code> is only used in indirect, post-increment or
pre-decrement addressing.
<p>Without this option, the <code>X</code> register may be used in the same way
as <code>Y</code> or <code>Z</code> which then is emulated by additional
instructions.
For example, loading a value with <code>X+const</code> addressing with a
small non-negative <code>const &lt; 64</code> to a register <var>Rn</var> is
performed as
<pre class="example"> adiw r26, const ; X += const
ld <var>Rn</var>, X ; <var>Rn</var> = *X
sbiw r26, const ; X -= const
</pre>
<br><dt><code>-mtiny-stack</code><dd><a name="index-mtiny_002dstack-1164"></a>Only change the lower 8&nbsp;bits of the stack pointer.
<br><dt><code>-Waddr-space-convert</code><dd><a name="index-Waddr_002dspace_002dconvert-1165"></a>Warn about conversions between address spaces in the case where the
resulting address space is not contained in the incoming address space.
</dl>
<h5 class="subsubsection">3.17.4.1 <code>EIND</code> and Devices with more than 128 Ki Bytes of Flash</h5>
<p><a name="index-g_t_0040code_007bEIND_007d-1166"></a>Pointers in the implementation are 16&nbsp;bits wide.
The address of a function or label is represented as word address so
that indirect jumps and calls can target any code address in the
range of 64&nbsp;Ki words.
<p>In order to facilitate indirect jump on devices with more than 128&nbsp;Ki
bytes of program memory space, there is a special function register called
<code>EIND</code> that serves as most significant part of the target address
when <code>EICALL</code> or <code>EIJMP</code> instructions are used.
<p>Indirect jumps and calls on these devices are handled as follows by
the compiler and are subject to some limitations:
<ul>
<li>The compiler never sets <code>EIND</code>.
<li>The compiler uses <code>EIND</code> implicitely in <code>EICALL</code>/<code>EIJMP</code>
instructions or might read <code>EIND</code> directly in order to emulate an
indirect call/jump by means of a <code>RET</code> instruction.
<li>The compiler assumes that <code>EIND</code> never changes during the startup
code or during the application. In particular, <code>EIND</code> is not
saved/restored in function or interrupt service routine
prologue/epilogue.
<li>For indirect calls to functions and computed goto, the linker
generates <em>stubs</em>. Stubs are jump pads sometimes also called
<em>trampolines</em>. Thus, the indirect call/jump jumps to such a stub.
The stub contains a direct jump to the desired address.
<li>Linker relaxation must be turned on so that the linker will generate
the stubs correctly an all situaltion. See the compiler option
<code>-mrelax</code> and the linler option <code>--relax</code>.
There are corner cases where the linker is supposed to generate stubs
but aborts without relaxation and without a helpful error message.
<li>The default linker script is arranged for code with <code>EIND = 0</code>.
If code is supposed to work for a setup with <code>EIND != 0</code>, a custom
linker script has to be used in order to place the sections whose
name start with <code>.trampolines</code> into the segment where <code>EIND</code>
points to.
<li>The startup code from libgcc never sets <code>EIND</code>.
Notice that startup code is a blend of code from libgcc and AVR-LibC.
For the impact of AVR-LibC on <code>EIND</code>, see the
<a href="http://nongnu.org/avr-libc/user-manual/">AVR-LibC&nbsp;user&nbsp;manual</a><!-- /@w -->.
<li>It is legitimate for user-specific startup code to set up <code>EIND</code>
early, for example by means of initialization code located in
section <code>.init3</code>. Such code runs prior to general startup code
that initializes RAM and calls constructors, but after the bit
of startup code from AVR-LibC that sets <code>EIND</code> to the segment
where the vector table is located.
<pre class="example"> #include &lt;avr/io.h&gt;
static void
__attribute__((section(".init3"),naked,used,no_instrument_function))
init3_set_eind (void)
{
__asm volatile ("ldi r24,pm_hh8(__trampolines_start)\n\t"
"out %i0,r24" :: "n" (&amp;EIND) : "r24","memory");
}
</pre>
<p class="noindent">The <code>__trampolines_start</code> symbol is defined in the linker script.
<li>Stubs are generated automatically by the linker if
the following two conditions are met:
<ul>
<li>The address of a label is taken by means of the <code>gs</code> modifier
(short for <em>generate stubs</em>) like so:
<pre class="example"> LDI r24, lo8(gs(<var>func</var>))
LDI r25, hi8(gs(<var>func</var>))
</pre>
<li>The final location of that label is in a code segment
<em>outside</em> the segment where the stubs are located.
</ul>
<li>The compiler emits such <code>gs</code> modifiers for code labels in the
following situations:
<ul>
<li>Taking address of a function or code label.
<li>Computed goto.
<li>If prologue-save function is used, see <samp><span class="option">-mcall-prologues</span></samp>
command-line option.
<li>Switch/case dispatch tables. If you do not want such dispatch
tables you can specify the <samp><span class="option">-fno-jump-tables</span></samp> command-line option.
<li>C and C++ constructors/destructors called during startup/shutdown.
<li>If the tools hit a <code>gs()</code> modifier explained above.
</ul>
<li>Jumping to non-symbolic addresses like so is <em>not</em> supported:
<pre class="example"> int main (void)
{
/* Call function at word address 0x2 */
return ((int(*)(void)) 0x2)();
}
</pre>
<p>Instead, a stub has to be set up, i.e. the function has to be called
through a symbol (<code>func_4</code> in the example):
<pre class="example"> int main (void)
{
extern int func_4 (void);
/* Call function at byte address 0x4 */
return func_4();
}
</pre>
<p>and the application be linked with <code>-Wl,--defsym,func_4=0x4</code>.
Alternatively, <code>func_4</code> can be defined in the linker script.
</ul>
<h5 class="subsubsection">3.17.4.2 Handling of the <code>RAMPD</code>, <code>RAMPX</code>, <code>RAMPY</code> and <code>RAMPZ</code> Special Function Registers</h5>
<p><a name="index-g_t_0040code_007bRAMPD_007d-1167"></a><a name="index-g_t_0040code_007bRAMPX_007d-1168"></a><a name="index-g_t_0040code_007bRAMPY_007d-1169"></a><a name="index-g_t_0040code_007bRAMPZ_007d-1170"></a>Some AVR devices support memories larger than the 64&nbsp;KiB range
that can be accessed with 16-bit pointers. To access memory locations
outside this 64&nbsp;KiB range, the contentent of a <code>RAMP</code>
register is used as high part of the address:
The <code>X</code>, <code>Y</code>, <code>Z</code> address register is concatenated
with the <code>RAMPX</code>, <code>RAMPY</code>, <code>RAMPZ</code> special function
register, respectively, to get a wide address. Similarly,
<code>RAMPD</code> is used together with direct addressing.
<ul>
<li>The startup code initializes the <code>RAMP</code> special function
registers with zero.
<li>If a <a href="AVR-Named-Address-Spaces.html#AVR-Named-Address-Spaces">named address space</a> other than
generic or <code>__flash</code> is used, then <code>RAMPZ</code> is set
as needed before the operation.
<li>If the device supports RAM larger than 64&nbsp;KiB and the compiler
needs to change <code>RAMPZ</code> to accomplish an operation, <code>RAMPZ</code>
is reset to zero after the operation.
<li>If the device comes with a specific <code>RAMP</code> register, the ISR
prologue/epilogue saves/restores that SFR and initializes it with
zero in case the ISR code might (implicitly) use it.
<li>RAM larger than 64&nbsp;KiB is not supported by GCC for AVR targets.
If you use inline assembler to read from locations outside the
16-bit address range and change one of the <code>RAMP</code> registers,
you must reset it to zero after the access.
</ul>
<h5 class="subsubsection">3.17.4.3 AVR Built-in Macros</h5>
<p>GCC defines several built-in macros so that the user code can test
for the presence or absence of features. Almost any of the following
built-in macros are deduced from device capabilities and thus
triggered by the <code>-mmcu=</code> command-line option.
<p>For even more AVR-specific built-in macros see
<a href="AVR-Named-Address-Spaces.html#AVR-Named-Address-Spaces">AVR Named Address Spaces</a> and <a href="AVR-Built_002din-Functions.html#AVR-Built_002din-Functions">AVR Built-in Functions</a>.
<dl>
<dt><code>__AVR_ARCH__</code><dd>Build-in macro that resolves to a decimal number that identifies the
architecture and depends on the <code>-mmcu=</code><var>mcu</var> option.
Possible values are:
<p><code>2</code>, <code>25</code>, <code>3</code>, <code>31</code>, <code>35</code>,
<code>4</code>, <code>5</code>, <code>51</code>, <code>6</code>, <code>102</code>, <code>104</code>,
<code>105</code>, <code>106</code>, <code>107</code>
<p>for <var>mcu</var>=<code>avr2</code>, <code>avr25</code>, <code>avr3</code>,
<code>avr31</code>, <code>avr35</code>, <code>avr4</code>, <code>avr5</code>, <code>avr51</code>,
<code>avr6</code>, <code>avrxmega2</code>, <code>avrxmega4</code>, <code>avrxmega5</code>,
<code>avrxmega6</code>, <code>avrxmega7</code>, respectively.
If <var>mcu</var> specifies a device, this built-in macro is set
accordingly. For example, with <code>-mmcu=atmega8</code> the macro will be
defined to <code>4</code>.
<br><dt><code>__AVR_</code><var>Device</var><code>__</code><dd>Setting <code>-mmcu=</code><var>device</var> defines this built-in macro which reflects
the device's name. For example, <code>-mmcu=atmega8</code> defines the
built-in macro <code>__AVR_ATmega8__</code>, <code>-mmcu=attiny261a</code> defines
<code>__AVR_ATtiny261A__</code>, etc.
<p>The built-in macros' names follow
the scheme <code>__AVR_</code><var>Device</var><code>__</code> where <var>Device</var> is
the device name as from the AVR user manual. The difference between
<var>Device</var> in the built-in macro and <var>device</var> in
<code>-mmcu=</code><var>device</var> is that the latter is always lowercase.
<p>If <var>device</var> is not a device but only a core architecture like
<code>avr51</code>, this macro will not be defined.
<br><dt><code>__AVR_XMEGA__</code><dd>The device / architecture belongs to the XMEGA family of devices.
<br><dt><code>__AVR_HAVE_ELPM__</code><dd>The device has the the <code>ELPM</code> instruction.
<br><dt><code>__AVR_HAVE_ELPMX__</code><dd>The device has the <code>ELPM R</code><var>n</var><code>,Z</code> and <code>ELPM
R</code><var>n</var><code>,Z+</code> instructions.
<br><dt><code>__AVR_HAVE_MOVW__</code><dd>The device has the <code>MOVW</code> instruction to perform 16-bit
register-register moves.
<br><dt><code>__AVR_HAVE_LPMX__</code><dd>The device has the <code>LPM R</code><var>n</var><code>,Z</code> and
<code>LPM R</code><var>n</var><code>,Z+</code> instructions.
<br><dt><code>__AVR_HAVE_MUL__</code><dd>The device has a hardware multiplier.
<br><dt><code>__AVR_HAVE_JMP_CALL__</code><dd>The device has the <code>JMP</code> and <code>CALL</code> instructions.
This is the case for devices with at least 16&nbsp;KiB of program
memory.
<br><dt><code>__AVR_HAVE_EIJMP_EICALL__</code><dt><code>__AVR_3_BYTE_PC__</code><dd>The device has the <code>EIJMP</code> and <code>EICALL</code> instructions.
This is the case for devices with more than 128&nbsp;KiB of program memory.
This also means that the program counter
(PC) is 3&nbsp;bytes wide.
<br><dt><code>__AVR_2_BYTE_PC__</code><dd>The program counter (PC) is 2&nbsp;bytes wide. This is the case for devices
with up to 128&nbsp;KiB of program memory.
<br><dt><code>__AVR_HAVE_8BIT_SP__</code><dt><code>__AVR_HAVE_16BIT_SP__</code><dd>The stack pointer (SP) register is treated as 8-bit respectively
16-bit register by the compiler.
The definition of these macros is affected by <code>-mtiny-stack</code>.
<br><dt><code>__AVR_HAVE_SPH__</code><dt><code>__AVR_SP8__</code><dd>The device has the SPH (high part of stack pointer) special function
register or has an 8-bit stack pointer, respectively.
The definition of these macros is affected by <code>-mmcu=</code> and
in the cases of <code>-mmcu=avr2</code> and <code>-mmcu=avr25</code> also
by <code>-msp8</code>.
<br><dt><code>__AVR_HAVE_RAMPD__</code><dt><code>__AVR_HAVE_RAMPX__</code><dt><code>__AVR_HAVE_RAMPY__</code><dt><code>__AVR_HAVE_RAMPZ__</code><dd>The device has the <code>RAMPD</code>, <code>RAMPX</code>, <code>RAMPY</code>,
<code>RAMPZ</code> special function register, respectively.
<br><dt><code>__NO_INTERRUPTS__</code><dd>This macro reflects the <code>-mno-interrupts</code> command line option.
<br><dt><code>__AVR_ERRATA_SKIP__</code><dt><code>__AVR_ERRATA_SKIP_JMP_CALL__</code><dd>Some AVR devices (AT90S8515, ATmega103) must not skip 32-bit
instructions because of a hardware erratum. Skip instructions are
<code>SBRS</code>, <code>SBRC</code>, <code>SBIS</code>, <code>SBIC</code> and <code>CPSE</code>.
The second macro is only defined if <code>__AVR_HAVE_JMP_CALL__</code> is also
set.
<br><dt><code>__AVR_SFR_OFFSET__=</code><var>offset</var><dd>Instructions that can address I/O special function registers directly
like <code>IN</code>, <code>OUT</code>, <code>SBI</code>, etc. may use a different
address as if addressed by an instruction to access RAM like <code>LD</code>
or <code>STS</code>. This offset depends on the device architecture and has
to be subtracted from the RAM address in order to get the
respective I/O&nbsp;address.
<br><dt><code>__WITH_AVRLIBC__</code><dd>The compiler is configured to be used together with AVR-Libc.
See the <code>--with-avrlibc</code> configure option.
</dl>
</body></html>

View file

@ -0,0 +1 @@
<meta http-equiv="refresh" content="0; url=Variable-Attributes.html#AVR%20Variable%20Attributes">

View file

@ -0,0 +1,63 @@
<html lang="en">
<head>
<title>Actual Bugs - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Trouble.html#Trouble" title="Trouble">
<link rel="next" href="Interoperation.html#Interoperation" title="Interoperation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Actual-Bugs"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Interoperation.html#Interoperation">Interoperation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Trouble.html#Trouble">Trouble</a>
<hr>
</div>
<h3 class="section">11.1 Actual Bugs We Haven't Fixed Yet</h3>
<ul>
<li>The <code>fixincludes</code> script interacts badly with automounters; if the
directory of system header files is automounted, it tends to be
unmounted while <code>fixincludes</code> is running. This would seem to be a
bug in the automounter. We don't know any good way to work around it.
</ul>
</body></html>

View file

@ -0,0 +1,169 @@
<html lang="en">
<head>
<title>Adapteva Epiphany Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="AArch64-Options.html#AArch64-Options" title="AArch64 Options">
<link rel="next" href="ARM-Options.html#ARM-Options" title="ARM Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Adapteva-Epiphany-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="ARM-Options.html#ARM-Options">ARM Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="AArch64-Options.html#AArch64-Options">AArch64 Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.2 Adapteva Epiphany Options</h4>
<p>These &lsquo;<samp><span class="samp">-m</span></samp>&rsquo; options are defined for Adapteva Epiphany:
<dl>
<dt><code>-mhalf-reg-file</code><dd><a name="index-mhalf_002dreg_002dfile-1099"></a>Don't allocate any register in the range <code>r32</code><small class="dots">...</small><code>r63</code>.
That allows code to run on hardware variants that lack these registers.
<br><dt><code>-mprefer-short-insn-regs</code><dd><a name="index-mprefer_002dshort_002dinsn_002dregs-1100"></a>Preferrentially allocate registers that allow short instruction generation.
This can result in increased instruction count, so this may either reduce or
increase overall code size.
<br><dt><code>-mbranch-cost=</code><var>num</var><dd><a name="index-mbranch_002dcost-1101"></a>Set the cost of branches to roughly <var>num</var> &ldquo;simple&rdquo; instructions.
This cost is only a heuristic and is not guaranteed to produce
consistent results across releases.
<br><dt><code>-mcmove</code><dd><a name="index-mcmove-1102"></a>Enable the generation of conditional moves.
<br><dt><code>-mnops=</code><var>num</var><dd><a name="index-mnops-1103"></a>Emit <var>num</var> NOPs before every other generated instruction.
<br><dt><code>-mno-soft-cmpsf</code><dd><a name="index-mno_002dsoft_002dcmpsf-1104"></a>For single-precision floating-point comparisons, emit an <code>fsub</code> instruction
and test the flags. This is faster than a software comparison, but can
get incorrect results in the presence of NaNs, or when two different small
numbers are compared such that their difference is calculated as zero.
The default is <samp><span class="option">-msoft-cmpsf</span></samp>, which uses slower, but IEEE-compliant,
software comparisons.
<br><dt><code>-mstack-offset=</code><var>num</var><dd><a name="index-mstack_002doffset-1105"></a>Set the offset between the top of the stack and the stack pointer.
E.g., a value of 8 means that the eight bytes in the range <code>sp+0...sp+7</code>
can be used by leaf functions without stack allocation.
Values other than &lsquo;<samp><span class="samp">8</span></samp>&rsquo; or &lsquo;<samp><span class="samp">16</span></samp>&rsquo; are untested and unlikely to work.
Note also that this option changes the ABI; compiling a program with a
different stack offset than the libraries have been compiled with
generally does not work.
This option can be useful if you want to evaluate if a different stack
offset would give you better code, but to actually use a different stack
offset to build working programs, it is recommended to configure the
toolchain with the appropriate <samp><span class="option">--with-stack-offset=</span><var>num</var></samp> option.
<br><dt><code>-mno-round-nearest</code><dd><a name="index-mno_002dround_002dnearest-1106"></a>Make the scheduler assume that the rounding mode has been set to
truncating. The default is <samp><span class="option">-mround-nearest</span></samp>.
<br><dt><code>-mlong-calls</code><dd><a name="index-mlong_002dcalls-1107"></a>If not otherwise specified by an attribute, assume all calls might be beyond
the offset range of the <code>b</code> / <code>bl</code> instructions, and therefore load the
function address into a register before performing a (otherwise direct) call.
This is the default.
<br><dt><code>-mshort-calls</code><dd><a name="index-short_002dcalls-1108"></a>If not otherwise specified by an attribute, assume all direct calls are
in the range of the <code>b</code> / <code>bl</code> instructions, so use these instructions
for direct calls. The default is <samp><span class="option">-mlong-calls</span></samp>.
<br><dt><code>-msmall16</code><dd><a name="index-msmall16-1109"></a>Assume addresses can be loaded as 16-bit unsigned values. This does not
apply to function addresses for which <samp><span class="option">-mlong-calls</span></samp> semantics
are in effect.
<br><dt><code>-mfp-mode=</code><var>mode</var><dd><a name="index-mfp_002dmode-1110"></a>Set the prevailing mode of the floating-point unit.
This determines the floating-point mode that is provided and expected
at function call and return time. Making this mode match the mode you
predominantly need at function start can make your programs smaller and
faster by avoiding unnecessary mode switches.
<p><var>mode</var> can be set to one the following values:
<dl>
<dt>&lsquo;<samp><span class="samp">caller</span></samp>&rsquo;<dd>Any mode at function entry is valid, and retained or restored when
the function returns, and when it calls other functions.
This mode is useful for compiling libraries or other compilation units
you might want to incorporate into different programs with different
prevailing FPU modes, and the convenience of being able to use a single
object file outweighs the size and speed overhead for any extra
mode switching that might be needed, compared with what would be needed
with a more specific choice of prevailing FPU mode.
<br><dt>&lsquo;<samp><span class="samp">truncate</span></samp>&rsquo;<dd>This is the mode used for floating-point calculations with
truncating (i.e. round towards zero) rounding mode. That includes
conversion from floating point to integer.
<br><dt>&lsquo;<samp><span class="samp">round-nearest</span></samp>&rsquo;<dd>This is the mode used for floating-point calculations with
round-to-nearest-or-even rounding mode.
<br><dt>&lsquo;<samp><span class="samp">int</span></samp>&rsquo;<dd>This is the mode used to perform integer calculations in the FPU, e.g.
integer multiply, or integer multiply-and-accumulate.
</dl>
<p>The default is <samp><span class="option">-mfp-mode=caller</span></samp>
<br><dt><code>-mnosplit-lohi</code><dt><code>-mno-postinc</code><dt><code>-mno-postmodify</code><dd><a name="index-mnosplit_002dlohi-1111"></a><a name="index-mno_002dpostinc-1112"></a><a name="index-mno_002dpostmodify-1113"></a>Code generation tweaks that disable, respectively, splitting of 32-bit
loads, generation of post-increment addresses, and generation of
post-modify addresses. The defaults are <samp><span class="option">msplit-lohi</span></samp>,
<samp><span class="option">-mpost-inc</span></samp>, and <samp><span class="option">-mpost-modify</span></samp>.
<br><dt><code>-mnovect-double</code><dd><a name="index-mno_002dvect_002ddouble-1114"></a>Change the preferred SIMD mode to SImode. The default is
<samp><span class="option">-mvect-double</span></samp>, which uses DImode as preferred SIMD mode.
<br><dt><code>-max-vect-align=</code><var>num</var><dd><a name="index-max_002dvect_002dalign-1115"></a>The maximum alignment for SIMD vector mode types.
<var>num</var> may be 4 or 8. The default is 8.
Note that this is an ABI change, even though many library function
interfaces are unaffected if they don't use SIMD vector modes
in places that affect size and/or alignment of relevant types.
<br><dt><code>-msplit-vecmove-early</code><dd><a name="index-msplit_002dvecmove_002dearly-1116"></a>Split vector moves into single word moves before reload. In theory this
can give better register allocation, but so far the reverse seems to be
generally the case.
<br><dt><code>-m1reg-</code><var>reg</var><dd><a name="index-m1reg_002d-1117"></a>Specify a register to hold the constant &minus;1, which makes loading small negative
constants and certain bitmasks faster.
Allowable values for <var>reg</var> are &lsquo;<samp><span class="samp">r43</span></samp>&rsquo; and &lsquo;<samp><span class="samp">r63</span></samp>&rsquo;,
which specify use of that register as a fixed register,
and &lsquo;<samp><span class="samp">none</span></samp>&rsquo;, which means that no register is used for this
purpose. The default is <samp><span class="option">-m1reg-none</span></samp>.
</dl>
</body></html>

View file

@ -0,0 +1,86 @@
<html lang="en">
<head>
<title>Alignment - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Type-Attributes.html#Type-Attributes" title="Type Attributes">
<link rel="next" href="Inline.html#Inline" title="Inline">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Alignment"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Inline.html#Inline">Inline</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Type-Attributes.html#Type-Attributes">Type Attributes</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.38 Inquiring on Alignment of Types or Variables</h3>
<p><a name="index-alignment-2790"></a><a name="index-type-alignment-2791"></a><a name="index-variable-alignment-2792"></a>
The keyword <code>__alignof__</code> allows you to inquire about how an object
is aligned, or the minimum alignment usually required by a type. Its
syntax is just like <code>sizeof</code>.
<p>For example, if the target machine requires a <code>double</code> value to be
aligned on an 8-byte boundary, then <code>__alignof__ (double)</code> is 8.
This is true on many RISC machines. On more traditional machine
designs, <code>__alignof__ (double)</code> is 4 or even 2.
<p>Some machines never actually require alignment; they allow reference to any
data type even at an odd address. For these machines, <code>__alignof__</code>
reports the smallest alignment that GCC gives the data type, usually as
mandated by the target ABI.
<p>If the operand of <code>__alignof__</code> is an lvalue rather than a type,
its value is the required alignment for its type, taking into account
any minimum alignment specified with GCC's <code>__attribute__</code>
extension (see <a href="Variable-Attributes.html#Variable-Attributes">Variable Attributes</a>). For example, after this
declaration:
<pre class="smallexample"> struct foo { int x; char y; } foo1;
</pre>
<p class="noindent">the value of <code>__alignof__ (foo1.y)</code> is 1, even though its actual
alignment is probably 2 or 4, the same as <code>__alignof__ (int)</code>.
<p>It is an error to ask for the alignment of an incomplete type.
</body></html>

View file

@ -0,0 +1,128 @@
<html lang="en">
<head>
<title>Alpha Built-in Functions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Target-Builtins.html#Target-Builtins" title="Target Builtins">
<link rel="next" href="ARM-iWMMXt-Built_002din-Functions.html#ARM-iWMMXt-Built_002din-Functions" title="ARM iWMMXt Built-in Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Alpha-Built-in-Functions"></a>
<a name="Alpha-Built_002din-Functions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="ARM-iWMMXt-Built_002din-Functions.html#ARM-iWMMXt-Built_002din-Functions">ARM iWMMXt Built-in Functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Target-Builtins.html#Target-Builtins">Target Builtins</a>
<hr>
</div>
<h4 class="subsection">6.56.1 Alpha Built-in Functions</h4>
<p>These built-in functions are available for the Alpha family of
processors, depending on the command-line switches used.
<p>The following built-in functions are always available. They
all generate the machine instruction that is part of the name.
<pre class="smallexample"> long __builtin_alpha_implver (void)
long __builtin_alpha_rpcc (void)
long __builtin_alpha_amask (long)
long __builtin_alpha_cmpbge (long, long)
long __builtin_alpha_extbl (long, long)
long __builtin_alpha_extwl (long, long)
long __builtin_alpha_extll (long, long)
long __builtin_alpha_extql (long, long)
long __builtin_alpha_extwh (long, long)
long __builtin_alpha_extlh (long, long)
long __builtin_alpha_extqh (long, long)
long __builtin_alpha_insbl (long, long)
long __builtin_alpha_inswl (long, long)
long __builtin_alpha_insll (long, long)
long __builtin_alpha_insql (long, long)
long __builtin_alpha_inswh (long, long)
long __builtin_alpha_inslh (long, long)
long __builtin_alpha_insqh (long, long)
long __builtin_alpha_mskbl (long, long)
long __builtin_alpha_mskwl (long, long)
long __builtin_alpha_mskll (long, long)
long __builtin_alpha_mskql (long, long)
long __builtin_alpha_mskwh (long, long)
long __builtin_alpha_msklh (long, long)
long __builtin_alpha_mskqh (long, long)
long __builtin_alpha_umulh (long, long)
long __builtin_alpha_zap (long, long)
long __builtin_alpha_zapnot (long, long)
</pre>
<p>The following built-in functions are always with <samp><span class="option">-mmax</span></samp>
or <samp><span class="option">-mcpu=</span><var>cpu</var></samp> where <var>cpu</var> is <code>pca56</code> or
later. They all generate the machine instruction that is part
of the name.
<pre class="smallexample"> long __builtin_alpha_pklb (long)
long __builtin_alpha_pkwb (long)
long __builtin_alpha_unpkbl (long)
long __builtin_alpha_unpkbw (long)
long __builtin_alpha_minub8 (long, long)
long __builtin_alpha_minsb8 (long, long)
long __builtin_alpha_minuw4 (long, long)
long __builtin_alpha_minsw4 (long, long)
long __builtin_alpha_maxub8 (long, long)
long __builtin_alpha_maxsb8 (long, long)
long __builtin_alpha_maxuw4 (long, long)
long __builtin_alpha_maxsw4 (long, long)
long __builtin_alpha_perr (long, long)
</pre>
<p>The following built-in functions are always with <samp><span class="option">-mcix</span></samp>
or <samp><span class="option">-mcpu=</span><var>cpu</var></samp> where <var>cpu</var> is <code>ev67</code> or
later. They all generate the machine instruction that is part
of the name.
<pre class="smallexample"> long __builtin_alpha_cttz (long)
long __builtin_alpha_ctlz (long)
long __builtin_alpha_ctpop (long)
</pre>
<p>The following built-in functions are available on systems that use the OSF/1
PALcode. Normally they invoke the <code>rduniq</code> and <code>wruniq</code>
PAL calls, but when invoked with <samp><span class="option">-mtls-kernel</span></samp>, they invoke
<code>rdval</code> and <code>wrval</code>.
<pre class="smallexample"> void *__builtin_thread_pointer (void)
void __builtin_set_thread_pointer (void *)
</pre>
</body></html>

View file

@ -0,0 +1,90 @@
<html lang="en">
<head>
<title>Alternate Keywords - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Explicit-Reg-Vars.html#Explicit-Reg-Vars" title="Explicit Reg Vars">
<link rel="next" href="Incomplete-Enums.html#Incomplete-Enums" title="Incomplete Enums">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Alternate-Keywords"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Incomplete-Enums.html#Incomplete-Enums">Incomplete Enums</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Explicit-Reg-Vars.html#Explicit-Reg-Vars">Explicit Reg Vars</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.45 Alternate Keywords</h3>
<p><a name="index-alternate-keywords-2885"></a><a name="index-keywords_002c-alternate-2886"></a>
<samp><span class="option">-ansi</span></samp> and the various <samp><span class="option">-std</span></samp> options disable certain
keywords. This causes trouble when you want to use GNU C extensions, or
a general-purpose header file that should be usable by all programs,
including ISO C programs. The keywords <code>asm</code>, <code>typeof</code> and
<code>inline</code> are not available in programs compiled with
<samp><span class="option">-ansi</span></samp> or <samp><span class="option">-std</span></samp> (although <code>inline</code> can be used in a
program compiled with <samp><span class="option">-std=c99</span></samp> or <samp><span class="option">-std=c11</span></samp>). The
ISO C99 keyword
<code>restrict</code> is only available when <samp><span class="option">-std=gnu99</span></samp> (which will
eventually be the default) or <samp><span class="option">-std=c99</span></samp> (or the equivalent
<samp><span class="option">-std=iso9899:1999</span></samp>), or an option for a later standard
version, is used.
<p>The way to solve these problems is to put &lsquo;<samp><span class="samp">__</span></samp>&rsquo; at the beginning and
end of each problematical keyword. For example, use <code>__asm__</code>
instead of <code>asm</code>, and <code>__inline__</code> instead of <code>inline</code>.
<p>Other C compilers won't accept these alternative keywords; if you want to
compile with another compiler, you can define the alternate keywords as
macros to replace them with the customary keywords. It looks like this:
<pre class="smallexample"> #ifndef __GNUC__
#define __asm__ asm
#endif
</pre>
<p><a name="index-g_t_005f_005fextension_005f_005f-2887"></a><a name="index-pedantic-2888"></a><samp><span class="option">-pedantic</span></samp> and other options cause warnings for many GNU C extensions.
You can
prevent such warnings within one expression by writing
<code>__extension__</code> before the expression. <code>__extension__</code> has no
effect aside from this.
</body></html>

View file

@ -0,0 +1,77 @@
<html lang="en">
<head>
<title>Architecture implementation - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Implementation.html#C-Implementation" title="C Implementation">
<link rel="prev" href="Library-functions-implementation.html#Library-functions-implementation" title="Library functions implementation">
<link rel="next" href="Locale_002dspecific-behavior-implementation.html#Locale_002dspecific-behavior-implementation" title="Locale-specific behavior implementation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Architecture-implementation"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Locale_002dspecific-behavior-implementation.html#Locale_002dspecific-behavior-implementation">Locale-specific behavior implementation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Library-functions-implementation.html#Library-functions-implementation">Library functions implementation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Implementation.html#C-Implementation">C Implementation</a>
<hr>
</div>
<h3 class="section">4.15 Architecture</h3>
<ul>
<li><cite>The values or expressions assigned to the macros specified in the
headers </cite><code>&lt;float.h&gt;</code><cite>, </cite><code>&lt;limits.h&gt;</code><cite>, and </cite><code>&lt;stdint.h&gt;</code><cite>
(C90 and C99 5.2.4.2, C99 7.18.2, C99 7.18.3).</cite>
<p>Determined by ABI.
<li><cite>The number, order, and encoding of bytes in any object
(when not explicitly specified in this International Standard) (C99 6.2.6.1).</cite>
<p>Determined by ABI.
<li><cite>The value of the result of the </cite><code>sizeof</code><cite> operator (C90
6.3.3.4, C99 6.5.3.4).</cite>
<p>Determined by ABI.
</ul>
</body></html>

View file

@ -0,0 +1,91 @@
<html lang="en">
<head>
<title>Argument Types - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="FR_002dV-Built_002din-Functions.html#FR_002dV-Built_002din-Functions" title="FR-V Built-in Functions">
<link rel="next" href="Directly_002dmapped-Integer-Functions.html#Directly_002dmapped-Integer-Functions" title="Directly-mapped Integer Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Argument-Types"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Directly_002dmapped-Integer-Functions.html#Directly_002dmapped-Integer-Functions">Directly-mapped Integer Functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="FR_002dV-Built_002din-Functions.html#FR_002dV-Built_002din-Functions">FR-V Built-in Functions</a>
<hr>
</div>
<h5 class="subsubsection">6.56.6.1 Argument Types</h5>
<p>The arguments to the built-in functions can be divided into three groups:
register numbers, compile-time constants and run-time values. In order
to make this classification clear at a glance, the arguments and return
values are given the following pseudo types:
<p><table summary=""><tr align="left"><td valign="top" width="20%">Pseudo type </td><td valign="top" width="30%">Real C type </td><td valign="top" width="15%">Constant? </td><td valign="top" width="35%">Description
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>uh</code> </td><td valign="top" width="30%"><code>unsigned short</code> </td><td valign="top" width="15%">No </td><td valign="top" width="35%">an unsigned halfword
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>uw1</code> </td><td valign="top" width="30%"><code>unsigned int</code> </td><td valign="top" width="15%">No </td><td valign="top" width="35%">an unsigned word
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>sw1</code> </td><td valign="top" width="30%"><code>int</code> </td><td valign="top" width="15%">No </td><td valign="top" width="35%">a signed word
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>uw2</code> </td><td valign="top" width="30%"><code>unsigned long long</code> </td><td valign="top" width="15%">No
</td><td valign="top" width="35%">an unsigned doubleword
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>sw2</code> </td><td valign="top" width="30%"><code>long long</code> </td><td valign="top" width="15%">No </td><td valign="top" width="35%">a signed doubleword
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>const</code> </td><td valign="top" width="30%"><code>int</code> </td><td valign="top" width="15%">Yes </td><td valign="top" width="35%">an integer constant
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>acc</code> </td><td valign="top" width="30%"><code>int</code> </td><td valign="top" width="15%">Yes </td><td valign="top" width="35%">an ACC register number
<br></td></tr><tr align="left"><td valign="top" width="20%"><code>iacc</code> </td><td valign="top" width="30%"><code>int</code> </td><td valign="top" width="15%">Yes </td><td valign="top" width="35%">an IACC register number
<br></td></tr></table>
<p>These pseudo types are not defined by GCC, they are simply a notational
convenience used in this manual.
<p>Arguments of type <code>uh</code>, <code>uw1</code>, <code>sw1</code>, <code>uw2</code>
and <code>sw2</code> are evaluated at run time. They correspond to
register operands in the underlying FR-V instructions.
<p><code>const</code> arguments represent immediate operands in the underlying
FR-V instructions. They must be compile-time constants.
<p><code>acc</code> arguments are evaluated at compile time and specify the number
of an accumulator register. For example, an <code>acc</code> argument of 2
selects the ACC2 register.
<p><code>iacc</code> arguments are similar to <code>acc</code> arguments but specify the
number of an IACC register. See see <a href="Other-Built_002din-Functions.html#Other-Built_002din-Functions">Other Built-in Functions</a>
for more details.
</body></html>

View file

@ -0,0 +1,99 @@
<html lang="en">
<head>
<title>Arrays and pointers implementation - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Implementation.html#C-Implementation" title="C Implementation">
<link rel="prev" href="Floating-point-implementation.html#Floating-point-implementation" title="Floating point implementation">
<link rel="next" href="Hints-implementation.html#Hints-implementation" title="Hints implementation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Arrays-and-pointers-implementation"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Hints-implementation.html#Hints-implementation">Hints implementation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Floating-point-implementation.html#Floating-point-implementation">Floating point implementation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Implementation.html#C-Implementation">C Implementation</a>
<hr>
</div>
<h3 class="section">4.7 Arrays and pointers</h3>
<ul>
<li><cite>The result of converting a pointer to an integer or
vice versa (C90 6.3.4, C99 6.3.2.3).</cite>
<p>A cast from pointer to integer discards most-significant bits if the
pointer representation is larger than the integer type,
sign-extends<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>
if the pointer representation is smaller than the integer type, otherwise
the bits are unchanged.
<!-- ??? We've always claimed that pointers were unsigned entities. -->
<!-- Shouldn't we therefore be doing zero-extension? If so, the bug -->
<!-- is in convert_to_integer, where we call type_for_size and request -->
<!-- a signed integral type. On the other hand, it might be most useful -->
<!-- for the target if we extend according to POINTERS_EXTEND_UNSIGNED. -->
<p>A cast from integer to pointer discards most-significant bits if the
pointer representation is smaller than the integer type, extends according
to the signedness of the integer type if the pointer representation
is larger than the integer type, otherwise the bits are unchanged.
<p>When casting from pointer to integer and back again, the resulting
pointer must reference the same object as the original pointer, otherwise
the behavior is undefined. That is, one may not use integer arithmetic to
avoid the undefined behavior of pointer arithmetic as proscribed in
C99 6.5.6/8.
<li><cite>The size of the result of subtracting two pointers to elements
of the same array (C90 6.3.6, C99 6.5.6).</cite>
<p>The value is as specified in the standard and the type is determined
by the ABI.
</ul>
<div class="footnote">
<hr>
<h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> Future versions of GCC may zero-extend, or use
a target-defined <code>ptr_extend</code> pattern. Do not rely on sign extension.</p>
<hr></div>
</body></html>

View file

@ -0,0 +1,95 @@
<html lang="en">
<head>
<title>Asm Labels - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Constraints.html#Constraints" title="Constraints">
<link rel="next" href="Explicit-Reg-Vars.html#Explicit-Reg-Vars" title="Explicit Reg Vars">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Asm-Labels"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Explicit-Reg-Vars.html#Explicit-Reg-Vars">Explicit Reg Vars</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Constraints.html#Constraints">Constraints</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.43 Controlling Names Used in Assembler Code</h3>
<p><a name="index-assembler-names-for-identifiers-2867"></a><a name="index-names-used-in-assembler-code-2868"></a><a name="index-identifiers_002c-names-in-assembler-code-2869"></a>
You can specify the name to be used in the assembler code for a C
function or variable by writing the <code>asm</code> (or <code>__asm__</code>)
keyword after the declarator as follows:
<pre class="smallexample"> int foo asm ("myfoo") = 2;
</pre>
<p class="noindent">This specifies that the name to be used for the variable <code>foo</code> in
the assembler code should be &lsquo;<samp><span class="samp">myfoo</span></samp>&rsquo; rather than the usual
&lsquo;<samp><span class="samp">_foo</span></samp>&rsquo;.
<p>On systems where an underscore is normally prepended to the name of a C
function or variable, this feature allows you to define names for the
linker that do not start with an underscore.
<p>It does not make sense to use this feature with a non-static local
variable since such variables do not have assembler names. If you are
trying to put the variable in a particular register, see <a href="Explicit-Reg-Vars.html#Explicit-Reg-Vars">Explicit Reg Vars</a>. GCC presently accepts such code with a warning, but will
probably be changed to issue an error, rather than a warning, in the
future.
<p>You cannot use <code>asm</code> in this way in a function <em>definition</em>; but
you can get the same effect by writing a declaration for the function
before its definition and putting <code>asm</code> there, like this:
<pre class="smallexample"> extern func () asm ("FUNC");
func (x, y)
int x, y;
/* <span class="roman">...</span> */
</pre>
<p>It is up to you to make sure that the assembler names you choose do not
conflict with any other assembler symbols. Also, you must not use a
register name; that would produce completely invalid assembler code. GCC
does not as yet have the ability to store static variables in registers.
Perhaps that will be added.
</body></html>

View file

@ -0,0 +1,74 @@
<html lang="en">
<head>
<title>Assembler Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC">
<link rel="prev" href="Preprocessor-Options.html#Preprocessor-Options" title="Preprocessor Options">
<link rel="next" href="Link-Options.html#Link-Options" title="Link Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Assembler-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Link-Options.html#Link-Options">Link Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Preprocessor-Options.html#Preprocessor-Options">Preprocessor Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking-GCC">Invoking GCC</a>
<hr>
</div>
<h3 class="section">3.12 Passing Options to the Assembler</h3>
<!-- prevent bad page break with this line -->
<p>You can pass options to the assembler.
<dl>
<dt><code>-Wa,</code><var>option</var><dd><a name="index-Wa-1024"></a>Pass <var>option</var> as an option to the assembler. If <var>option</var>
contains commas, it is split into multiple options at the commas.
<br><dt><code>-Xassembler </code><var>option</var><dd><a name="index-Xassembler-1025"></a>Pass <var>option</var> as an option to the assembler. You can use this to
supply system-specific assembler options that GCC does not
recognize.
<p>If you want to pass an option that takes an argument, you must use
<samp><span class="option">-Xassembler</span></samp> twice, once for the option and once for the argument.
</dl>
</body></html>

View file

@ -0,0 +1,268 @@
<html lang="en">
<head>
<title>Attribute Syntax - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Function-Attributes.html#Function-Attributes" title="Function Attributes">
<link rel="next" href="Function-Prototypes.html#Function-Prototypes" title="Function Prototypes">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Attribute-Syntax"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Function-Prototypes.html#Function-Prototypes">Function Prototypes</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Function-Attributes.html#Function-Attributes">Function Attributes</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.31 Attribute Syntax</h3>
<p><a name="index-attribute-syntax-2751"></a>
This section describes the syntax with which <code>__attribute__</code> may be
used, and the constructs to which attribute specifiers bind, for the C
language. Some details may vary for C++ and Objective-C. Because of
infelicities in the grammar for attributes, some forms described here
may not be successfully parsed in all cases.
<p>There are some problems with the semantics of attributes in C++. For
example, there are no manglings for attributes, although they may affect
code generation, so problems may arise when attributed types are used in
conjunction with templates or overloading. Similarly, <code>typeid</code>
does not distinguish between types with different attributes. Support
for attributes in C++ may be restricted in future to attributes on
declarations only, but not on nested declarators.
<p>See <a href="Function-Attributes.html#Function-Attributes">Function Attributes</a>, for details of the semantics of attributes
applying to functions. See <a href="Variable-Attributes.html#Variable-Attributes">Variable Attributes</a>, for details of the
semantics of attributes applying to variables. See <a href="Type-Attributes.html#Type-Attributes">Type Attributes</a>,
for details of the semantics of attributes applying to structure, union
and enumerated types.
<p>An <dfn>attribute specifier</dfn> is of the form
<code>__attribute__ ((</code><var>attribute-list</var><code>))</code>. An <dfn>attribute list</dfn>
is a possibly empty comma-separated sequence of <dfn>attributes</dfn>, where
each attribute is one of the following:
<ul>
<li>Empty. Empty attributes are ignored.
<li>A word (which may be an identifier such as <code>unused</code>, or a reserved
word such as <code>const</code>).
<li>A word, followed by, in parentheses, parameters for the attribute.
These parameters take one of the following forms:
<ul>
<li>An identifier. For example, <code>mode</code> attributes use this form.
<li>An identifier followed by a comma and a non-empty comma-separated list
of expressions. For example, <code>format</code> attributes use this form.
<li>A possibly empty comma-separated list of expressions. For example,
<code>format_arg</code> attributes use this form with the list being a single
integer constant expression, and <code>alias</code> attributes use this form
with the list being a single string constant.
</ul>
</ul>
<p>An <dfn>attribute specifier list</dfn> is a sequence of one or more attribute
specifiers, not separated by any other tokens.
<p>In GNU C, an attribute specifier list may appear after the colon following a
label, other than a <code>case</code> or <code>default</code> label. The only
attribute it makes sense to use after a label is <code>unused</code>. This
feature is intended for program-generated code that may contain unused labels,
but which is compiled with <samp><span class="option">-Wall</span></samp>. It is
not normally appropriate to use in it human-written code, though it
could be useful in cases where the code that jumps to the label is
contained within an <code>#ifdef</code> conditional. GNU C++ only permits
attributes on labels if the attribute specifier is immediately
followed by a semicolon (i.e., the label applies to an empty
statement). If the semicolon is missing, C++ label attributes are
ambiguous, as it is permissible for a declaration, which could begin
with an attribute list, to be labelled in C++. Declarations cannot be
labelled in C90 or C99, so the ambiguity does not arise there.
<p>An attribute specifier list may appear as part of a <code>struct</code>,
<code>union</code> or <code>enum</code> specifier. It may go either immediately
after the <code>struct</code>, <code>union</code> or <code>enum</code> keyword, or after
the closing brace. The former syntax is preferred.
Where attribute specifiers follow the closing brace, they are considered
to relate to the structure, union or enumerated type defined, not to any
enclosing declaration the type specifier appears in, and the type
defined is not complete until after the attribute specifiers.
<!-- Otherwise, there would be the following problems: a shift/reduce -->
<!-- conflict between attributes binding the struct/union/enum and -->
<!-- binding to the list of specifiers/qualifiers; and "aligned" -->
<!-- attributes could use sizeof for the structure, but the size could be -->
<!-- changed later by "packed" attributes. -->
<p>Otherwise, an attribute specifier appears as part of a declaration,
counting declarations of unnamed parameters and type names, and relates
to that declaration (which may be nested in another declaration, for
example in the case of a parameter declaration), or to a particular declarator
within a declaration. Where an
attribute specifier is applied to a parameter declared as a function or
an array, it should apply to the function or array rather than the
pointer to which the parameter is implicitly converted, but this is not
yet correctly implemented.
<p>Any list of specifiers and qualifiers at the start of a declaration may
contain attribute specifiers, whether or not such a list may in that
context contain storage class specifiers. (Some attributes, however,
are essentially in the nature of storage class specifiers, and only make
sense where storage class specifiers may be used; for example,
<code>section</code>.) There is one necessary limitation to this syntax: the
first old-style parameter declaration in a function definition cannot
begin with an attribute specifier, because such an attribute applies to
the function instead by syntax described below (which, however, is not
yet implemented in this case). In some other cases, attribute
specifiers are permitted by this grammar but not yet supported by the
compiler. All attribute specifiers in this place relate to the
declaration as a whole. In the obsolescent usage where a type of
<code>int</code> is implied by the absence of type specifiers, such a list of
specifiers and qualifiers may be an attribute specifier list with no
other specifiers or qualifiers.
<p>At present, the first parameter in a function prototype must have some
type specifier that is not an attribute specifier; this resolves an
ambiguity in the interpretation of <code>void f(int
(__attribute__((foo)) x))</code>, but is subject to change. At present, if
the parentheses of a function declarator contain only attributes then
those attributes are ignored, rather than yielding an error or warning
or implying a single parameter of type int, but this is subject to
change.
<p>An attribute specifier list may appear immediately before a declarator
(other than the first) in a comma-separated list of declarators in a
declaration of more than one identifier using a single list of
specifiers and qualifiers. Such attribute specifiers apply
only to the identifier before whose declarator they appear. For
example, in
<pre class="smallexample"> __attribute__((noreturn)) void d0 (void),
__attribute__((format(printf, 1, 2))) d1 (const char *, ...),
d2 (void)
</pre>
<p class="noindent">the <code>noreturn</code> attribute applies to all the functions
declared; the <code>format</code> attribute only applies to <code>d1</code>.
<p>An attribute specifier list may appear immediately before the comma,
<code>=</code> or semicolon terminating the declaration of an identifier other
than a function definition. Such attribute specifiers apply
to the declared object or function. Where an
assembler name for an object or function is specified (see <a href="Asm-Labels.html#Asm-Labels">Asm Labels</a>), the attribute must follow the <code>asm</code>
specification.
<p>An attribute specifier list may, in future, be permitted to appear after
the declarator in a function definition (before any old-style parameter
declarations or the function body).
<p>Attribute specifiers may be mixed with type qualifiers appearing inside
the <code>[]</code> of a parameter array declarator, in the C99 construct by
which such qualifiers are applied to the pointer to which the array is
implicitly converted. Such attribute specifiers apply to the pointer,
not to the array, but at present this is not implemented and they are
ignored.
<p>An attribute specifier list may appear at the start of a nested
declarator. At present, there are some limitations in this usage: the
attributes correctly apply to the declarator, but for most individual
attributes the semantics this implies are not implemented.
When attribute specifiers follow the <code>*</code> of a pointer
declarator, they may be mixed with any type qualifiers present.
The following describes the formal semantics of this syntax. It makes the
most sense if you are familiar with the formal specification of
declarators in the ISO C standard.
<p>Consider (as in C99 subclause 6.7.5 paragraph 4) a declaration <code>T
D1</code>, where <code>T</code> contains declaration specifiers that specify a type
<var>Type</var> (such as <code>int</code>) and <code>D1</code> is a declarator that
contains an identifier <var>ident</var>. The type specified for <var>ident</var>
for derived declarators whose type does not include an attribute
specifier is as in the ISO C standard.
<p>If <code>D1</code> has the form <code>( </code><var>attribute-specifier-list</var><code> D )</code>,
and the declaration <code>T D</code> specifies the type
&ldquo;<var>derived-declarator-type-list</var> <var>Type</var>&rdquo; for <var>ident</var>, then
<code>T D1</code> specifies the type &ldquo;<var>derived-declarator-type-list</var>
<var>attribute-specifier-list</var> <var>Type</var>&rdquo; for <var>ident</var>.
<p>If <code>D1</code> has the form <code>*
</code><var>type-qualifier-and-attribute-specifier-list</var><code> D</code>, and the
declaration <code>T D</code> specifies the type
&ldquo;<var>derived-declarator-type-list</var> <var>Type</var>&rdquo; for <var>ident</var>, then
<code>T D1</code> specifies the type &ldquo;<var>derived-declarator-type-list</var>
<var>type-qualifier-and-attribute-specifier-list</var> pointer to <var>Type</var>&rdquo; for
<var>ident</var>.
<p>For example,
<pre class="smallexample"> void (__attribute__((noreturn)) ****f) (void);
</pre>
<p class="noindent">specifies the type &ldquo;pointer to pointer to pointer to pointer to
non-returning function returning <code>void</code>&rdquo;. As another example,
<pre class="smallexample"> char *__attribute__((aligned(8))) *f;
</pre>
<p class="noindent">specifies the type &ldquo;pointer to 8-byte-aligned pointer to <code>char</code>&rdquo;.
Note again that this does not work with most attributes; for example,
the usage of &lsquo;<samp><span class="samp">aligned</span></samp>&rsquo; and &lsquo;<samp><span class="samp">noreturn</span></samp>&rsquo; attributes given above
is not yet supported.
<p>For compatibility with existing code written for compiler versions that
did not implement attributes on nested declarators, some laxity is
allowed in the placing of attributes. If an attribute that only applies
to types is applied to a declaration, it is treated as applying to
the type of that declaration. If an attribute that only applies to
declarations is applied to the type of a declaration, it is treated
as applying to that declaration; and, for compatibility with code
placing the attributes immediately before the identifier declared, such
an attribute applied to a function return type is treated as
applying to the function type, and such an attribute applied to an array
element type is treated as applying to the array type. If an
attribute that only applies to function types is applied to a
pointer-to-function type, it is treated as applying to the pointer
target type; if such an attribute is applied to a function return type
that is not a pointer-to-function type, it is treated as applying
to the function type.
</body></html>

View file

@ -0,0 +1,82 @@
<html lang="en">
<head>
<title>Backwards Compatibility - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions" title="C++ Extensions">
<link rel="prev" href="Deprecated-Features.html#Deprecated-Features" title="Deprecated Features">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Backwards-Compatibility"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Deprecated-Features.html#Deprecated-Features">Deprecated Features</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions">C++ Extensions</a>
<hr>
</div>
<h3 class="section">7.13 Backwards Compatibility</h3>
<p><a name="index-Backwards-Compatibility-3534"></a><a name="index-ARM-_005bAnnotated-C_002b_002b-Reference-Manual_005d-3535"></a>
Now that there is a definitive ISO standard C++, G++ has a specification
to adhere to. The C++ language evolved over time, and features that
used to be acceptable in previous drafts of the standard, such as the ARM
[Annotated C++ Reference Manual], are no longer accepted. In order to allow
compilation of C++ written to such drafts, G++ contains some backwards
compatibilities. <em>All such backwards compatibility features are
liable to disappear in future versions of G++.</em> They should be considered
deprecated. See <a href="Deprecated-Features.html#Deprecated-Features">Deprecated Features</a>.
<dl>
<dt><code>For scope</code><dd>If a variable is declared at for scope, it used to remain in scope until
the end of the scope that contained the for statement (rather than just
within the for scope). G++ retains this, but issues a warning, if such a
variable is accessed outside the for scope.
<br><dt><code>Implicit C language</code><dd>Old C system header files did not contain an <code>extern "C" {...}</code>
scope to set the language. On such systems, all header files are
implicitly scoped inside a C language scope. Also, an empty prototype
<code>()</code> is treated as an unspecified number of arguments, rather
than no arguments, as C++ demands.
</dl>
<!-- Copyright (C) 1988-2013 Free Software Foundation, Inc. -->
<!-- This is part of the GCC manual. -->
<!-- For copying conditions, see the file gcc.texi. -->
</body></html>

View file

@ -0,0 +1,73 @@
<html lang="en">
<head>
<title>Binary constants - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Thread_002dLocal.html#Thread_002dLocal" title="Thread-Local">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Binary-constants"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Thread_002dLocal.html#Thread_002dLocal">Thread-Local</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.61 Binary constants using the &lsquo;<samp><span class="samp">0b</span></samp>&rsquo; prefix</h3>
<p><a name="index-Binary-constants-using-the-_0040samp_007b0b_007d-prefix-3497"></a>
Integer constants can be written as binary constants, consisting of a
sequence of &lsquo;<samp><span class="samp">0</span></samp>&rsquo; and &lsquo;<samp><span class="samp">1</span></samp>&rsquo; digits, prefixed by &lsquo;<samp><span class="samp">0b</span></samp>&rsquo; or
&lsquo;<samp><span class="samp">0B</span></samp>&rsquo;. This is particularly useful in environments that operate a
lot on the bit level (like microcontrollers).
<p>The following statements are identical:
<pre class="smallexample"> i = 42;
i = 0x2a;
i = 052;
i = 0b101010;
</pre>
<p>The type of these constants follows the same rules as for octal or
hexadecimal integer constants, so suffixes like &lsquo;<samp><span class="samp">L</span></samp>&rsquo; or &lsquo;<samp><span class="samp">UL</span></samp>&rsquo;
can be applied.
</body></html>

View file

@ -0,0 +1,68 @@
<html lang="en">
<head>
<title>Blackfin Built-in Functions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Target-Builtins.html#Target-Builtins" title="Target Builtins">
<link rel="prev" href="AVR-Built_002din-Functions.html#AVR-Built_002din-Functions" title="AVR Built-in Functions">
<link rel="next" href="FR_002dV-Built_002din-Functions.html#FR_002dV-Built_002din-Functions" title="FR-V Built-in Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Blackfin-Built-in-Functions"></a>
<a name="Blackfin-Built_002din-Functions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="FR_002dV-Built_002din-Functions.html#FR_002dV-Built_002din-Functions">FR-V Built-in Functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="AVR-Built_002din-Functions.html#AVR-Built_002din-Functions">AVR Built-in Functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Target-Builtins.html#Target-Builtins">Target Builtins</a>
<hr>
</div>
<h4 class="subsection">6.56.5 Blackfin Built-in Functions</h4>
<p>Currently, there are two Blackfin-specific built-in functions. These are
used for generating <code>CSYNC</code> and <code>SSYNC</code> machine insns without
using inline assembly; by using these built-in functions the compiler can
automatically add workarounds for hardware errata involving these
instructions. These functions are named as follows:
<pre class="smallexample"> void __builtin_bfin_csync (void)
void __builtin_bfin_ssync (void)
</pre>
</body></html>

View file

@ -0,0 +1,207 @@
<html lang="en">
<head>
<title>Blackfin Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="AVR-Options.html#AVR-Options" title="AVR Options">
<link rel="next" href="C6X-Options.html#C6X-Options" title="C6X Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Blackfin-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="C6X-Options.html#C6X-Options">C6X Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="AVR-Options.html#AVR-Options">AVR Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.5 Blackfin Options</h4>
<p><a name="index-Blackfin-Options-1171"></a>
<dl>
<dt><code>-mcpu=</code><var>cpu</var><span class="roman">[</span><code>-</code><var>sirevision</var><span class="roman">]</span><dd><a name="index-mcpu_003d-1172"></a>Specifies the name of the target Blackfin processor. Currently, <var>cpu</var>
can be one of &lsquo;<samp><span class="samp">bf512</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf514</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf516</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf518</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">bf522</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf523</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf524</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf525</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf526</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">bf527</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf531</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf532</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf533</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">bf534</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf536</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf537</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf538</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf539</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">bf542</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf544</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf547</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf548</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf549</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">bf542m</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf544m</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf547m</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf548m</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf549m</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">bf561</span></samp>&rsquo;, &lsquo;<samp><span class="samp">bf592</span></samp>&rsquo;.
<p>The optional <var>sirevision</var> specifies the silicon revision of the target
Blackfin processor. Any workarounds available for the targeted silicon revision
are enabled. If <var>sirevision</var> is &lsquo;<samp><span class="samp">none</span></samp>&rsquo;, no workarounds are enabled.
If <var>sirevision</var> is &lsquo;<samp><span class="samp">any</span></samp>&rsquo;, all workarounds for the targeted processor
are enabled. The <code>__SILICON_REVISION__</code> macro is defined to two
hexadecimal digits representing the major and minor numbers in the silicon
revision. If <var>sirevision</var> is &lsquo;<samp><span class="samp">none</span></samp>&rsquo;, the <code>__SILICON_REVISION__</code>
is not defined. If <var>sirevision</var> is &lsquo;<samp><span class="samp">any</span></samp>&rsquo;, the
<code>__SILICON_REVISION__</code> is defined to be <code>0xffff</code>.
If this optional <var>sirevision</var> is not used, GCC assumes the latest known
silicon revision of the targeted Blackfin processor.
<p>GCC defines a preprocessor macro for the specified <var>cpu</var>.
For the &lsquo;<samp><span class="samp">bfin-elf</span></samp>&rsquo; toolchain, this option causes the hardware BSP
provided by libgloss to be linked in if <samp><span class="option">-msim</span></samp> is not given.
<p>Without this option, &lsquo;<samp><span class="samp">bf532</span></samp>&rsquo; is used as the processor by default.
<p>Note that support for &lsquo;<samp><span class="samp">bf561</span></samp>&rsquo; is incomplete. For &lsquo;<samp><span class="samp">bf561</span></samp>&rsquo;,
only the preprocessor macro is defined.
<br><dt><code>-msim</code><dd><a name="index-msim-1173"></a>Specifies that the program will be run on the simulator. This causes
the simulator BSP provided by libgloss to be linked in. This option
has effect only for &lsquo;<samp><span class="samp">bfin-elf</span></samp>&rsquo; toolchain.
Certain other options, such as <samp><span class="option">-mid-shared-library</span></samp> and
<samp><span class="option">-mfdpic</span></samp>, imply <samp><span class="option">-msim</span></samp>.
<br><dt><code>-momit-leaf-frame-pointer</code><dd><a name="index-momit_002dleaf_002dframe_002dpointer-1174"></a>Don't keep the frame pointer in a register for leaf functions. This
avoids the instructions to save, set up and restore frame pointers and
makes an extra register available in leaf functions. The option
<samp><span class="option">-fomit-frame-pointer</span></samp> removes the frame pointer for all functions,
which might make debugging harder.
<br><dt><code>-mspecld-anomaly</code><dd><a name="index-mspecld_002danomaly-1175"></a>When enabled, the compiler ensures that the generated code does not
contain speculative loads after jump instructions. If this option is used,
<code>__WORKAROUND_SPECULATIVE_LOADS</code> is defined.
<br><dt><code>-mno-specld-anomaly</code><dd><a name="index-mno_002dspecld_002danomaly-1176"></a>Don't generate extra code to prevent speculative loads from occurring.
<br><dt><code>-mcsync-anomaly</code><dd><a name="index-mcsync_002danomaly-1177"></a>When enabled, the compiler ensures that the generated code does not
contain CSYNC or SSYNC instructions too soon after conditional branches.
If this option is used, <code>__WORKAROUND_SPECULATIVE_SYNCS</code> is defined.
<br><dt><code>-mno-csync-anomaly</code><dd><a name="index-mno_002dcsync_002danomaly-1178"></a>Don't generate extra code to prevent CSYNC or SSYNC instructions from
occurring too soon after a conditional branch.
<br><dt><code>-mlow-64k</code><dd><a name="index-mlow_002d64k-1179"></a>When enabled, the compiler is free to take advantage of the knowledge that
the entire program fits into the low 64k of memory.
<br><dt><code>-mno-low-64k</code><dd><a name="index-mno_002dlow_002d64k-1180"></a>Assume that the program is arbitrarily large. This is the default.
<br><dt><code>-mstack-check-l1</code><dd><a name="index-mstack_002dcheck_002dl1-1181"></a>Do stack checking using information placed into L1 scratchpad memory by the
uClinux kernel.
<br><dt><code>-mid-shared-library</code><dd><a name="index-mid_002dshared_002dlibrary-1182"></a>Generate code that supports shared libraries via the library ID method.
This allows for execute in place and shared libraries in an environment
without virtual memory management. This option implies <samp><span class="option">-fPIC</span></samp>.
With a &lsquo;<samp><span class="samp">bfin-elf</span></samp>&rsquo; target, this option implies <samp><span class="option">-msim</span></samp>.
<br><dt><code>-mno-id-shared-library</code><dd><a name="index-mno_002did_002dshared_002dlibrary-1183"></a>Generate code that doesn't assume ID-based shared libraries are being used.
This is the default.
<br><dt><code>-mleaf-id-shared-library</code><dd><a name="index-mleaf_002did_002dshared_002dlibrary-1184"></a>Generate code that supports shared libraries via the library ID method,
but assumes that this library or executable won't link against any other
ID shared libraries. That allows the compiler to use faster code for jumps
and calls.
<br><dt><code>-mno-leaf-id-shared-library</code><dd><a name="index-mno_002dleaf_002did_002dshared_002dlibrary-1185"></a>Do not assume that the code being compiled won't link against any ID shared
libraries. Slower code is generated for jump and call insns.
<br><dt><code>-mshared-library-id=n</code><dd><a name="index-mshared_002dlibrary_002did-1186"></a>Specifies the identification number of the ID-based shared library being
compiled. Specifying a value of 0 generates more compact code; specifying
other values forces the allocation of that number to the current
library but is no more space- or time-efficient than omitting this option.
<br><dt><code>-msep-data</code><dd><a name="index-msep_002ddata-1187"></a>Generate code that allows the data segment to be located in a different
area of memory from the text segment. This allows for execute in place in
an environment without virtual memory management by eliminating relocations
against the text section.
<br><dt><code>-mno-sep-data</code><dd><a name="index-mno_002dsep_002ddata-1188"></a>Generate code that assumes that the data segment follows the text segment.
This is the default.
<br><dt><code>-mlong-calls</code><dt><code>-mno-long-calls</code><dd><a name="index-mlong_002dcalls-1189"></a><a name="index-mno_002dlong_002dcalls-1190"></a>Tells the compiler to perform function calls by first loading the
address of the function into a register and then performing a subroutine
call on this register. This switch is needed if the target function
lies outside of the 24-bit addressing range of the offset-based
version of subroutine call instruction.
<p>This feature is not enabled by default. Specifying
<samp><span class="option">-mno-long-calls</span></samp> restores the default behavior. Note these
switches have no effect on how the compiler generates code to handle
function calls via function pointers.
<br><dt><code>-mfast-fp</code><dd><a name="index-mfast_002dfp-1191"></a>Link with the fast floating-point library. This library relaxes some of
the IEEE floating-point standard's rules for checking inputs against
Not-a-Number (NAN), in the interest of performance.
<br><dt><code>-minline-plt</code><dd><a name="index-minline_002dplt-1192"></a>Enable inlining of PLT entries in function calls to functions that are
not known to bind locally. It has no effect without <samp><span class="option">-mfdpic</span></samp>.
<br><dt><code>-mmulticore</code><dd><a name="index-mmulticore-1193"></a>Build a standalone application for multicore Blackfin processors.
This option causes proper start files and link scripts supporting
multicore to be used, and defines the macro <code>__BFIN_MULTICORE</code>.
It can only be used with <samp><span class="option">-mcpu=bf561[-</span><var>sirevision</var><span class="option">]</span></samp>.
<p>This option can be used with <samp><span class="option">-mcorea</span></samp> or <samp><span class="option">-mcoreb</span></samp>, which
selects the one-application-per-core programming model. Without
<samp><span class="option">-mcorea</span></samp> or <samp><span class="option">-mcoreb</span></samp>, the single-application/dual-core
programming model is used. In this model, the main function of Core B
should be named as <code>coreb_main</code>.
<p>If this option is not used, the single-core application programming
model is used.
<br><dt><code>-mcorea</code><dd><a name="index-mcorea-1194"></a>Build a standalone application for Core A of BF561 when using
the one-application-per-core programming model. Proper start files
and link scripts are used to support Core A, and the macro
<code>__BFIN_COREA</code> is defined.
This option can only be used in conjunction with <samp><span class="option">-mmulticore</span></samp>.
<br><dt><code>-mcoreb</code><dd><a name="index-mcoreb-1195"></a>Build a standalone application for Core B of BF561 when using
the one-application-per-core programming model. Proper start files
and link scripts are used to support Core B, and the macro
<code>__BFIN_COREB</code> is defined. When this option is used, <code>coreb_main</code>
should be used instead of <code>main</code>.
This option can only be used in conjunction with <samp><span class="option">-mmulticore</span></samp>.
<br><dt><code>-msdram</code><dd><a name="index-msdram-1196"></a>Build a standalone application for SDRAM. Proper start files and
link scripts are used to put the application into SDRAM, and the macro
<code>__BFIN_SDRAM</code> is defined.
The loader should initialize SDRAM before loading the application.
<br><dt><code>-micplb</code><dd><a name="index-micplb-1197"></a>Assume that ICPLBs are enabled at run time. This has an effect on certain
anomaly workarounds. For Linux targets, the default is to assume ICPLBs
are enabled; for standalone applications the default is off.
</dl>
</body></html>

View file

@ -0,0 +1,90 @@
<html lang="en">
<head>
<title>Bound member functions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions" title="C++ Extensions">
<link rel="prev" href="Template-Instantiation.html#Template-Instantiation" title="Template Instantiation">
<link rel="next" href="C_002b_002b-Attributes.html#C_002b_002b-Attributes" title="C++ Attributes">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Bound-member-functions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="C_002b_002b-Attributes.html#C_002b_002b-Attributes">C++ Attributes</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Template-Instantiation.html#Template-Instantiation">Template Instantiation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions">C++ Extensions</a>
<hr>
</div>
<h3 class="section">7.6 Extracting the function pointer from a bound pointer to member function</h3>
<p><a name="index-pmf-3526"></a><a name="index-pointer-to-member-function-3527"></a><a name="index-bound-pointer-to-member-function-3528"></a>
In C++, pointer to member functions (PMFs) are implemented using a wide
pointer of sorts to handle all the possible call mechanisms; the PMF
needs to store information about how to adjust the &lsquo;<samp><span class="samp">this</span></samp>&rsquo; pointer,
and if the function pointed to is virtual, where to find the vtable, and
where in the vtable to look for the member function. If you are using
PMFs in an inner loop, you should really reconsider that decision. If
that is not an option, you can extract the pointer to the function that
would be called for a given object/PMF pair and call it directly inside
the inner loop, to save a bit of time.
<p>Note that you still pay the penalty for the call through a
function pointer; on most modern architectures, such a call defeats the
branch prediction features of the CPU. This is also true of normal
virtual function calls.
<p>The syntax for this extension is
<pre class="smallexample"> extern A a;
extern int (A::*fp)();
typedef int (*fptr)(A *);
fptr p = (fptr)(a.*fp);
</pre>
<p>For PMF constants (i.e. expressions of the form &lsquo;<samp><span class="samp">&amp;Klasse::Member</span></samp>&rsquo;),
no object is needed to obtain the address of the function. They can be
converted to function pointers directly:
<pre class="smallexample"> fptr p1 = (fptr)(&amp;A::foo);
</pre>
<p><a name="index-Wno_002dpmf_002dconversions-3529"></a>You must specify <samp><span class="option">-Wno-pmf-conversions</span></samp> to use this extension.
</body></html>

View file

@ -0,0 +1,104 @@
<html lang="en">
<head>
<title>Bug Criteria - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Bugs.html#Bugs" title="Bugs">
<link rel="next" href="Bug-Reporting.html#Bug-Reporting" title="Bug Reporting">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Bug-Criteria"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Bug-Reporting.html#Bug-Reporting">Bug Reporting</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Bugs.html#Bugs">Bugs</a>
<hr>
</div>
<h3 class="section">12.1 Have You Found a Bug?</h3>
<p><a name="index-bug-criteria-3600"></a>
If you are not sure whether you have found a bug, here are some guidelines:
<a name="index-fatal-signal-3601"></a>
<a name="index-core-dump-3602"></a>
<ul><li>If the compiler gets a fatal signal, for any input whatever, that is a
compiler bug. Reliable compilers never crash.
<p><a name="index-invalid-assembly-code-3603"></a><a name="index-assembly-code_002c-invalid-3604"></a><li>If the compiler produces invalid assembly code, for any input whatever
(except an <code>asm</code> statement), that is a compiler bug, unless the
compiler reports errors (not just warnings) which would ordinarily
prevent the assembler from being run.
<p><a name="index-undefined-behavior-3605"></a><a name="index-undefined-function-value-3606"></a><a name="index-increment-operators-3607"></a><li>If the compiler produces valid assembly code that does not correctly
execute the input source code, that is a compiler bug.
<p>However, you must double-check to make sure, because you may have a
program whose behavior is undefined, which happened by chance to give
the desired results with another C or C++ compiler.
<p>For example, in many nonoptimizing compilers, you can write &lsquo;<samp><span class="samp">x;</span></samp>&rsquo;
at the end of a function instead of &lsquo;<samp><span class="samp">return x;</span></samp>&rsquo;, with the same
results. But the value of the function is undefined if <code>return</code>
is omitted; it is not a bug when GCC produces different results.
<p>Problems often result from expressions with two increment operators,
as in <code>f (*p++, *p++)</code>. Your previous compiler might have
interpreted that expression the way you intended; GCC might
interpret it another way. Neither compiler is wrong. The bug is
in your code.
<p>After you have localized the error to a single source line, it should
be easy to check for these things. If your program is correct and
well defined, you have found a compiler bug.
<li>If the compiler produces an error message for valid input, that is a
compiler bug.
<p><a name="index-invalid-input-3608"></a><li>If the compiler does not produce an error message for invalid input,
that is a compiler bug. However, you should note that your idea of
&ldquo;invalid input&rdquo; might be someone else's idea of &ldquo;an extension&rdquo; or
&ldquo;support for traditional practice&rdquo;.
<li>If you are an experienced user of one of the languages GCC supports, your
suggestions for improvement of GCC are welcome in any case.
</ul>
</body></html>

View file

@ -0,0 +1,62 @@
<html lang="en">
<head>
<title>Bug Reporting - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Bugs.html#Bugs" title="Bugs">
<link rel="prev" href="Bug-Criteria.html#Bug-Criteria" title="Bug Criteria">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Bug-Reporting"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Bugs.html#Bugs">Bugs</a>
<hr>
</div>
<h3 class="section">12.2 How and where to Report Bugs</h3>
<p><a name="index-compiler-bugs_002c-reporting-3609"></a>
Bugs should be reported to the bug database at <a href="http://gcc.gnu.org/bugs.html">http://gcc.gnu.org/bugs.html</a>.
<!-- Copyright (C) 1988-2013 Free Software Foundation, Inc. -->
<!-- This is part of the GCC manual. -->
<!-- For copying conditions, see the file gcc.texi. -->
</body></html>

View file

@ -0,0 +1,71 @@
<html lang="en">
<head>
<title>Bugs - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Trouble.html#Trouble" title="Trouble">
<link rel="next" href="Service.html#Service" title="Service">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Bugs"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Service.html#Service">Service</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Trouble.html#Trouble">Trouble</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">12 Reporting Bugs</h2>
<p><a name="index-bugs-3598"></a><a name="index-reporting-bugs-3599"></a>
Your bug reports play an essential role in making GCC reliable.
<p>When you encounter a problem, the first thing to do is to see if it is
already known. See <a href="Trouble.html#Trouble">Trouble</a>. If it isn't known, then you should
report the problem.
<ul class="menu">
<li><a accesskey="1" href="Bug-Criteria.html#Bug-Criteria">Criteria</a>: Have you really found a bug?
<li><a accesskey="2" href="Bug-Reporting.html#Bug-Reporting">Reporting</a>: How to report a bug effectively.
<li><a accesskey="3" href="Trouble.html#Trouble">Known</a>: Known problems.
<li><a accesskey="4" href="Service.html#Service">Help</a>: Where to ask for help.
</ul>
</body></html>

View file

@ -0,0 +1,357 @@
<html lang="en">
<head>
<title>C Dialect Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC">
<link rel="prev" href="Invoking-G_002b_002b.html#Invoking-G_002b_002b" title="Invoking G++">
<link rel="next" href="C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options" title="C++ Dialect Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C-Dialect-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options">C++ Dialect Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Invoking-G_002b_002b.html#Invoking-G_002b_002b">Invoking G++</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking-GCC">Invoking GCC</a>
<hr>
</div>
<h3 class="section">3.4 Options Controlling C Dialect</h3>
<p><a name="index-dialect-options-100"></a><a name="index-language-dialect-options-101"></a><a name="index-options_002c-dialect-102"></a>
The following options control the dialect of C (or languages derived
from C, such as C++, Objective-C and Objective-C++) that the compiler
accepts:
<a name="index-ANSI-support-103"></a>
<a name="index-ISO-support-104"></a>
<dl><dt><code>-ansi</code><dd><a name="index-ansi-105"></a>In C mode, this is equivalent to <samp><span class="option">-std=c90</span></samp>. In C++ mode, it is
equivalent to <samp><span class="option">-std=c++98</span></samp>.
<p>This turns off certain features of GCC that are incompatible with ISO
C90 (when compiling C code), or of standard C++ (when compiling C++ code),
such as the <code>asm</code> and <code>typeof</code> keywords, and
predefined macros such as <code>unix</code> and <code>vax</code> that identify the
type of system you are using. It also enables the undesirable and
rarely used ISO trigraph feature. For the C compiler,
it disables recognition of C++ style &lsquo;<samp><span class="samp">//</span></samp>&rsquo; comments as well as
the <code>inline</code> keyword.
<p>The alternate keywords <code>__asm__</code>, <code>__extension__</code>,
<code>__inline__</code> and <code>__typeof__</code> continue to work despite
<samp><span class="option">-ansi</span></samp>. You would not want to use them in an ISO C program, of
course, but it is useful to put them in header files that might be included
in compilations done with <samp><span class="option">-ansi</span></samp>. Alternate predefined macros
such as <code>__unix__</code> and <code>__vax__</code> are also available, with or
without <samp><span class="option">-ansi</span></samp>.
<p>The <samp><span class="option">-ansi</span></samp> option does not cause non-ISO programs to be
rejected gratuitously. For that, <samp><span class="option">-Wpedantic</span></samp> is required in
addition to <samp><span class="option">-ansi</span></samp>. See <a href="Warning-Options.html#Warning-Options">Warning Options</a>.
<p>The macro <code>__STRICT_ANSI__</code> is predefined when the <samp><span class="option">-ansi</span></samp>
option is used. Some header files may notice this macro and refrain
from declaring certain functions or defining certain macros that the
ISO standard doesn't call for; this is to avoid interfering with any
programs that might use these names for other things.
<p>Functions that are normally built in but do not have semantics
defined by ISO C (such as <code>alloca</code> and <code>ffs</code>) are not built-in
functions when <samp><span class="option">-ansi</span></samp> is used. See <a href="Other-Builtins.html#Other-Builtins">Other built-in functions provided by GCC</a>, for details of the functions
affected.
<br><dt><code>-std=</code><dd><a name="index-std-106"></a>Determine the language standard. See <a href="Standards.html#Standards">Language Standards Supported by GCC</a>, for details of these standard versions. This option
is currently only supported when compiling C or C++.
<p>The compiler can accept several base standards, such as &lsquo;<samp><span class="samp">c90</span></samp>&rsquo; or
&lsquo;<samp><span class="samp">c++98</span></samp>&rsquo;, and GNU dialects of those standards, such as
&lsquo;<samp><span class="samp">gnu90</span></samp>&rsquo; or &lsquo;<samp><span class="samp">gnu++98</span></samp>&rsquo;. When a base standard is specified, the
compiler accepts all programs following that standard plus those
using GNU extensions that do not contradict it. For example,
<samp><span class="option">-std=c90</span></samp> turns off certain features of GCC that are
incompatible with ISO C90, such as the <code>asm</code> and <code>typeof</code>
keywords, but not other GNU extensions that do not have a meaning in
ISO C90, such as omitting the middle term of a <code>?:</code>
expression. On the other hand, when a GNU dialect of a standard is
specified, all features supported by the compiler are enabled, even when
those features change the meaning of the base standard. As a result, some
strict-conforming programs may be rejected. The particular standard
is used by <samp><span class="option">-Wpedantic</span></samp> to identify which features are GNU
extensions given that version of the standard. For example
<samp><span class="option">-std=gnu90 -Wpedantic</span></samp> warns about C++ style &lsquo;<samp><span class="samp">//</span></samp>&rsquo;
comments, while <samp><span class="option">-std=gnu99 -Wpedantic</span></samp> does not.
<p>A value for this option must be provided; possible values are
<dl>
<dt>&lsquo;<samp><span class="samp">c90</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">c89</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">iso9899:1990</span></samp>&rsquo;<dd>Support all ISO C90 programs (certain GNU extensions that conflict
with ISO C90 are disabled). Same as <samp><span class="option">-ansi</span></samp> for C code.
<br><dt>&lsquo;<samp><span class="samp">iso9899:199409</span></samp>&rsquo;<dd>ISO C90 as modified in amendment 1.
<br><dt>&lsquo;<samp><span class="samp">c99</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">c9x</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">iso9899:1999</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">iso9899:199x</span></samp>&rsquo;<dd>ISO C99. Note that this standard is not yet fully supported; see
<a href="http://gcc.gnu.org/c99status.html">http://gcc.gnu.org/c99status.html</a><!-- /@w --> for more information. The
names &lsquo;<samp><span class="samp">c9x</span></samp>&rsquo; and &lsquo;<samp><span class="samp">iso9899:199x</span></samp>&rsquo; are deprecated.
<br><dt>&lsquo;<samp><span class="samp">c11</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">c1x</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">iso9899:2011</span></samp>&rsquo;<dd>ISO C11, the 2011 revision of the ISO C standard.
Support is incomplete and experimental. The name &lsquo;<samp><span class="samp">c1x</span></samp>&rsquo; is
deprecated.
<br><dt>&lsquo;<samp><span class="samp">gnu90</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">gnu89</span></samp>&rsquo;<dd>GNU dialect of ISO C90 (including some C99 features). This
is the default for C code.
<br><dt>&lsquo;<samp><span class="samp">gnu99</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">gnu9x</span></samp>&rsquo;<dd>GNU dialect of ISO C99. When ISO C99 is fully implemented in GCC,
this will become the default. The name &lsquo;<samp><span class="samp">gnu9x</span></samp>&rsquo; is deprecated.
<br><dt>&lsquo;<samp><span class="samp">gnu11</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">gnu1x</span></samp>&rsquo;<dd>GNU dialect of ISO C11. Support is incomplete and experimental. The
name &lsquo;<samp><span class="samp">gnu1x</span></samp>&rsquo; is deprecated.
<br><dt>&lsquo;<samp><span class="samp">c++98</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">c++03</span></samp>&rsquo;<dd>The 1998 ISO C++ standard plus the 2003 technical corrigendum and some
additional defect reports. Same as <samp><span class="option">-ansi</span></samp> for C++ code.
<br><dt>&lsquo;<samp><span class="samp">gnu++98</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">gnu++03</span></samp>&rsquo;<dd>GNU dialect of <samp><span class="option">-std=c++98</span></samp>. This is the default for
C++ code.
<br><dt>&lsquo;<samp><span class="samp">c++11</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">c++0x</span></samp>&rsquo;<dd>The 2011 ISO C++ standard plus amendments. Support for C++11 is still
experimental, and may change in incompatible ways in future releases.
The name &lsquo;<samp><span class="samp">c++0x</span></samp>&rsquo; is deprecated.
<br><dt>&lsquo;<samp><span class="samp">gnu++11</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">gnu++0x</span></samp>&rsquo;<dd>GNU dialect of <samp><span class="option">-std=c++11</span></samp>. Support for C++11 is still
experimental, and may change in incompatible ways in future releases.
The name &lsquo;<samp><span class="samp">gnu++0x</span></samp>&rsquo; is deprecated.
<br><dt>&lsquo;<samp><span class="samp">c++1y</span></samp>&rsquo;<dd>The next revision of the ISO C++ standard, tentatively planned for
2017. Support is highly experimental, and will almost certainly
change in incompatible ways in future releases.
<br><dt>&lsquo;<samp><span class="samp">gnu++1y</span></samp>&rsquo;<dd>GNU dialect of <samp><span class="option">-std=c++1y</span></samp>. Support is highly experimental,
and will almost certainly change in incompatible ways in future
releases.
</dl>
<br><dt><code>-fgnu89-inline</code><dd><a name="index-fgnu89_002dinline-107"></a>The option <samp><span class="option">-fgnu89-inline</span></samp> tells GCC to use the traditional
GNU semantics for <code>inline</code> functions when in C99 mode.
See <a href="Inline.html#Inline">An Inline Function is As Fast As a Macro</a>. This option
is accepted and ignored by GCC versions 4.1.3 up to but not including
4.3. In GCC versions 4.3 and later it changes the behavior of GCC in
C99 mode. Using this option is roughly equivalent to adding the
<code>gnu_inline</code> function attribute to all inline functions
(see <a href="Function-Attributes.html#Function-Attributes">Function Attributes</a>).
<p>The option <samp><span class="option">-fno-gnu89-inline</span></samp> explicitly tells GCC to use the
C99 semantics for <code>inline</code> when in C99 or gnu99 mode (i.e., it
specifies the default behavior). This option was first supported in
GCC 4.3. This option is not supported in <samp><span class="option">-std=c90</span></samp> or
<samp><span class="option">-std=gnu90</span></samp> mode.
<p>The preprocessor macros <code>__GNUC_GNU_INLINE__</code> and
<code>__GNUC_STDC_INLINE__</code> may be used to check which semantics are
in effect for <code>inline</code> functions. See <a href="../cpp/Common-Predefined-Macros.html#Common-Predefined-Macros">Common Predefined Macros</a>.
<br><dt><code>-aux-info </code><var>filename</var><dd><a name="index-aux_002dinfo-108"></a>Output to the given filename prototyped declarations for all functions
declared and/or defined in a translation unit, including those in header
files. This option is silently ignored in any language other than C.
<p>Besides declarations, the file indicates, in comments, the origin of
each declaration (source file and line), whether the declaration was
implicit, prototyped or unprototyped (&lsquo;<samp><span class="samp">I</span></samp>&rsquo;, &lsquo;<samp><span class="samp">N</span></samp>&rsquo; for new or
&lsquo;<samp><span class="samp">O</span></samp>&rsquo; for old, respectively, in the first character after the line
number and the colon), and whether it came from a declaration or a
definition (&lsquo;<samp><span class="samp">C</span></samp>&rsquo; or &lsquo;<samp><span class="samp">F</span></samp>&rsquo;, respectively, in the following
character). In the case of function definitions, a K&amp;R-style list of
arguments followed by their declarations is also provided, inside
comments, after the declaration.
<br><dt><code>-fallow-parameterless-variadic-functions</code><dd>Accept variadic functions without named parameters.
<p>Although it is possible to define such a function, this is not very
useful as it is not possible to read the arguments. This is only
supported for C as this construct is allowed by C++.
<br><dt><code>-fno-asm</code><dd><a name="index-fno_002dasm-109"></a>Do not recognize <code>asm</code>, <code>inline</code> or <code>typeof</code> as a
keyword, so that code can use these words as identifiers. You can use
the keywords <code>__asm__</code>, <code>__inline__</code> and <code>__typeof__</code>
instead. <samp><span class="option">-ansi</span></samp> implies <samp><span class="option">-fno-asm</span></samp>.
<p>In C++, this switch only affects the <code>typeof</code> keyword, since
<code>asm</code> and <code>inline</code> are standard keywords. You may want to
use the <samp><span class="option">-fno-gnu-keywords</span></samp> flag instead, which has the same
effect. In C99 mode (<samp><span class="option">-std=c99</span></samp> or <samp><span class="option">-std=gnu99</span></samp>), this
switch only affects the <code>asm</code> and <code>typeof</code> keywords, since
<code>inline</code> is a standard keyword in ISO C99.
<br><dt><code>-fno-builtin</code><dt><code>-fno-builtin-</code><var>function</var><dd><a name="index-fno_002dbuiltin-110"></a><a name="index-built_002din-functions-111"></a>Don't recognize built-in functions that do not begin with
&lsquo;<samp><span class="samp">__builtin_</span></samp>&rsquo; as prefix. See <a href="Other-Builtins.html#Other-Builtins">Other built-in functions provided by GCC</a>, for details of the functions affected,
including those which are not built-in functions when <samp><span class="option">-ansi</span></samp> or
<samp><span class="option">-std</span></samp> options for strict ISO C conformance are used because they
do not have an ISO standard meaning.
<p>GCC normally generates special code to handle certain built-in functions
more efficiently; for instance, calls to <code>alloca</code> may become single
instructions which adjust the stack directly, and calls to <code>memcpy</code>
may become inline copy loops. The resulting code is often both smaller
and faster, but since the function calls no longer appear as such, you
cannot set a breakpoint on those calls, nor can you change the behavior
of the functions by linking with a different library. In addition,
when a function is recognized as a built-in function, GCC may use
information about that function to warn about problems with calls to
that function, or to generate more efficient code, even if the
resulting code still contains calls to that function. For example,
warnings are given with <samp><span class="option">-Wformat</span></samp> for bad calls to
<code>printf</code> when <code>printf</code> is built in and <code>strlen</code> is
known not to modify global memory.
<p>With the <samp><span class="option">-fno-builtin-</span><var>function</var></samp> option
only the built-in function <var>function</var> is
disabled. <var>function</var> must not begin with &lsquo;<samp><span class="samp">__builtin_</span></samp>&rsquo;. If a
function is named that is not built-in in this version of GCC, this
option is ignored. There is no corresponding
<samp><span class="option">-fbuiltin-</span><var>function</var></samp> option; if you wish to enable
built-in functions selectively when using <samp><span class="option">-fno-builtin</span></samp> or
<samp><span class="option">-ffreestanding</span></samp>, you may define macros such as:
<pre class="smallexample"> #define abs(n) __builtin_abs ((n))
#define strcpy(d, s) __builtin_strcpy ((d), (s))
</pre>
<br><dt><code>-fhosted</code><dd><a name="index-fhosted-112"></a><a name="index-hosted-environment-113"></a>
Assert that compilation targets a hosted environment. This implies
<samp><span class="option">-fbuiltin</span></samp>. A hosted environment is one in which the
entire standard library is available, and in which <code>main</code> has a return
type of <code>int</code>. Examples are nearly everything except a kernel.
This is equivalent to <samp><span class="option">-fno-freestanding</span></samp>.
<br><dt><code>-ffreestanding</code><dd><a name="index-ffreestanding-114"></a><a name="index-hosted-environment-115"></a>
Assert that compilation targets a freestanding environment. This
implies <samp><span class="option">-fno-builtin</span></samp>. A freestanding environment
is one in which the standard library may not exist, and program startup may
not necessarily be at <code>main</code>. The most obvious example is an OS kernel.
This is equivalent to <samp><span class="option">-fno-hosted</span></samp>.
<p>See <a href="Standards.html#Standards">Language Standards Supported by GCC</a>, for details of
freestanding and hosted environments.
<br><dt><code>-fopenmp</code><dd><a name="index-fopenmp-116"></a><a name="index-OpenMP-parallel-117"></a>Enable handling of OpenMP directives <code>#pragma omp</code> in C/C++ and
<code>!$omp</code> in Fortran. When <samp><span class="option">-fopenmp</span></samp> is specified, the
compiler generates parallel code according to the OpenMP Application
Program Interface v3.0 <a href="http://www.openmp.org/">http://www.openmp.org/</a><!-- /@w -->. This option
implies <samp><span class="option">-pthread</span></samp>, and thus is only supported on targets that
have support for <samp><span class="option">-pthread</span></samp>.
<br><dt><code>-fgnu-tm</code><dd><a name="index-fgnu_002dtm-118"></a>When the option <samp><span class="option">-fgnu-tm</span></samp> is specified, the compiler
generates code for the Linux variant of Intel's current Transactional
Memory ABI specification document (Revision 1.1, May 6 2009). This is
an experimental feature whose interface may change in future versions
of GCC, as the official specification changes. Please note that not
all architectures are supported for this feature.
<p>For more information on GCC's support for transactional memory,
See <a href="../libitm/Enabling-libitm.html#Enabling-libitm">The GNU Transactional Memory Library</a>.
<p>Note that the transactional memory feature is not supported with
non-call exceptions (<samp><span class="option">-fnon-call-exceptions</span></samp>).
<br><dt><code>-fms-extensions</code><dd><a name="index-fms_002dextensions-119"></a>Accept some non-standard constructs used in Microsoft header files.
<p>In C++ code, this allows member names in structures to be similar
to previous types declarations.
<pre class="smallexample"> typedef int UOW;
struct ABC {
UOW UOW;
};
</pre>
<p>Some cases of unnamed fields in structures and unions are only
accepted with this option. See <a href="Unnamed-Fields.html#Unnamed-Fields">Unnamed struct/union fields within structs/unions</a>, for details.
<br><dt><code>-fplan9-extensions</code><dd>Accept some non-standard constructs used in Plan 9 code.
<p>This enables <samp><span class="option">-fms-extensions</span></samp>, permits passing pointers to
structures with anonymous fields to functions that expect pointers to
elements of the type of the field, and permits referring to anonymous
fields declared using a typedef. See <a href="Unnamed-Fields.html#Unnamed-Fields">Unnamed struct/union fields within structs/unions</a>, for details. This is only
supported for C, not C++.
<br><dt><code>-trigraphs</code><dd><a name="index-trigraphs-120"></a>Support ISO C trigraphs. The <samp><span class="option">-ansi</span></samp> option (and <samp><span class="option">-std</span></samp>
options for strict ISO C conformance) implies <samp><span class="option">-trigraphs</span></samp>.
<p><a name="index-traditional-C-language-121"></a><a name="index-C-language_002c-traditional-122"></a><br><dt><code>-traditional</code><dt><code>-traditional-cpp</code><dd><a name="index-traditional_002dcpp-123"></a><a name="index-traditional-124"></a>Formerly, these options caused GCC to attempt to emulate a pre-standard
C compiler. They are now only supported with the <samp><span class="option">-E</span></samp> switch.
The preprocessor continues to support a pre-standard mode. See the GNU
CPP manual for details.
<br><dt><code>-fcond-mismatch</code><dd><a name="index-fcond_002dmismatch-125"></a>Allow conditional expressions with mismatched types in the second and
third arguments. The value of such an expression is void. This option
is not supported for C++.
<br><dt><code>-flax-vector-conversions</code><dd><a name="index-flax_002dvector_002dconversions-126"></a>Allow implicit conversions between vectors with differing numbers of
elements and/or incompatible element types. This option should not be
used for new code.
<br><dt><code>-funsigned-char</code><dd><a name="index-funsigned_002dchar-127"></a>Let the type <code>char</code> be unsigned, like <code>unsigned char</code>.
<p>Each kind of machine has a default for what <code>char</code> should
be. It is either like <code>unsigned char</code> by default or like
<code>signed char</code> by default.
<p>Ideally, a portable program should always use <code>signed char</code> or
<code>unsigned char</code> when it depends on the signedness of an object.
But many programs have been written to use plain <code>char</code> and
expect it to be signed, or expect it to be unsigned, depending on the
machines they were written for. This option, and its inverse, let you
make such a program work with the opposite default.
<p>The type <code>char</code> is always a distinct type from each of
<code>signed char</code> or <code>unsigned char</code>, even though its behavior
is always just like one of those two.
<br><dt><code>-fsigned-char</code><dd><a name="index-fsigned_002dchar-128"></a>Let the type <code>char</code> be signed, like <code>signed char</code>.
<p>Note that this is equivalent to <samp><span class="option">-fno-unsigned-char</span></samp>, which is
the negative form of <samp><span class="option">-funsigned-char</span></samp>. Likewise, the option
<samp><span class="option">-fno-signed-char</span></samp> is equivalent to <samp><span class="option">-funsigned-char</span></samp>.
<br><dt><code>-fsigned-bitfields</code><dt><code>-funsigned-bitfields</code><dt><code>-fno-signed-bitfields</code><dt><code>-fno-unsigned-bitfields</code><dd><a name="index-fsigned_002dbitfields-129"></a><a name="index-funsigned_002dbitfields-130"></a><a name="index-fno_002dsigned_002dbitfields-131"></a><a name="index-fno_002dunsigned_002dbitfields-132"></a>These options control whether a bit-field is signed or unsigned, when the
declaration does not use either <code>signed</code> or <code>unsigned</code>. By
default, such a bit-field is signed, because this is consistent: the
basic integer types such as <code>int</code> are signed types.
</dl>
</body></html>

View file

@ -0,0 +1,139 @@
<html lang="en">
<head>
<title>C Extensions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="C_002b_002b-Implementation.html#C_002b_002b-Implementation" title="C++ Implementation">
<link rel="next" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions" title="C++ Extensions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C-Extensions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions">C++ Extensions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="C_002b_002b-Implementation.html#C_002b_002b-Implementation">C++ Implementation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">6 Extensions to the C Language Family</h2>
<p><a name="index-extensions_002c-C-language-2403"></a><a name="index-C-language-extensions-2404"></a>
<a name="index-pedantic-2405"></a>GNU C provides several language features not found in ISO standard C.
(The <samp><span class="option">-pedantic</span></samp> option directs GCC to print a warning message if
any of these features is used.) To test for the availability of these
features in conditional compilation, check for a predefined macro
<code>__GNUC__</code>, which is always defined under GCC.
<p>These extensions are available in C and Objective-C. Most of them are
also available in C++. See <a href="C_002b_002b-Extensions.html#C_002b_002b-Extensions">Extensions to the C++ Language</a>, for extensions that apply <em>only</em> to C++.
<p>Some features that are in ISO C99 but not C90 or C++ are also, as
extensions, accepted by GCC in C90 mode and in C++.
<ul class="menu">
<li><a accesskey="1" href="Statement-Exprs.html#Statement-Exprs">Statement Exprs</a>: Putting statements and declarations inside expressions.
<li><a accesskey="2" href="Local-Labels.html#Local-Labels">Local Labels</a>: Labels local to a block.
<li><a accesskey="3" href="Labels-as-Values.html#Labels-as-Values">Labels as Values</a>: Getting pointers to labels, and computed gotos.
<li><a accesskey="4" href="Nested-Functions.html#Nested-Functions">Nested Functions</a>: As in Algol and Pascal, lexical scoping of functions.
<li><a accesskey="5" href="Constructing-Calls.html#Constructing-Calls">Constructing Calls</a>: Dispatching a call to another function.
<li><a accesskey="6" href="Typeof.html#Typeof">Typeof</a>: <code>typeof</code>: referring to the type of an expression.
<li><a accesskey="7" href="Conditionals.html#Conditionals">Conditionals</a>: Omitting the middle operand of a &lsquo;<samp><span class="samp">?:</span></samp>&rsquo; expression.
<li><a accesskey="8" href="_005f_005fint128.html#g_t_005f_005fint128">__int128</a>: 128-bit integers---<code>__int128</code>.
<li><a accesskey="9" href="Long-Long.html#Long-Long">Long Long</a>: Double-word integers---<code>long long int</code>.
<li><a href="Complex.html#Complex">Complex</a>: Data types for complex numbers.
<li><a href="Floating-Types.html#Floating-Types">Floating Types</a>: Additional Floating Types.
<li><a href="Half_002dPrecision.html#Half_002dPrecision">Half-Precision</a>: Half-Precision Floating Point.
<li><a href="Decimal-Float.html#Decimal-Float">Decimal Float</a>: Decimal Floating Types.
<li><a href="Hex-Floats.html#Hex-Floats">Hex Floats</a>: Hexadecimal floating-point constants.
<li><a href="Fixed_002dPoint.html#Fixed_002dPoint">Fixed-Point</a>: Fixed-Point Types.
<li><a href="Named-Address-Spaces.html#Named-Address-Spaces">Named Address Spaces</a>: Named address spaces.
<li><a href="Zero-Length.html#Zero-Length">Zero Length</a>: Zero-length arrays.
<li><a href="Empty-Structures.html#Empty-Structures">Empty Structures</a>: Structures with no members.
<li><a href="Variable-Length.html#Variable-Length">Variable Length</a>: Arrays whose length is computed at run time.
<li><a href="Variadic-Macros.html#Variadic-Macros">Variadic Macros</a>: Macros with a variable number of arguments.
<li><a href="Escaped-Newlines.html#Escaped-Newlines">Escaped Newlines</a>: Slightly looser rules for escaped newlines.
<li><a href="Subscripting.html#Subscripting">Subscripting</a>: Any array can be subscripted, even if not an lvalue.
<li><a href="Pointer-Arith.html#Pointer-Arith">Pointer Arith</a>: Arithmetic on <code>void</code>-pointers and function pointers.
<li><a href="Initializers.html#Initializers">Initializers</a>: Non-constant initializers.
<li><a href="Compound-Literals.html#Compound-Literals">Compound Literals</a>: Compound literals give structures, unions
or arrays as values.
<li><a href="Designated-Inits.html#Designated-Inits">Designated Inits</a>: Labeling elements of initializers.
<li><a href="Case-Ranges.html#Case-Ranges">Case Ranges</a>: `case 1 ... 9' and such.
<li><a href="Cast-to-Union.html#Cast-to-Union">Cast to Union</a>: Casting to union type from any member of the union.
<li><a href="Mixed-Declarations.html#Mixed-Declarations">Mixed Declarations</a>: Mixing declarations and code.
<li><a href="Function-Attributes.html#Function-Attributes">Function Attributes</a>: Declaring that functions have no side effects,
or that they can never return.
<li><a href="Attribute-Syntax.html#Attribute-Syntax">Attribute Syntax</a>: Formal syntax for attributes.
<li><a href="Function-Prototypes.html#Function-Prototypes">Function Prototypes</a>: Prototype declarations and old-style definitions.
<li><a href="C_002b_002b-Comments.html#C_002b_002b-Comments">C++ Comments</a>: C++ comments are recognized.
<li><a href="Dollar-Signs.html#Dollar-Signs">Dollar Signs</a>: Dollar sign is allowed in identifiers.
<li><a href="Character-Escapes.html#Character-Escapes">Character Escapes</a>: &lsquo;<samp><span class="samp">\e</span></samp>&rsquo; stands for the character &lt;ESC&gt;.
<li><a href="Variable-Attributes.html#Variable-Attributes">Variable Attributes</a>: Specifying attributes of variables.
<li><a href="Type-Attributes.html#Type-Attributes">Type Attributes</a>: Specifying attributes of types.
<li><a href="Alignment.html#Alignment">Alignment</a>: Inquiring about the alignment of a type or variable.
<li><a href="Inline.html#Inline">Inline</a>: Defining inline functions (as fast as macros).
<li><a href="Volatiles.html#Volatiles">Volatiles</a>: What constitutes an access to a volatile object.
<li><a href="Extended-Asm.html#Extended-Asm">Extended Asm</a>: Assembler instructions with C expressions as operands.
(With them you can define ``built-in'' functions.)
<li><a href="Constraints.html#Constraints">Constraints</a>: Constraints for asm operands
<li><a href="Asm-Labels.html#Asm-Labels">Asm Labels</a>: Specifying the assembler name to use for a C symbol.
<li><a href="Explicit-Reg-Vars.html#Explicit-Reg-Vars">Explicit Reg Vars</a>: Defining variables residing in specified registers.
<li><a href="Alternate-Keywords.html#Alternate-Keywords">Alternate Keywords</a>: <code>__const__</code>, <code>__asm__</code>, etc., for header files.
<li><a href="Incomplete-Enums.html#Incomplete-Enums">Incomplete Enums</a>: <code>enum foo;</code>, with details to follow.
<li><a href="Function-Names.html#Function-Names">Function Names</a>: Printable strings which are the name of the current
function.
<li><a href="Return-Address.html#Return-Address">Return Address</a>: Getting the return or frame address of a function.
<li><a href="Vector-Extensions.html#Vector-Extensions">Vector Extensions</a>: Using vector instructions through built-in functions.
<li><a href="Offsetof.html#Offsetof">Offsetof</a>: Special syntax for implementing <code>offsetof</code>.
<li><a href="_005f_005fsync-Builtins.html#g_t_005f_005fsync-Builtins">__sync Builtins</a>: Legacy built-in functions for atomic memory access.
<li><a href="_005f_005fatomic-Builtins.html#g_t_005f_005fatomic-Builtins">__atomic Builtins</a>: Atomic built-in functions with memory model.
<li><a href="x86-specific-memory-model-extensions-for-transactional-memory.html#x86-specific-memory-model-extensions-for-transactional-memory">x86 specific memory model extensions for transactional memory</a>: x86 memory models.
<li><a href="Object-Size-Checking.html#Object-Size-Checking">Object Size Checking</a>: Built-in functions for limited buffer overflow
checking.
<li><a href="Other-Builtins.html#Other-Builtins">Other Builtins</a>: Other built-in functions.
<li><a href="Target-Builtins.html#Target-Builtins">Target Builtins</a>: Built-in functions specific to particular targets.
<li><a href="Target-Format-Checks.html#Target-Format-Checks">Target Format Checks</a>: Format checks specific to particular targets.
<li><a href="Pragmas.html#Pragmas">Pragmas</a>: Pragmas accepted by GCC.
<li><a href="Unnamed-Fields.html#Unnamed-Fields">Unnamed Fields</a>: Unnamed struct/union fields within structs/unions.
<li><a href="Thread_002dLocal.html#Thread_002dLocal">Thread-Local</a>: Per-thread variables.
<li><a href="Binary-constants.html#Binary-constants">Binary constants</a>: Binary constants using the &lsquo;<samp><span class="samp">0b</span></samp>&rsquo; prefix.
</ul>
</body></html>

View file

@ -0,0 +1,92 @@
<html lang="en">
<head>
<title>C Implementation - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC">
<link rel="next" href="C_002b_002b-Implementation.html#C_002b_002b-Implementation" title="C++ Implementation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C-Implementation"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="C_002b_002b-Implementation.html#C_002b_002b-Implementation">C++ Implementation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Invoking-GCC.html#Invoking-GCC">Invoking GCC</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">4 C Implementation-defined behavior</h2>
<p><a name="index-implementation_002ddefined-behavior_002c-C-language-2397"></a>
A conforming implementation of ISO C is required to document its
choice of behavior in each of the areas that are designated
&ldquo;implementation defined&rdquo;. The following lists all such areas,
along with the section numbers from the ISO/IEC 9899:1990 and ISO/IEC
9899:1999 standards. Some areas are only implementation-defined in
one version of the standard.
<p>Some choices depend on the externally determined ABI for the platform
(including standard character encodings) which GCC follows; these are
listed as &ldquo;determined by ABI&rdquo; below. See <a href="Compatibility.html#Compatibility">Binary Compatibility</a>, and <a href="http://gcc.gnu.org/readings.html">http://gcc.gnu.org/readings.html</a>. Some
choices are documented in the preprocessor manual.
See <a href="../cpp/Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">Implementation-defined behavior</a>. Some choices are made by the
library and operating system (or other environment when compiling for
a freestanding environment); refer to their documentation for details.
<ul class="menu">
<li><a accesskey="1" href="Translation-implementation.html#Translation-implementation">Translation implementation</a>
<li><a accesskey="2" href="Environment-implementation.html#Environment-implementation">Environment implementation</a>
<li><a accesskey="3" href="Identifiers-implementation.html#Identifiers-implementation">Identifiers implementation</a>
<li><a accesskey="4" href="Characters-implementation.html#Characters-implementation">Characters implementation</a>
<li><a accesskey="5" href="Integers-implementation.html#Integers-implementation">Integers implementation</a>
<li><a accesskey="6" href="Floating-point-implementation.html#Floating-point-implementation">Floating point implementation</a>
<li><a accesskey="7" href="Arrays-and-pointers-implementation.html#Arrays-and-pointers-implementation">Arrays and pointers implementation</a>
<li><a accesskey="8" href="Hints-implementation.html#Hints-implementation">Hints implementation</a>
<li><a accesskey="9" href="Structures-unions-enumerations-and-bit_002dfields-implementation.html#Structures-unions-enumerations-and-bit_002dfields-implementation">Structures unions enumerations and bit-fields implementation</a>
<li><a href="Qualifiers-implementation.html#Qualifiers-implementation">Qualifiers implementation</a>
<li><a href="Declarators-implementation.html#Declarators-implementation">Declarators implementation</a>
<li><a href="Statements-implementation.html#Statements-implementation">Statements implementation</a>
<li><a href="Preprocessing-directives-implementation.html#Preprocessing-directives-implementation">Preprocessing directives implementation</a>
<li><a href="Library-functions-implementation.html#Library-functions-implementation">Library functions implementation</a>
<li><a href="Architecture-implementation.html#Architecture-implementation">Architecture implementation</a>
<li><a href="Locale_002dspecific-behavior-implementation.html#Locale_002dspecific-behavior-implementation">Locale-specific behavior implementation</a>
</ul>
</body></html>

View file

@ -0,0 +1,89 @@
<html lang="en">
<head>
<title>C6X Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="Blackfin-Options.html#Blackfin-Options" title="Blackfin Options">
<link rel="next" href="CRIS-Options.html#CRIS-Options" title="CRIS Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C6X-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="CRIS-Options.html#CRIS-Options">CRIS Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Blackfin-Options.html#Blackfin-Options">Blackfin Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.6 C6X Options</h4>
<p><a name="index-C6X-Options-1198"></a>
<dl>
<dt><code>-march=</code><var>name</var><dd><a name="index-march-1199"></a>This specifies the name of the target architecture. GCC uses this
name to determine what kind of instructions it can emit when generating
assembly code. Permissible names are: &lsquo;<samp><span class="samp">c62x</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">c64x</span></samp>&rsquo;, &lsquo;<samp><span class="samp">c64x+</span></samp>&rsquo;, &lsquo;<samp><span class="samp">c67x</span></samp>&rsquo;, &lsquo;<samp><span class="samp">c67x+</span></samp>&rsquo;, &lsquo;<samp><span class="samp">c674x</span></samp>&rsquo;.
<br><dt><code>-mbig-endian</code><dd><a name="index-mbig_002dendian-1200"></a>Generate code for a big-endian target.
<br><dt><code>-mlittle-endian</code><dd><a name="index-mlittle_002dendian-1201"></a>Generate code for a little-endian target. This is the default.
<br><dt><code>-msim</code><dd><a name="index-msim-1202"></a>Choose startup files and linker script suitable for the simulator.
<br><dt><code>-msdata=default</code><dd><a name="index-msdata_003ddefault-1203"></a>Put small global and static data in the &lsquo;<samp><span class="samp">.neardata</span></samp>&rsquo; section,
which is pointed to by register <code>B14</code>. Put small uninitialized
global and static data in the &lsquo;<samp><span class="samp">.bss</span></samp>&rsquo; section, which is adjacent
to the &lsquo;<samp><span class="samp">.neardata</span></samp>&rsquo; section. Put small read-only data into the
&lsquo;<samp><span class="samp">.rodata</span></samp>&rsquo; section. The corresponding sections used for large
pieces of data are &lsquo;<samp><span class="samp">.fardata</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.far</span></samp>&rsquo; and &lsquo;<samp><span class="samp">.const</span></samp>&rsquo;.
<br><dt><code>-msdata=all</code><dd><a name="index-msdata_003dall-1204"></a>Put all data, not just small objects, into the sections reserved for
small data, and use addressing relative to the <code>B14</code> register to
access them.
<br><dt><code>-msdata=none</code><dd><a name="index-msdata_003dnone-1205"></a>Make no use of the sections reserved for small data, and use absolute
addresses to access all data. Put all initialized global and static
data in the &lsquo;<samp><span class="samp">.fardata</span></samp>&rsquo; section, and all uninitialized data in the
&lsquo;<samp><span class="samp">.far</span></samp>&rsquo; section. Put all constant data into the &lsquo;<samp><span class="samp">.const</span></samp>&rsquo;
section.
</dl>
</body></html>

View file

@ -0,0 +1,117 @@
<html lang="en">
<head>
<title>C99 Thread-Local Edits - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Thread_002dLocal.html#Thread_002dLocal" title="Thread-Local">
<link rel="next" href="C_002b_002b98-Thread_002dLocal-Edits.html#C_002b_002b98-Thread_002dLocal-Edits" title="C++98 Thread-Local Edits">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C99-Thread-Local-Edits"></a>
<a name="C99-Thread_002dLocal-Edits"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="C_002b_002b98-Thread_002dLocal-Edits.html#C_002b_002b98-Thread_002dLocal-Edits">C++98 Thread-Local Edits</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Thread_002dLocal.html#Thread_002dLocal">Thread-Local</a>
<hr>
</div>
<h4 class="subsection">6.60.1 ISO/IEC 9899:1999 Edits for Thread-Local Storage</h4>
<p>The following are a set of changes to ISO/IEC 9899:1999 (aka C99)
that document the exact semantics of the language extension.
<ul>
<li><cite>5.1.2 Execution environments</cite>
<p>Add new text after paragraph 1
<blockquote>
Within either execution environment, a <dfn>thread</dfn> is a flow of
control within a program. It is implementation defined whether
or not there may be more than one thread associated with a program.
It is implementation defined how threads beyond the first are
created, the name and type of the function called at thread
startup, and how threads may be terminated. However, objects
with thread storage duration shall be initialized before thread
startup.
</blockquote>
<li><cite>6.2.4 Storage durations of objects</cite>
<p>Add new text before paragraph 3
<blockquote>
An object whose identifier is declared with the storage-class
specifier <code>__thread</code><!-- /@w --> has <dfn>thread storage duration</dfn>.
Its lifetime is the entire execution of the thread, and its
stored value is initialized only once, prior to thread startup.
</blockquote>
<li><cite>6.4.1 Keywords</cite>
<p>Add <code>__thread</code>.
<li><cite>6.7.1 Storage-class specifiers</cite>
<p>Add <code>__thread</code> to the list of storage class specifiers in
paragraph 1.
<p>Change paragraph 2 to
<blockquote>
With the exception of <code>__thread</code>, at most one storage-class
specifier may be given [<small class="dots">...</small>]. The <code>__thread</code> specifier may
be used alone, or immediately following <code>extern</code> or
<code>static</code>.
</blockquote>
<p>Add new text after paragraph 6
<blockquote>
The declaration of an identifier for a variable that has
block scope that specifies <code>__thread</code> shall also
specify either <code>extern</code> or <code>static</code>.
<p>The <code>__thread</code> specifier shall be used only with
variables.
</blockquote>
</ul>
</body></html>

View file

@ -0,0 +1,80 @@
<html lang="en">
<head>
<title>CR16 Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="CRIS-Options.html#CRIS-Options" title="CRIS Options">
<link rel="next" href="Darwin-Options.html#Darwin-Options" title="Darwin Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="CR16-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Darwin-Options.html#Darwin-Options">Darwin Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="CRIS-Options.html#CRIS-Options">CRIS Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.8 CR16 Options</h4>
<p><a name="index-CR16-Options-1235"></a>
These options are defined specifically for the CR16 ports.
<dl>
<dt><code>-mmac</code><dd><a name="index-mmac-1236"></a>Enable the use of multiply-accumulate instructions. Disabled by default.
<br><dt><code>-mcr16cplus</code><dt><code>-mcr16c</code><dd><a name="index-mcr16cplus-1237"></a><a name="index-mcr16c-1238"></a>Generate code for CR16C or CR16C+ architecture. CR16C+ architecture
is default.
<br><dt><code>-msim</code><dd><a name="index-msim-1239"></a>Links the library libsim.a which is in compatible with simulator. Applicable
to ELF compiler only.
<br><dt><code>-mint32</code><dd><a name="index-mint32-1240"></a>Choose integer type as 32-bit wide.
<br><dt><code>-mbit-ops</code><dd><a name="index-mbit_002dops-1241"></a>Generates <code>sbit</code>/<code>cbit</code> instructions for bit manipulations.
<br><dt><code>-mdata-model=</code><var>model</var><dd><a name="index-mdata_002dmodel-1242"></a>Choose a data model. The choices for <var>model</var> are &lsquo;<samp><span class="samp">near</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">far</span></samp>&rsquo; or &lsquo;<samp><span class="samp">medium</span></samp>&rsquo;. &lsquo;<samp><span class="samp">medium</span></samp>&rsquo; is default.
However, &lsquo;<samp><span class="samp">far</span></samp>&rsquo; is not valid with <samp><span class="option">-mcr16c</span></samp>, as the
CR16C architecture does not support the far data model.
</dl>
</body></html>

View file

@ -0,0 +1,127 @@
<html lang="en">
<head>
<title>CRIS Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="C6X-Options.html#C6X-Options" title="C6X Options">
<link rel="next" href="CR16-Options.html#CR16-Options" title="CR16 Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="CRIS-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="CR16-Options.html#CR16-Options">CR16 Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="C6X-Options.html#C6X-Options">C6X Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.7 CRIS Options</h4>
<p><a name="index-CRIS-Options-1206"></a>
These options are defined specifically for the CRIS ports.
<dl>
<dt><code>-march=</code><var>architecture-type</var><dt><code>-mcpu=</code><var>architecture-type</var><dd><a name="index-march-1207"></a><a name="index-mcpu-1208"></a>Generate code for the specified architecture. The choices for
<var>architecture-type</var> are &lsquo;<samp><span class="samp">v3</span></samp>&rsquo;, &lsquo;<samp><span class="samp">v8</span></samp>&rsquo; and &lsquo;<samp><span class="samp">v10</span></samp>&rsquo; for
respectively ETRAX&nbsp;<!-- /@w -->4, ETRAX&nbsp;<!-- /@w -->100, and ETRAX&nbsp;<!-- /@w -->100&nbsp;<!-- /@w -->LX.
Default is &lsquo;<samp><span class="samp">v0</span></samp>&rsquo; except for cris-axis-linux-gnu, where the default is
&lsquo;<samp><span class="samp">v10</span></samp>&rsquo;.
<br><dt><code>-mtune=</code><var>architecture-type</var><dd><a name="index-mtune-1209"></a>Tune to <var>architecture-type</var> everything applicable about the generated
code, except for the ABI and the set of available instructions. The
choices for <var>architecture-type</var> are the same as for
<samp><span class="option">-march=</span><var>architecture-type</var></samp>.
<br><dt><code>-mmax-stack-frame=</code><var>n</var><dd><a name="index-mmax_002dstack_002dframe-1210"></a>Warn when the stack frame of a function exceeds <var>n</var> bytes.
<br><dt><code>-metrax4</code><dt><code>-metrax100</code><dd><a name="index-metrax4-1211"></a><a name="index-metrax100-1212"></a>The options <samp><span class="option">-metrax4</span></samp> and <samp><span class="option">-metrax100</span></samp> are synonyms for
<samp><span class="option">-march=v3</span></samp> and <samp><span class="option">-march=v8</span></samp> respectively.
<br><dt><code>-mmul-bug-workaround</code><dt><code>-mno-mul-bug-workaround</code><dd><a name="index-mmul_002dbug_002dworkaround-1213"></a><a name="index-mno_002dmul_002dbug_002dworkaround-1214"></a>Work around a bug in the <code>muls</code> and <code>mulu</code> instructions for CPU
models where it applies. This option is active by default.
<br><dt><code>-mpdebug</code><dd><a name="index-mpdebug-1215"></a>Enable CRIS-specific verbose debug-related information in the assembly
code. This option also has the effect of turning off the &lsquo;<samp><span class="samp">#NO_APP</span></samp>&rsquo;
formatted-code indicator to the assembler at the beginning of the
assembly file.
<br><dt><code>-mcc-init</code><dd><a name="index-mcc_002dinit-1216"></a>Do not use condition-code results from previous instruction; always emit
compare and test instructions before use of condition codes.
<br><dt><code>-mno-side-effects</code><dd><a name="index-mno_002dside_002deffects-1217"></a>Do not emit instructions with side effects in addressing modes other than
post-increment.
<br><dt><code>-mstack-align</code><dt><code>-mno-stack-align</code><dt><code>-mdata-align</code><dt><code>-mno-data-align</code><dt><code>-mconst-align</code><dt><code>-mno-const-align</code><dd><a name="index-mstack_002dalign-1218"></a><a name="index-mno_002dstack_002dalign-1219"></a><a name="index-mdata_002dalign-1220"></a><a name="index-mno_002ddata_002dalign-1221"></a><a name="index-mconst_002dalign-1222"></a><a name="index-mno_002dconst_002dalign-1223"></a>These options (&lsquo;<samp><span class="samp">no-</span></samp>&rsquo; options) arrange (eliminate arrangements) for the
stack frame, individual data and constants to be aligned for the maximum
single data access size for the chosen CPU model. The default is to
arrange for 32-bit alignment. ABI details such as structure layout are
not affected by these options.
<br><dt><code>-m32-bit</code><dt><code>-m16-bit</code><dt><code>-m8-bit</code><dd><a name="index-m32_002dbit-1224"></a><a name="index-m16_002dbit-1225"></a><a name="index-m8_002dbit-1226"></a>Similar to the stack- data- and const-align options above, these options
arrange for stack frame, writable data and constants to all be 32-bit,
16-bit or 8-bit aligned. The default is 32-bit alignment.
<br><dt><code>-mno-prologue-epilogue</code><dt><code>-mprologue-epilogue</code><dd><a name="index-mno_002dprologue_002depilogue-1227"></a><a name="index-mprologue_002depilogue-1228"></a>With <samp><span class="option">-mno-prologue-epilogue</span></samp>, the normal function prologue and
epilogue which set up the stack frame are omitted and no return
instructions or return sequences are generated in the code. Use this
option only together with visual inspection of the compiled code: no
warnings or errors are generated when call-saved registers must be saved,
or storage for local variables needs to be allocated.
<br><dt><code>-mno-gotplt</code><dt><code>-mgotplt</code><dd><a name="index-mno_002dgotplt-1229"></a><a name="index-mgotplt-1230"></a>With <samp><span class="option">-fpic</span></samp> and <samp><span class="option">-fPIC</span></samp>, don't generate (do generate)
instruction sequences that load addresses for functions from the PLT part
of the GOT rather than (traditional on other architectures) calls to the
PLT. The default is <samp><span class="option">-mgotplt</span></samp>.
<br><dt><code>-melf</code><dd><a name="index-melf-1231"></a>Legacy no-op option only recognized with the cris-axis-elf and
cris-axis-linux-gnu targets.
<br><dt><code>-mlinux</code><dd><a name="index-mlinux-1232"></a>Legacy no-op option only recognized with the cris-axis-linux-gnu target.
<br><dt><code>-sim</code><dd><a name="index-sim-1233"></a>This option, recognized for the cris-axis-elf, arranges
to link with input-output functions from a simulator library. Code,
initialized data and zero-initialized data are allocated consecutively.
<br><dt><code>-sim2</code><dd><a name="index-sim2-1234"></a>Like <samp><span class="option">-sim</span></samp>, but pass linker options to locate initialized data at
0x40000000 and zero-initialized data at 0x80000000.
</dl>
</body></html>

View file

@ -0,0 +1,111 @@
<html lang="en">
<head>
<title>C++ Attributes - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions" title="C++ Extensions">
<link rel="prev" href="Bound-member-functions.html#Bound-member-functions" title="Bound member functions">
<link rel="next" href="Function-Multiversioning.html#Function-Multiversioning" title="Function Multiversioning">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C++-Attributes"></a>
<a name="C_002b_002b-Attributes"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Function-Multiversioning.html#Function-Multiversioning">Function Multiversioning</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Bound-member-functions.html#Bound-member-functions">Bound member functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions">C++ Extensions</a>
<hr>
</div>
<h3 class="section">7.7 C++-Specific Variable, Function, and Type Attributes</h3>
<p>Some attributes only make sense for C++ programs.
<dl>
<dt><code>abi_tag ("</code><var>tag</var><code>", ...)</code><dd><a name="index-g_t_0040code_007babi_005ftag_007d-attribute-3530"></a>The <code>abi_tag</code> attribute can be applied to a function or class
declaration. It modifies the mangled name of the function or class to
incorporate the tag name, in order to distinguish the function or
class from an earlier version with a different ABI; perhaps the class
has changed size, or the function has a different return type that is
not encoded in the mangled name.
<p>The argument can be a list of strings of arbitrary length. The
strings are sorted on output, so the order of the list is
unimportant.
<p>A redeclaration of a function or class must not add new ABI tags,
since doing so would change the mangled name.
<p>The <samp><span class="option">-Wabi-tag</span></samp> flag enables a warning about a class which does
not have all the ABI tags used by its subobjects and virtual functions; for users with code
that needs to coexist with an earlier ABI, using this option can help
to find all affected types that need to be tagged.
<br><dt><code>init_priority (</code><var>priority</var><code>)</code><dd><a name="index-g_t_0040code_007binit_005fpriority_007d-attribute-3531"></a>
<p>In Standard C++, objects defined at namespace scope are guaranteed to be
initialized in an order in strict accordance with that of their definitions
<em>in a given translation unit</em>. No guarantee is made for initializations
across translation units. However, GNU C++ allows users to control the
order of initialization of objects defined at namespace scope with the
<code>init_priority</code> attribute by specifying a relative <var>priority</var>,
a constant integral expression currently bounded between 101 and 65535
inclusive. Lower numbers indicate a higher priority.
<p>In the following example, <code>A</code> would normally be created before
<code>B</code>, but the <code>init_priority</code> attribute reverses that order:
<pre class="smallexample"> Some_Class A __attribute__ ((init_priority (2000)));
Some_Class B __attribute__ ((init_priority (543)));
</pre>
<p class="noindent">Note that the particular values of <var>priority</var> do not matter; only their
relative ordering.
<br><dt><code>java_interface</code><dd><a name="index-g_t_0040code_007bjava_005finterface_007d-attribute-3532"></a>
This type attribute informs C++ that the class is a Java interface. It may
only be applied to classes declared within an <code>extern "Java"</code> block.
Calls to methods declared in this interface are dispatched using GCJ's
interface table mechanism, instead of regular virtual table dispatch.
</dl>
<p>See also <a href="Namespace-Association.html#Namespace-Association">Namespace Association</a>.
</body></html>

View file

@ -0,0 +1,67 @@
<html lang="en">
<head>
<title>C++ Comments - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Function-Prototypes.html#Function-Prototypes" title="Function Prototypes">
<link rel="next" href="Dollar-Signs.html#Dollar-Signs" title="Dollar Signs">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C++-Comments"></a>
<a name="C_002b_002b-Comments"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Dollar-Signs.html#Dollar-Signs">Dollar Signs</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Function-Prototypes.html#Function-Prototypes">Function Prototypes</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.33 C++ Style Comments</h3>
<p><a name="index-g_t_0040code_007b_002f_002f_007d-2755"></a><a name="index-C_002b_002b-comments-2756"></a><a name="index-comments_002c-C_002b_002b-style-2757"></a>
In GNU C, you may use C++ style comments, which start with &lsquo;<samp><span class="samp">//</span></samp>&rsquo; and
continue until the end of the line. Many other C implementations allow
such comments, and they are included in the 1999 C standard. However,
C++ style comments are not recognized if you specify an <samp><span class="option">-std</span></samp>
option specifying a version of ISO C before C99, or <samp><span class="option">-ansi</span></samp>
(equivalent to <samp><span class="option">-std=c90</span></samp>).
</body></html>

View file

@ -0,0 +1,646 @@
<html lang="en">
<head>
<title>C++ Dialect Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC">
<link rel="prev" href="C-Dialect-Options.html#C-Dialect-Options" title="C Dialect Options">
<link rel="next" href="Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options.html#Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options" title="Objective-C and Objective-C++ Dialect Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C++-Dialect-Options"></a>
<a name="C_002b_002b-Dialect-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options.html#Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options">Objective-C and Objective-C++ Dialect Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="C-Dialect-Options.html#C-Dialect-Options">C Dialect Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking-GCC">Invoking GCC</a>
<hr>
</div>
<h3 class="section">3.5 Options Controlling C++ Dialect</h3>
<p><a name="index-compiler-options_002c-C_002b_002b-133"></a><a name="index-C_002b_002b-options_002c-command_002dline-134"></a><a name="index-options_002c-C_002b_002b-135"></a>This section describes the command-line options that are only meaningful
for C++ programs. You can also use most of the GNU compiler options
regardless of what language your program is in. For example, you
might compile a file <code>firstClass.C</code> like this:
<pre class="smallexample"> g++ -g -frepo -O -c firstClass.C
</pre>
<p class="noindent">In this example, only <samp><span class="option">-frepo</span></samp> is an option meant
only for C++ programs; you can use the other options with any
language supported by GCC.
<p>Here is a list of options that are <em>only</em> for compiling C++ programs:
<dl>
<dt><code>-fabi-version=</code><var>n</var><dd><a name="index-fabi_002dversion-136"></a>Use version <var>n</var> of the C++ ABI. The default is version 2.
<p>Version 0 refers to the version conforming most closely to
the C++ ABI specification. Therefore, the ABI obtained using version 0
will change in different versions of G++ as ABI bugs are fixed.
<p>Version 1 is the version of the C++ ABI that first appeared in G++ 3.2.
<p>Version 2 is the version of the C++ ABI that first appeared in G++ 3.4.
<p>Version 3 corrects an error in mangling a constant address as a
template argument.
<p>Version 4, which first appeared in G++ 4.5, implements a standard
mangling for vector types.
<p>Version 5, which first appeared in G++ 4.6, corrects the mangling of
attribute const/volatile on function pointer types, decltype of a
plain decl, and use of a function parameter in the declaration of
another parameter.
<p>Version 6, which first appeared in G++ 4.7, corrects the promotion
behavior of C++11 scoped enums and the mangling of template argument
packs, const/static_cast, prefix ++ and &ndash;, and a class scope function
used as a template argument.
<p>See also <samp><span class="option">-Wabi</span></samp>.
<br><dt><code>-fno-access-control</code><dd><a name="index-fno_002daccess_002dcontrol-137"></a>Turn off all access checking. This switch is mainly useful for working
around bugs in the access control code.
<br><dt><code>-fcheck-new</code><dd><a name="index-fcheck_002dnew-138"></a>Check that the pointer returned by <code>operator new</code> is non-null
before attempting to modify the storage allocated. This check is
normally unnecessary because the C++ standard specifies that
<code>operator new</code> only returns <code>0</code> if it is declared
&lsquo;<samp><span class="samp">throw()</span></samp>&rsquo;, in which case the compiler always checks the
return value even without this option. In all other cases, when
<code>operator new</code> has a non-empty exception specification, memory
exhaustion is signalled by throwing <code>std::bad_alloc</code>. See also
&lsquo;<samp><span class="samp">new (nothrow)</span></samp>&rsquo;.
<br><dt><code>-fconstexpr-depth=</code><var>n</var><dd><a name="index-fconstexpr_002ddepth-139"></a>Set the maximum nested evaluation depth for C++11 constexpr functions
to <var>n</var>. A limit is needed to detect endless recursion during
constant expression evaluation. The minimum specified by the standard
is 512.
<br><dt><code>-fdeduce-init-list</code><dd><a name="index-fdeduce_002dinit_002dlist-140"></a>Enable deduction of a template type parameter as
<code>std::initializer_list</code> from a brace-enclosed initializer list, i.e.
<pre class="smallexample"> template &lt;class T&gt; auto forward(T t) -&gt; decltype (realfn (t))
{
return realfn (t);
}
void f()
{
forward({1,2}); // call forward&lt;std::initializer_list&lt;int&gt;&gt;
}
</pre>
<p>This deduction was implemented as a possible extension to the
originally proposed semantics for the C++11 standard, but was not part
of the final standard, so it is disabled by default. This option is
deprecated, and may be removed in a future version of G++.
<br><dt><code>-ffriend-injection</code><dd><a name="index-ffriend_002dinjection-141"></a>Inject friend functions into the enclosing namespace, so that they are
visible outside the scope of the class in which they are declared.
Friend functions were documented to work this way in the old Annotated
C++ Reference Manual, and versions of G++ before 4.1 always worked
that way. However, in ISO C++ a friend function that is not declared
in an enclosing scope can only be found using argument dependent
lookup. This option causes friends to be injected as they were in
earlier releases.
<p>This option is for compatibility, and may be removed in a future
release of G++.
<br><dt><code>-fno-elide-constructors</code><dd><a name="index-fno_002delide_002dconstructors-142"></a>The C++ standard allows an implementation to omit creating a temporary
that is only used to initialize another object of the same type.
Specifying this option disables that optimization, and forces G++ to
call the copy constructor in all cases.
<br><dt><code>-fno-enforce-eh-specs</code><dd><a name="index-fno_002denforce_002deh_002dspecs-143"></a>Don't generate code to check for violation of exception specifications
at run time. This option violates the C++ standard, but may be useful
for reducing code size in production builds, much like defining
&lsquo;<samp><span class="samp">NDEBUG</span></samp>&rsquo;. This does not give user code permission to throw
exceptions in violation of the exception specifications; the compiler
still optimizes based on the specifications, so throwing an
unexpected exception results in undefined behavior at run time.
<br><dt><code>-fextern-tls-init</code><dt><code>-fno-extern-tls-init</code><dd><a name="index-fextern_002dtls_002dinit-144"></a><a name="index-fno_002dextern_002dtls_002dinit-145"></a>The C++11 and OpenMP standards allow &lsquo;<samp><span class="samp">thread_local</span></samp>&rsquo; and
&lsquo;<samp><span class="samp">threadprivate</span></samp>&rsquo; variables to have dynamic (runtime)
initialization. To support this, any use of such a variable goes
through a wrapper function that performs any necessary initialization.
When the use and definition of the variable are in the same
translation unit, this overhead can be optimized away, but when the
use is in a different translation unit there is significant overhead
even if the variable doesn't actually need dynamic initialization. If
the programmer can be sure that no use of the variable in a
non-defining TU needs to trigger dynamic initialization (either
because the variable is statically initialized, or a use of the
variable in the defining TU will be executed before any uses in
another TU), they can avoid this overhead with the
<samp><span class="option">-fno-extern-tls-init</span></samp> option.
<p>On targets that support symbol aliases, the default is
<samp><span class="option">-fextern-tls-init</span></samp>. On targets that do not support symbol
aliases, the default is <samp><span class="option">-fno-extern-tls-init</span></samp>.
<br><dt><code>-ffor-scope</code><dt><code>-fno-for-scope</code><dd><a name="index-ffor_002dscope-146"></a><a name="index-fno_002dfor_002dscope-147"></a>If <samp><span class="option">-ffor-scope</span></samp> is specified, the scope of variables declared in
a <i>for-init-statement</i> is limited to the &lsquo;<samp><span class="samp">for</span></samp>&rsquo; loop itself,
as specified by the C++ standard.
If <samp><span class="option">-fno-for-scope</span></samp> is specified, the scope of variables declared in
a <i>for-init-statement</i> extends to the end of the enclosing scope,
as was the case in old versions of G++, and other (traditional)
implementations of C++.
<p>If neither flag is given, the default is to follow the standard,
but to allow and give a warning for old-style code that would
otherwise be invalid, or have different behavior.
<br><dt><code>-fno-gnu-keywords</code><dd><a name="index-fno_002dgnu_002dkeywords-148"></a>Do not recognize <code>typeof</code> as a keyword, so that code can use this
word as an identifier. You can use the keyword <code>__typeof__</code> instead.
<samp><span class="option">-ansi</span></samp> implies <samp><span class="option">-fno-gnu-keywords</span></samp>.
<br><dt><code>-fno-implicit-templates</code><dd><a name="index-fno_002dimplicit_002dtemplates-149"></a>Never emit code for non-inline templates that are instantiated
implicitly (i.e. by use); only emit code for explicit instantiations.
See <a href="Template-Instantiation.html#Template-Instantiation">Template Instantiation</a>, for more information.
<br><dt><code>-fno-implicit-inline-templates</code><dd><a name="index-fno_002dimplicit_002dinline_002dtemplates-150"></a>Don't emit code for implicit instantiations of inline templates, either.
The default is to handle inlines differently so that compiles with and
without optimization need the same set of explicit instantiations.
<br><dt><code>-fno-implement-inlines</code><dd><a name="index-fno_002dimplement_002dinlines-151"></a>To save space, do not emit out-of-line copies of inline functions
controlled by &lsquo;<samp><span class="samp">#pragma implementation</span></samp>&rsquo;. This causes linker
errors if these functions are not inlined everywhere they are called.
<br><dt><code>-fms-extensions</code><dd><a name="index-fms_002dextensions-152"></a>Disable Wpedantic warnings about constructs used in MFC, such as implicit
int and getting a pointer to member function via non-standard syntax.
<br><dt><code>-fno-nonansi-builtins</code><dd><a name="index-fno_002dnonansi_002dbuiltins-153"></a>Disable built-in declarations of functions that are not mandated by
ANSI/ISO C. These include <code>ffs</code>, <code>alloca</code>, <code>_exit</code>,
<code>index</code>, <code>bzero</code>, <code>conjf</code>, and other related functions.
<br><dt><code>-fnothrow-opt</code><dd><a name="index-fnothrow_002dopt-154"></a>Treat a <code>throw()</code> exception specification as if it were a
<code>noexcept</code> specification to reduce or eliminate the text size
overhead relative to a function with no exception specification. If
the function has local variables of types with non-trivial
destructors, the exception specification actually makes the
function smaller because the EH cleanups for those variables can be
optimized away. The semantic effect is that an exception thrown out of
a function with such an exception specification results in a call
to <code>terminate</code> rather than <code>unexpected</code>.
<br><dt><code>-fno-operator-names</code><dd><a name="index-fno_002doperator_002dnames-155"></a>Do not treat the operator name keywords <code>and</code>, <code>bitand</code>,
<code>bitor</code>, <code>compl</code>, <code>not</code>, <code>or</code> and <code>xor</code> as
synonyms as keywords.
<br><dt><code>-fno-optional-diags</code><dd><a name="index-fno_002doptional_002ddiags-156"></a>Disable diagnostics that the standard says a compiler does not need to
issue. Currently, the only such diagnostic issued by G++ is the one for
a name having multiple meanings within a class.
<br><dt><code>-fpermissive</code><dd><a name="index-fpermissive-157"></a>Downgrade some diagnostics about nonconformant code from errors to
warnings. Thus, using <samp><span class="option">-fpermissive</span></samp> allows some
nonconforming code to compile.
<br><dt><code>-fno-pretty-templates</code><dd><a name="index-fno_002dpretty_002dtemplates-158"></a>When an error message refers to a specialization of a function
template, the compiler normally prints the signature of the
template followed by the template arguments and any typedefs or
typenames in the signature (e.g. <code>void f(T) [with T = int]</code>
rather than <code>void f(int)</code>) so that it's clear which template is
involved. When an error message refers to a specialization of a class
template, the compiler omits any template arguments that match
the default template arguments for that template. If either of these
behaviors make it harder to understand the error message rather than
easier, you can use <samp><span class="option">-fno-pretty-templates</span></samp> to disable them.
<br><dt><code>-frepo</code><dd><a name="index-frepo-159"></a>Enable automatic template instantiation at link time. This option also
implies <samp><span class="option">-fno-implicit-templates</span></samp>. See <a href="Template-Instantiation.html#Template-Instantiation">Template Instantiation</a>, for more information.
<br><dt><code>-fno-rtti</code><dd><a name="index-fno_002drtti-160"></a>Disable generation of information about every class with virtual
functions for use by the C++ run-time type identification features
(&lsquo;<samp><span class="samp">dynamic_cast</span></samp>&rsquo; and &lsquo;<samp><span class="samp">typeid</span></samp>&rsquo;). If you don't use those parts
of the language, you can save some space by using this flag. Note that
exception handling uses the same information, but G++ generates it as
needed. The &lsquo;<samp><span class="samp">dynamic_cast</span></samp>&rsquo; operator can still be used for casts that
do not require run-time type information, i.e. casts to <code>void *</code> or to
unambiguous base classes.
<br><dt><code>-fstats</code><dd><a name="index-fstats-161"></a>Emit statistics about front-end processing at the end of the compilation.
This information is generally only useful to the G++ development team.
<br><dt><code>-fstrict-enums</code><dd><a name="index-fstrict_002denums-162"></a>Allow the compiler to optimize using the assumption that a value of
enumerated type can only be one of the values of the enumeration (as
defined in the C++ standard; basically, a value that can be
represented in the minimum number of bits needed to represent all the
enumerators). This assumption may not be valid if the program uses a
cast to convert an arbitrary integer value to the enumerated type.
<br><dt><code>-ftemplate-backtrace-limit=</code><var>n</var><dd><a name="index-ftemplate_002dbacktrace_002dlimit-163"></a>Set the maximum number of template instantiation notes for a single
warning or error to <var>n</var>. The default value is 10.
<br><dt><code>-ftemplate-depth=</code><var>n</var><dd><a name="index-ftemplate_002ddepth-164"></a>Set the maximum instantiation depth for template classes to <var>n</var>.
A limit on the template instantiation depth is needed to detect
endless recursions during template class instantiation. ANSI/ISO C++
conforming programs must not rely on a maximum depth greater than 17
(changed to 1024 in C++11). The default value is 900, as the compiler
can run out of stack space before hitting 1024 in some situations.
<br><dt><code>-fno-threadsafe-statics</code><dd><a name="index-fno_002dthreadsafe_002dstatics-165"></a>Do not emit the extra code to use the routines specified in the C++
ABI for thread-safe initialization of local statics. You can use this
option to reduce code size slightly in code that doesn't need to be
thread-safe.
<br><dt><code>-fuse-cxa-atexit</code><dd><a name="index-fuse_002dcxa_002datexit-166"></a>Register destructors for objects with static storage duration with the
<code>__cxa_atexit</code> function rather than the <code>atexit</code> function.
This option is required for fully standards-compliant handling of static
destructors, but only works if your C library supports
<code>__cxa_atexit</code>.
<br><dt><code>-fno-use-cxa-get-exception-ptr</code><dd><a name="index-fno_002duse_002dcxa_002dget_002dexception_002dptr-167"></a>Don't use the <code>__cxa_get_exception_ptr</code> runtime routine. This
causes <code>std::uncaught_exception</code> to be incorrect, but is necessary
if the runtime routine is not available.
<br><dt><code>-fvisibility-inlines-hidden</code><dd><a name="index-fvisibility_002dinlines_002dhidden-168"></a>This switch declares that the user does not attempt to compare
pointers to inline functions or methods where the addresses of the two functions
are taken in different shared objects.
<p>The effect of this is that GCC may, effectively, mark inline methods with
<code>__attribute__ ((visibility ("hidden")))</code> so that they do not
appear in the export table of a DSO and do not require a PLT indirection
when used within the DSO. Enabling this option can have a dramatic effect
on load and link times of a DSO as it massively reduces the size of the
dynamic export table when the library makes heavy use of templates.
<p>The behavior of this switch is not quite the same as marking the
methods as hidden directly, because it does not affect static variables
local to the function or cause the compiler to deduce that
the function is defined in only one shared object.
<p>You may mark a method as having a visibility explicitly to negate the
effect of the switch for that method. For example, if you do want to
compare pointers to a particular inline method, you might mark it as
having default visibility. Marking the enclosing class with explicit
visibility has no effect.
<p>Explicitly instantiated inline methods are unaffected by this option
as their linkage might otherwise cross a shared library boundary.
See <a href="Template-Instantiation.html#Template-Instantiation">Template Instantiation</a>.
<br><dt><code>-fvisibility-ms-compat</code><dd><a name="index-fvisibility_002dms_002dcompat-169"></a>This flag attempts to use visibility settings to make GCC's C++
linkage model compatible with that of Microsoft Visual Studio.
<p>The flag makes these changes to GCC's linkage model:
<ol type=1 start=1>
<li>It sets the default visibility to <code>hidden</code>, like
<samp><span class="option">-fvisibility=hidden</span></samp>.
<li>Types, but not their members, are not hidden by default.
<li>The One Definition Rule is relaxed for types without explicit
visibility specifications that are defined in more than one
shared object: those declarations are permitted if they are
permitted when this option is not used.
</ol>
<p>In new code it is better to use <samp><span class="option">-fvisibility=hidden</span></samp> and
export those classes that are intended to be externally visible.
Unfortunately it is possible for code to rely, perhaps accidentally,
on the Visual Studio behavior.
<p>Among the consequences of these changes are that static data members
of the same type with the same name but defined in different shared
objects are different, so changing one does not change the other;
and that pointers to function members defined in different shared
objects may not compare equal. When this flag is given, it is a
violation of the ODR to define types with the same name differently.
<br><dt><code>-fno-weak</code><dd><a name="index-fno_002dweak-170"></a>Do not use weak symbol support, even if it is provided by the linker.
By default, G++ uses weak symbols if they are available. This
option exists only for testing, and should not be used by end-users;
it results in inferior code and has no benefits. This option may
be removed in a future release of G++.
<br><dt><code>-nostdinc++</code><dd><a name="index-nostdinc_002b_002b-171"></a>Do not search for header files in the standard directories specific to
C++, but do still search the other standard directories. (This option
is used when building the C++ library.)
</dl>
<p>In addition, these optimization, warning, and code generation options
have meanings only for C++ programs:
<dl>
<dt><code>-fno-default-inline</code><dd><a name="index-fno_002ddefault_002dinline-172"></a>Do not assume &lsquo;<samp><span class="samp">inline</span></samp>&rsquo; for functions defined inside a class scope.
See <a href="Optimize-Options.html#Optimize-Options">Options That Control Optimization</a>. Note that these
functions have linkage like inline functions; they just aren't
inlined by default.
<br><dt><code>-Wabi </code><span class="roman">(C, Objective-C, C++ and Objective-C++ only)</span><dd><a name="index-Wabi-173"></a><a name="index-Wno_002dabi-174"></a>Warn when G++ generates code that is probably not compatible with the
vendor-neutral C++ ABI. Although an effort has been made to warn about
all such cases, there are probably some cases that are not warned about,
even though G++ is generating incompatible code. There may also be
cases where warnings are emitted even though the code that is generated
is compatible.
<p>You should rewrite your code to avoid these warnings if you are
concerned about the fact that code generated by G++ may not be binary
compatible with code generated by other compilers.
<p>The known incompatibilities in <samp><span class="option">-fabi-version=2</span></samp> (the default) include:
<ul>
<li>A template with a non-type template parameter of reference type is
mangled incorrectly:
<pre class="smallexample"> extern int N;
template &lt;int &amp;&gt; struct S {};
void n (S&lt;N&gt;) {2}
</pre>
<p>This is fixed in <samp><span class="option">-fabi-version=3</span></samp>.
<li>SIMD vector types declared using <code>__attribute ((vector_size))</code> are
mangled in a non-standard way that does not allow for overloading of
functions taking vectors of different sizes.
<p>The mangling is changed in <samp><span class="option">-fabi-version=4</span></samp>.
</ul>
<p>The known incompatibilities in <samp><span class="option">-fabi-version=1</span></samp> include:
<ul>
<li>Incorrect handling of tail-padding for bit-fields. G++ may attempt to
pack data into the same byte as a base class. For example:
<pre class="smallexample"> struct A { virtual void f(); int f1 : 1; };
struct B : public A { int f2 : 1; };
</pre>
<p class="noindent">In this case, G++ places <code>B::f2</code> into the same byte
as <code>A::f1</code>; other compilers do not. You can avoid this problem
by explicitly padding <code>A</code> so that its size is a multiple of the
byte size on your platform; that causes G++ and other compilers to
lay out <code>B</code> identically.
<li>Incorrect handling of tail-padding for virtual bases. G++ does not use
tail padding when laying out virtual bases. For example:
<pre class="smallexample"> struct A { virtual void f(); char c1; };
struct B { B(); char c2; };
struct C : public A, public virtual B {};
</pre>
<p class="noindent">In this case, G++ does not place <code>B</code> into the tail-padding for
<code>A</code>; other compilers do. You can avoid this problem by
explicitly padding <code>A</code> so that its size is a multiple of its
alignment (ignoring virtual base classes); that causes G++ and other
compilers to lay out <code>C</code> identically.
<li>Incorrect handling of bit-fields with declared widths greater than that
of their underlying types, when the bit-fields appear in a union. For
example:
<pre class="smallexample"> union U { int i : 4096; };
</pre>
<p class="noindent">Assuming that an <code>int</code> does not have 4096 bits, G++ makes the
union too small by the number of bits in an <code>int</code>.
<li>Empty classes can be placed at incorrect offsets. For example:
<pre class="smallexample"> struct A {};
struct B {
A a;
virtual void f ();
};
struct C : public B, public A {};
</pre>
<p class="noindent">G++ places the <code>A</code> base class of <code>C</code> at a nonzero offset;
it should be placed at offset zero. G++ mistakenly believes that the
<code>A</code> data member of <code>B</code> is already at offset zero.
<li>Names of template functions whose types involve <code>typename</code> or
template template parameters can be mangled incorrectly.
<pre class="smallexample"> template &lt;typename Q&gt;
void f(typename Q::X) {}
template &lt;template &lt;typename&gt; class Q&gt;
void f(typename Q&lt;int&gt;::X) {}
</pre>
<p class="noindent">Instantiations of these templates may be mangled incorrectly.
</ul>
<p>It also warns about psABI-related changes. The known psABI changes at this
point include:
<ul>
<li>For SysV/x86-64, unions with <code>long double</code> members are
passed in memory as specified in psABI. For example:
<pre class="smallexample"> union U {
long double ld;
int i;
};
</pre>
<p class="noindent"><code>union U</code> is always passed in memory.
</ul>
<br><dt><code>-Wctor-dtor-privacy </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wctor_002ddtor_002dprivacy-175"></a><a name="index-Wno_002dctor_002ddtor_002dprivacy-176"></a>Warn when a class seems unusable because all the constructors or
destructors in that class are private, and it has neither friends nor
public static member functions. Also warn if there are no non-private
methods, and there's at least one private member function that isn't
a constructor or destructor.
<br><dt><code>-Wdelete-non-virtual-dtor </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wdelete_002dnon_002dvirtual_002ddtor-177"></a><a name="index-Wno_002ddelete_002dnon_002dvirtual_002ddtor-178"></a>Warn when &lsquo;<samp><span class="samp">delete</span></samp>&rsquo; is used to destroy an instance of a class that
has virtual functions and non-virtual destructor. It is unsafe to delete
an instance of a derived class through a pointer to a base class if the
base class does not have a virtual destructor. This warning is enabled
by <samp><span class="option">-Wall</span></samp>.
<br><dt><code>-Wliteral-suffix </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wliteral_002dsuffix-179"></a><a name="index-Wno_002dliteral_002dsuffix-180"></a>Warn when a string or character literal is followed by a ud-suffix which does
not begin with an underscore. As a conforming extension, GCC treats such
suffixes as separate preprocessing tokens in order to maintain backwards
compatibility with code that uses formatting macros from <code>&lt;inttypes.h&gt;</code>.
For example:
<pre class="smallexample"> #define __STDC_FORMAT_MACROS
#include &lt;inttypes.h&gt;
#include &lt;stdio.h&gt;
int main() {
int64_t i64 = 123;
printf("My int64: %"PRId64"\n", i64);
}
</pre>
<p>In this case, <code>PRId64</code> is treated as a separate preprocessing token.
<p>This warning is enabled by default.
<br><dt><code>-Wnarrowing </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wnarrowing-181"></a><a name="index-Wno_002dnarrowing-182"></a>Warn when a narrowing conversion prohibited by C++11 occurs within
&lsquo;<samp><span class="samp">{ }</span></samp>&rsquo;, e.g.
<pre class="smallexample"> int i = { 2.2 }; // error: narrowing from double to int
</pre>
<p>This flag is included in <samp><span class="option">-Wall</span></samp> and <samp><span class="option">-Wc++11-compat</span></samp>.
<p>With <samp><span class="option">-std=c++11</span></samp>, <samp><span class="option">-Wno-narrowing</span></samp> suppresses the diagnostic
required by the standard. Note that this does not affect the meaning
of well-formed code; narrowing conversions are still considered
ill-formed in SFINAE context.
<br><dt><code>-Wnoexcept </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wnoexcept-183"></a><a name="index-Wno_002dnoexcept-184"></a>Warn when a noexcept-expression evaluates to false because of a call
to a function that does not have a non-throwing exception
specification (i.e. &lsquo;<samp><span class="samp">throw()</span></samp>&rsquo; or &lsquo;<samp><span class="samp">noexcept</span></samp>&rsquo;) but is known by
the compiler to never throw an exception.
<br><dt><code>-Wnon-virtual-dtor </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wnon_002dvirtual_002ddtor-185"></a><a name="index-Wno_002dnon_002dvirtual_002ddtor-186"></a>Warn when a class has virtual functions and an accessible non-virtual
destructor, in which case it is possible but unsafe to delete
an instance of a derived class through a pointer to the base class.
This warning is also enabled if <samp><span class="option">-Weffc++</span></samp> is specified.
<br><dt><code>-Wreorder </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wreorder-187"></a><a name="index-Wno_002dreorder-188"></a><a name="index-reordering_002c-warning-189"></a><a name="index-warning-for-reordering-of-member-initializers-190"></a>Warn when the order of member initializers given in the code does not
match the order in which they must be executed. For instance:
<pre class="smallexample"> struct A {
int i;
int j;
A(): j (0), i (1) { }
};
</pre>
<p class="noindent">The compiler rearranges the member initializers for &lsquo;<samp><span class="samp">i</span></samp>&rsquo;
and &lsquo;<samp><span class="samp">j</span></samp>&rsquo; to match the declaration order of the members, emitting
a warning to that effect. This warning is enabled by <samp><span class="option">-Wall</span></samp>.
<br><dt><code>-fext-numeric-literals </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-fext_002dnumeric_002dliterals-191"></a><a name="index-fno_002dext_002dnumeric_002dliterals-192"></a>Accept imaginary, fixed-point, or machine-defined
literal number suffixes as GNU extensions.
When this option is turned off these suffixes are treated
as C++11 user-defined literal numeric suffixes.
This is on by default for all pre-C++11 dialects and all GNU dialects:
<samp><span class="option">-std=c++98</span></samp>, <samp><span class="option">-std=gnu++98</span></samp>, <samp><span class="option">-std=gnu++11</span></samp>,
<samp><span class="option">-std=gnu++1y</span></samp>.
This option is off by default
for ISO C++11 onwards (<samp><span class="option">-std=c++11</span></samp>, ...).
</dl>
<p>The following <samp><span class="option">-W...</span></samp> options are not affected by <samp><span class="option">-Wall</span></samp>.
<dl>
<dt><code>-Weffc++ </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Weffc_002b_002b-193"></a><a name="index-Wno_002deffc_002b_002b-194"></a>Warn about violations of the following style guidelines from Scott Meyers'
<cite>Effective C++, Second Edition</cite> book:
<ul>
<li>Item 11: Define a copy constructor and an assignment operator for classes
with dynamically-allocated memory.
<li>Item 12: Prefer initialization to assignment in constructors.
<li>Item 14: Make destructors virtual in base classes.
<li>Item 15: Have <code>operator=</code> return a reference to <code>*this</code>.
<li>Item 23: Don't try to return a reference when you must return an object.
</ul>
<p>Also warn about violations of the following style guidelines from
Scott Meyers' <cite>More Effective C++</cite> book:
<ul>
<li>Item 6: Distinguish between prefix and postfix forms of increment and
decrement operators.
<li>Item 7: Never overload <code>&amp;&amp;</code>, <code>||</code>, or <code>,</code>.
</ul>
<p>When selecting this option, be aware that the standard library
headers do not obey all of these guidelines; use &lsquo;<samp><span class="samp">grep -v</span></samp>&rsquo;
to filter out those warnings.
<br><dt><code>-Wstrict-null-sentinel </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wstrict_002dnull_002dsentinel-195"></a><a name="index-Wno_002dstrict_002dnull_002dsentinel-196"></a>Warn about the use of an uncasted <code>NULL</code> as sentinel. When
compiling only with GCC this is a valid sentinel, as <code>NULL</code> is defined
to <code>__null</code>. Although it is a null pointer constant rather than a
null pointer, it is guaranteed to be of the same size as a pointer.
But this use is not portable across different compilers.
<br><dt><code>-Wno-non-template-friend </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wno_002dnon_002dtemplate_002dfriend-197"></a><a name="index-Wnon_002dtemplate_002dfriend-198"></a>Disable warnings when non-templatized friend functions are declared
within a template. Since the advent of explicit template specification
support in G++, if the name of the friend is an unqualified-id (i.e.,
&lsquo;<samp><span class="samp">friend foo(int)</span></samp>&rsquo;), the C++ language specification demands that the
friend declare or define an ordinary, nontemplate function. (Section
14.5.3). Before G++ implemented explicit specification, unqualified-ids
could be interpreted as a particular specialization of a templatized
function. Because this non-conforming behavior is no longer the default
behavior for G++, <samp><span class="option">-Wnon-template-friend</span></samp> allows the compiler to
check existing code for potential trouble spots and is on by default.
This new compiler behavior can be turned off with
<samp><span class="option">-Wno-non-template-friend</span></samp>, which keeps the conformant compiler code
but disables the helpful warning.
<br><dt><code>-Wold-style-cast </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wold_002dstyle_002dcast-199"></a><a name="index-Wno_002dold_002dstyle_002dcast-200"></a>Warn if an old-style (C-style) cast to a non-void type is used within
a C++ program. The new-style casts (&lsquo;<samp><span class="samp">dynamic_cast</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">static_cast</span></samp>&rsquo;, &lsquo;<samp><span class="samp">reinterpret_cast</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">const_cast</span></samp>&rsquo;) are
less vulnerable to unintended effects and much easier to search for.
<br><dt><code>-Woverloaded-virtual </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Woverloaded_002dvirtual-201"></a><a name="index-Wno_002doverloaded_002dvirtual-202"></a><a name="index-overloaded-virtual-function_002c-warning-203"></a><a name="index-warning-for-overloaded-virtual-function-204"></a>Warn when a function declaration hides virtual functions from a
base class. For example, in:
<pre class="smallexample"> struct A {
virtual void f();
};
struct B: public A {
void f(int);
};
</pre>
<p>the <code>A</code> class version of <code>f</code> is hidden in <code>B</code>, and code
like:
<pre class="smallexample"> B* b;
b-&gt;f();
</pre>
<p class="noindent">fails to compile.
<br><dt><code>-Wno-pmf-conversions </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wno_002dpmf_002dconversions-205"></a><a name="index-Wpmf_002dconversions-206"></a>Disable the diagnostic for converting a bound pointer to member function
to a plain pointer.
<br><dt><code>-Wsign-promo </code><span class="roman">(C++ and Objective-C++ only)</span><dd><a name="index-Wsign_002dpromo-207"></a><a name="index-Wno_002dsign_002dpromo-208"></a>Warn when overload resolution chooses a promotion from unsigned or
enumerated type to a signed type, over a conversion to an unsigned type of
the same size. Previous versions of G++ tried to preserve
unsignedness, but the standard mandates the current behavior.
</dl>
</body></html>

View file

@ -0,0 +1,85 @@
<html lang="en">
<head>
<title>C++ Extensions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="next" href="Objective_002dC.html#Objective_002dC" title="Objective-C">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C++-Extensions"></a>
<a name="C_002b_002b-Extensions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Objective_002dC.html#Objective_002dC">Objective-C</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="C-Extensions.html#C-Extensions">C Extensions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">7 Extensions to the C++ Language</h2>
<p><a name="index-extensions_002c-C_002b_002b-language-3498"></a><a name="index-C_002b_002b-language-extensions-3499"></a>
The GNU compiler provides these extensions to the C++ language (and you
can also use most of the C language extensions in your C++ programs). If you
want to write code that checks whether these features are available, you can
test for the GNU compiler the same way as for C programs: check for a
predefined macro <code>__GNUC__</code>. You can also use <code>__GNUG__</code> to
test specifically for GNU C++ (see <a href="../cpp/Common-Predefined-Macros.html#Common-Predefined-Macros">Predefined Macros</a>).
<ul class="menu">
<li><a accesskey="1" href="C_002b_002b-Volatiles.html#C_002b_002b-Volatiles">C++ Volatiles</a>: What constitutes an access to a volatile object.
<li><a accesskey="2" href="Restricted-Pointers.html#Restricted-Pointers">Restricted Pointers</a>: C99 restricted pointers and references.
<li><a accesskey="3" href="Vague-Linkage.html#Vague-Linkage">Vague Linkage</a>: Where G++ puts inlines, vtables and such.
<li><a accesskey="4" href="C_002b_002b-Interface.html#C_002b_002b-Interface">C++ Interface</a>: You can use a single C++ header file for both
declarations and definitions.
<li><a accesskey="5" href="Template-Instantiation.html#Template-Instantiation">Template Instantiation</a>: Methods for ensuring that exactly one copy of
each needed template instantiation is emitted.
<li><a accesskey="6" href="Bound-member-functions.html#Bound-member-functions">Bound member functions</a>: You can extract a function pointer to the
method denoted by a &lsquo;<samp><span class="samp">-&gt;*</span></samp>&rsquo; or &lsquo;<samp><span class="samp">.*</span></samp>&rsquo; expression.
<li><a accesskey="7" href="C_002b_002b-Attributes.html#C_002b_002b-Attributes">C++ Attributes</a>: Variable, function, and type attributes for C++ only.
<li><a accesskey="8" href="Function-Multiversioning.html#Function-Multiversioning">Function Multiversioning</a>: Declaring multiple function versions.
<li><a accesskey="9" href="Namespace-Association.html#Namespace-Association">Namespace Association</a>: Strong using-directives for namespace association.
<li><a href="Type-Traits.html#Type-Traits">Type Traits</a>: Compiler support for type traits
<li><a href="Java-Exceptions.html#Java-Exceptions">Java Exceptions</a>: Tweaking exception handling to work with Java.
<li><a href="Deprecated-Features.html#Deprecated-Features">Deprecated Features</a>: Things will disappear from G++.
<li><a href="Backwards-Compatibility.html#Backwards-Compatibility">Backwards Compatibility</a>: Compatibilities with earlier definitions of C++.
</ul>
</body></html>

View file

@ -0,0 +1,80 @@
<html lang="en">
<head>
<title>C++ Implementation - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="C-Implementation.html#C-Implementation" title="C Implementation">
<link rel="next" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C++-Implementation"></a>
<a name="C_002b_002b-Implementation"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="C-Extensions.html#C-Extensions">C Extensions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="C-Implementation.html#C-Implementation">C Implementation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">5 C++ Implementation-defined behavior</h2>
<p><a name="index-implementation_002ddefined-behavior_002c-C_002b_002b-language-2402"></a>
A conforming implementation of ISO C++ is required to document its
choice of behavior in each of the areas that are designated
&ldquo;implementation defined&rdquo;. The following lists all such areas,
along with the section numbers from the ISO/IEC 14882:1998 and ISO/IEC
14882:2003 standards. Some areas are only implementation-defined in
one version of the standard.
<p>Some choices depend on the externally determined ABI for the platform
(including standard character encodings) which GCC follows; these are
listed as &ldquo;determined by ABI&rdquo; below. See <a href="Compatibility.html#Compatibility">Binary Compatibility</a>, and <a href="http://gcc.gnu.org/readings.html">http://gcc.gnu.org/readings.html</a>. Some
choices are documented in the preprocessor manual.
See <a href="../cpp/Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">Implementation-defined behavior</a>. Some choices are documented in
the corresponding document for the C language. See <a href="C-Implementation.html#C-Implementation">C Implementation</a>. Some choices are made by the library and operating
system (or other environment when compiling for a freestanding
environment); refer to their documentation for details.
<ul class="menu">
<li><a accesskey="1" href="Conditionally_002dsupported-behavior.html#Conditionally_002dsupported-behavior">Conditionally-supported behavior</a>
<li><a accesskey="2" href="Exception-handling.html#Exception-handling">Exception handling</a>
</ul>
</body></html>

View file

@ -0,0 +1,146 @@
<html lang="en">
<head>
<title>C++ Interface - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions" title="C++ Extensions">
<link rel="prev" href="Vague-Linkage.html#Vague-Linkage" title="Vague Linkage">
<link rel="next" href="Template-Instantiation.html#Template-Instantiation" title="Template Instantiation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C++-Interface"></a>
<a name="C_002b_002b-Interface"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Template-Instantiation.html#Template-Instantiation">Template Instantiation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Vague-Linkage.html#Vague-Linkage">Vague Linkage</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions">C++ Extensions</a>
<hr>
</div>
<h3 class="section">7.4 #pragma interface and implementation</h3>
<p><a name="index-interface-and-implementation-headers_002c-C_002b_002b-3511"></a><a name="index-C_002b_002b-interface-and-implementation-headers-3512"></a><a name="index-pragmas_002c-interface-and-implementation-3513"></a>
<code>#pragma interface</code> and <code>#pragma implementation</code> provide the
user with a way of explicitly directing the compiler to emit entities
with vague linkage (and debugging information) in a particular
translation unit.
<p><em>Note:</em> As of GCC 2.7.2, these <code>#pragma</code>s are not useful in
most cases, because of COMDAT support and the &ldquo;key method&rdquo; heuristic
mentioned in <a href="Vague-Linkage.html#Vague-Linkage">Vague Linkage</a>. Using them can actually cause your
program to grow due to unnecessary out-of-line copies of inline
functions. Currently (3.4) the only benefit of these
<code>#pragma</code>s is reduced duplication of debugging information, and
that should be addressed soon on DWARF 2 targets with the use of
COMDAT groups.
<dl>
<dt><code>#pragma interface</code><dt><code>#pragma interface "</code><var>subdir</var><code>/</code><var>objects</var><code>.h"</code><dd><a name="index-g_t_0023pragma-interface-3514"></a>Use this directive in <em>header files</em> that define object classes, to save
space in most of the object files that use those classes. Normally,
local copies of certain information (backup copies of inline member
functions, debugging information, and the internal tables that implement
virtual functions) must be kept in each object file that includes class
definitions. You can use this pragma to avoid such duplication. When a
header file containing &lsquo;<samp><span class="samp">#pragma interface</span></samp>&rsquo; is included in a
compilation, this auxiliary information is not generated (unless
the main input source file itself uses &lsquo;<samp><span class="samp">#pragma implementation</span></samp>&rsquo;).
Instead, the object files contain references to be resolved at link
time.
<p>The second form of this directive is useful for the case where you have
multiple headers with the same name in different directories. If you
use this form, you must specify the same string to &lsquo;<samp><span class="samp">#pragma
implementation</span></samp>&rsquo;.
<br><dt><code>#pragma implementation</code><dt><code>#pragma implementation "</code><var>objects</var><code>.h"</code><dd><a name="index-g_t_0023pragma-implementation-3515"></a>Use this pragma in a <em>main input file</em>, when you want full output from
included header files to be generated (and made globally visible). The
included header file, in turn, should use &lsquo;<samp><span class="samp">#pragma interface</span></samp>&rsquo;.
Backup copies of inline member functions, debugging information, and the
internal tables used to implement virtual functions are all generated in
implementation files.
<p><a name="index-implied-_0040code_007b_0023pragma-implementation_007d-3516"></a><a name="index-g_t_0040code_007b_0023pragma-implementation_007d_002c-implied-3517"></a><a name="index-naming-convention_002c-implementation-headers-3518"></a>If you use &lsquo;<samp><span class="samp">#pragma implementation</span></samp>&rsquo; with no argument, it applies to
an include file with the same basename<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a> as your source
file. For example, in <samp><span class="file">allclass.cc</span></samp>, giving just
&lsquo;<samp><span class="samp">#pragma implementation</span></samp>&rsquo;
by itself is equivalent to &lsquo;<samp><span class="samp">#pragma implementation "allclass.h"</span></samp>&rsquo;.
<p>In versions of GNU C++ prior to 2.6.0 <samp><span class="file">allclass.h</span></samp> was treated as
an implementation file whenever you would include it from
<samp><span class="file">allclass.cc</span></samp> even if you never specified &lsquo;<samp><span class="samp">#pragma
implementation</span></samp>&rsquo;. This was deemed to be more trouble than it was worth,
however, and disabled.
<p>Use the string argument if you want a single implementation file to
include code from multiple header files. (You must also use
&lsquo;<samp><span class="samp">#include</span></samp>&rsquo; to include the header file; &lsquo;<samp><span class="samp">#pragma
implementation</span></samp>&rsquo; only specifies how to use the file&mdash;it doesn't actually
include it.)
<p>There is no way to split up the contents of a single header file into
multiple implementation files.
</dl>
<p><a name="index-inlining-and-C_002b_002b-pragmas-3519"></a><a name="index-C_002b_002b-pragmas_002c-effect-on-inlining-3520"></a><a name="index-pragmas-in-C_002b_002b_002c-effect-on-inlining-3521"></a>&lsquo;<samp><span class="samp">#pragma implementation</span></samp>&rsquo; and &lsquo;<samp><span class="samp">#pragma interface</span></samp>&rsquo; also have an
effect on function inlining.
<p>If you define a class in a header file marked with &lsquo;<samp><span class="samp">#pragma
interface</span></samp>&rsquo;, the effect on an inline function defined in that class is
similar to an explicit <code>extern</code> declaration&mdash;the compiler emits
no code at all to define an independent version of the function. Its
definition is used only for inlining with its callers.
<p><a name="index-fno_002dimplement_002dinlines-3522"></a>Conversely, when you include the same header file in a main source file
that declares it as &lsquo;<samp><span class="samp">#pragma implementation</span></samp>&rsquo;, the compiler emits
code for the function itself; this defines a version of the function
that can be found via pointers (or by callers compiled without
inlining). If all calls to the function can be inlined, you can avoid
emitting the function by compiling with <samp><span class="option">-fno-implement-inlines</span></samp>.
If any calls are not inlined, you will get linker errors.
<div class="footnote">
<hr>
<h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> A file's <dfn>basename</dfn>
is the name stripped of all leading path information and of trailing
suffixes, such as &lsquo;<samp><span class="samp">.h</span></samp>&rsquo; or &lsquo;<samp><span class="samp">.C</span></samp>&rsquo; or &lsquo;<samp><span class="samp">.cc</span></samp>&rsquo;.</p>
<hr></div>
</body></html>

View file

@ -0,0 +1,72 @@
<html lang="en">
<head>
<title>C++ Misunderstandings - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Trouble.html#Trouble" title="Trouble">
<link rel="prev" href="Disappointments.html#Disappointments" title="Disappointments">
<link rel="next" href="Non_002dbugs.html#Non_002dbugs" title="Non-bugs">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C++-Misunderstandings"></a>
<a name="C_002b_002b-Misunderstandings"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Non_002dbugs.html#Non_002dbugs">Non-bugs</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Disappointments.html#Disappointments">Disappointments</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Trouble.html#Trouble">Trouble</a>
<hr>
</div>
<h3 class="section">11.7 Common Misunderstandings with GNU C++</h3>
<p><a name="index-misunderstandings-in-C_002b_002b-3573"></a><a name="index-surprises-in-C_002b_002b-3574"></a><a name="index-C_002b_002b-misunderstandings-3575"></a>C++ is a complex language and an evolving one, and its standard
definition (the ISO C++ standard) was only recently completed. As a
result, your C++ compiler may occasionally surprise you, even when its
behavior is correct. This section discusses some areas that frequently
give rise to questions of this sort.
<ul class="menu">
<li><a accesskey="1" href="Static-Definitions.html#Static-Definitions">Static Definitions</a>: Static member declarations are not definitions
<li><a accesskey="2" href="Name-lookup.html#Name-lookup">Name lookup</a>: Name lookup, templates, and accessing members of base classes
<li><a accesskey="3" href="Temporaries.html#Temporaries">Temporaries</a>: Temporaries may vanish before you expect
<li><a accesskey="4" href="Copy-Assignment.html#Copy-Assignment">Copy Assignment</a>: Copy Assignment operators copy virtual bases twice
</ul>
</body></html>

View file

@ -0,0 +1,101 @@
<html lang="en">
<head>
<title>C++ Volatiles - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions" title="C++ Extensions">
<link rel="next" href="Restricted-Pointers.html#Restricted-Pointers" title="Restricted Pointers">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C++-Volatiles"></a>
<a name="C_002b_002b-Volatiles"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Restricted-Pointers.html#Restricted-Pointers">Restricted Pointers</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions">C++ Extensions</a>
<hr>
</div>
<h3 class="section">7.1 When is a Volatile C++ Object Accessed?</h3>
<p><a name="index-accessing-volatiles-3500"></a><a name="index-volatile-read-3501"></a><a name="index-volatile-write-3502"></a><a name="index-volatile-access-3503"></a>
The C++ standard differs from the C standard in its treatment of
volatile objects. It fails to specify what constitutes a volatile
access, except to say that C++ should behave in a similar manner to C
with respect to volatiles, where possible. However, the different
lvalueness of expressions between C and C++ complicate the behavior.
G++ behaves the same as GCC for volatile access, See <a href="C-Extensions.html#C-Extensions">Volatiles</a>, for a description of GCC's behavior.
<p>The C and C++ language specifications differ when an object is
accessed in a void context:
<pre class="smallexample"> volatile int *src = <var>somevalue</var>;
*src;
</pre>
<p>The C++ standard specifies that such expressions do not undergo lvalue
to rvalue conversion, and that the type of the dereferenced object may
be incomplete. The C++ standard does not specify explicitly that it
is lvalue to rvalue conversion that is responsible for causing an
access. There is reason to believe that it is, because otherwise
certain simple expressions become undefined. However, because it
would surprise most programmers, G++ treats dereferencing a pointer to
volatile object of complete type as GCC would do for an equivalent
type in C. When the object has incomplete type, G++ issues a
warning; if you wish to force an error, you must force a conversion to
rvalue with, for instance, a static cast.
<p>When using a reference to volatile, G++ does not treat equivalent
expressions as accesses to volatiles, but instead issues a warning that
no volatile is accessed. The rationale for this is that otherwise it
becomes difficult to determine where volatile access occur, and not
possible to ignore the return value from functions returning volatile
references. Again, if you wish to force a read, cast the reference to
an rvalue.
<p>G++ implements the same behavior as GCC does when assigning to a
volatile object&mdash;there is no reread of the assigned-to object, the
assigned rvalue is reused. Note that in C++ assignment expressions
are lvalues, and if used as an lvalue, the volatile object is
referred to. For instance, <var>vref</var> refers to <var>vobj</var>, as
expected, in the following example:
<pre class="smallexample"> volatile int vobj;
volatile int &amp;vref = vobj = <var>something</var>;
</pre>
</body></html>

View file

@ -0,0 +1,182 @@
<html lang="en">
<head>
<title>C++98 Thread-Local Edits - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Thread_002dLocal.html#Thread_002dLocal" title="Thread-Local">
<link rel="prev" href="C99-Thread_002dLocal-Edits.html#C99-Thread_002dLocal-Edits" title="C99 Thread-Local Edits">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C++98-Thread-Local-Edits"></a>
<a name="C_002b_002b98-Thread_002dLocal-Edits"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="C99-Thread_002dLocal-Edits.html#C99-Thread_002dLocal-Edits">C99 Thread-Local Edits</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Thread_002dLocal.html#Thread_002dLocal">Thread-Local</a>
<hr>
</div>
<h4 class="subsection">6.60.2 ISO/IEC 14882:1998 Edits for Thread-Local Storage</h4>
<p>The following are a set of changes to ISO/IEC 14882:1998 (aka C++98)
that document the exact semantics of the language extension.
<ul>
<li><b>[intro.execution]</b>
<p>New text after paragraph 4
<blockquote>
A <dfn>thread</dfn> is a flow of control within the abstract machine.
It is implementation defined whether or not there may be more than
one thread.
</blockquote>
<p>New text after paragraph 7
<blockquote>
It is unspecified whether additional action must be taken to
ensure when and whether side effects are visible to other threads.
</blockquote>
<li><b>[lex.key]</b>
<p>Add <code>__thread</code>.
<li><b>[basic.start.main]</b>
<p>Add after paragraph 5
<blockquote>
The thread that begins execution at the <code>main</code> function is called
the <dfn>main thread</dfn>. It is implementation defined how functions
beginning threads other than the main thread are designated or typed.
A function so designated, as well as the <code>main</code> function, is called
a <dfn>thread startup function</dfn>. It is implementation defined what
happens if a thread startup function returns. It is implementation
defined what happens to other threads when any thread calls <code>exit</code>.
</blockquote>
<li><b>[basic.start.init]</b>
<p>Add after paragraph 4
<blockquote>
The storage for an object of thread storage duration shall be
statically initialized before the first statement of the thread startup
function. An object of thread storage duration shall not require
dynamic initialization.
</blockquote>
<li><b>[basic.start.term]</b>
<p>Add after paragraph 3
<blockquote>
The type of an object with thread storage duration shall not have a
non-trivial destructor, nor shall it be an array type whose elements
(directly or indirectly) have non-trivial destructors.
</blockquote>
<li><b>[basic.stc]</b>
<p>Add &ldquo;thread storage duration&rdquo; to the list in paragraph 1.
<p>Change paragraph 2
<blockquote>
Thread, static, and automatic storage durations are associated with
objects introduced by declarations [<small class="dots">...</small>].
</blockquote>
<p>Add <code>__thread</code> to the list of specifiers in paragraph 3.
<li><b>[basic.stc.thread]</b>
<p>New section before <b>[basic.stc.static]</b>
<blockquote>
The keyword <code>__thread</code> applied to a non-local object gives the
object thread storage duration.
<p>A local variable or class data member declared both <code>static</code>
and <code>__thread</code> gives the variable or member thread storage
duration.
</blockquote>
<li><b>[basic.stc.static]</b>
<p>Change paragraph 1
<blockquote>
All objects that have neither thread storage duration, dynamic
storage duration nor are local [<small class="dots">...</small>].
</blockquote>
<li><b>[dcl.stc]</b>
<p>Add <code>__thread</code> to the list in paragraph 1.
<p>Change paragraph 1
<blockquote>
With the exception of <code>__thread</code>, at most one
<var>storage-class-specifier</var> shall appear in a given
<var>decl-specifier-seq</var>. The <code>__thread</code> specifier may
be used alone, or immediately following the <code>extern</code> or
<code>static</code> specifiers. [<small class="dots">...</small>]
</blockquote>
<p>Add after paragraph 5
<blockquote>
The <code>__thread</code> specifier can be applied only to the names of objects
and to anonymous unions.
</blockquote>
<li><b>[class.mem]</b>
<p>Add after paragraph 6
<blockquote>
Non-<code>static</code> members shall not be <code>__thread</code>.
</blockquote>
</ul>
</body></html>

View file

@ -0,0 +1,81 @@
<html lang="en">
<head>
<title>Case Ranges - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Designated-Inits.html#Designated-Inits" title="Designated Inits">
<link rel="next" href="Cast-to-Union.html#Cast-to-Union" title="Cast to Union">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Case-Ranges"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Cast-to-Union.html#Cast-to-Union">Cast to Union</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Designated-Inits.html#Designated-Inits">Designated Inits</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.27 Case Ranges</h3>
<p><a name="index-case-ranges-2562"></a><a name="index-ranges-in-case-statements-2563"></a>
You can specify a range of consecutive values in a single <code>case</code> label,
like this:
<pre class="smallexample"> case <var>low</var> ... <var>high</var>:
</pre>
<p class="noindent">This has the same effect as the proper number of individual <code>case</code>
labels, one for each integer value from <var>low</var> to <var>high</var>, inclusive.
<p>This feature is especially useful for ranges of ASCII character codes:
<pre class="smallexample"> case 'A' ... 'Z':
</pre>
<p><strong>Be careful:</strong> Write spaces around the <code>...</code>, for otherwise
it may be parsed wrong when you use it with integer values. For example,
write this:
<pre class="smallexample"> case 1 ... 5:
</pre>
<p class="noindent">rather than this:
<pre class="smallexample"> case 1...5:
</pre>
</body></html>

View file

@ -0,0 +1,88 @@
<html lang="en">
<head>
<title>Cast to Union - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Case-Ranges.html#Case-Ranges" title="Case Ranges">
<link rel="next" href="Mixed-Declarations.html#Mixed-Declarations" title="Mixed Declarations">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Cast-to-Union"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Mixed-Declarations.html#Mixed-Declarations">Mixed Declarations</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Case-Ranges.html#Case-Ranges">Case Ranges</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.28 Cast to a Union Type</h3>
<p><a name="index-cast-to-a-union-2564"></a><a name="index-union_002c-casting-to-a-2565"></a>
A cast to union type is similar to other casts, except that the type
specified is a union type. You can specify the type either with
<code>union </code><var>tag</var> or with a typedef name. A cast to union is actually
a constructor, not a cast, and hence does not yield an lvalue like
normal casts. (See <a href="Compound-Literals.html#Compound-Literals">Compound Literals</a>.)
<p>The types that may be cast to the union type are those of the members
of the union. Thus, given the following union and variables:
<pre class="smallexample"> union foo { int i; double d; };
int x;
double y;
</pre>
<p class="noindent">both <code>x</code> and <code>y</code> can be cast to type <code>union foo</code>.
<p>Using the cast as the right-hand side of an assignment to a variable of
union type is equivalent to storing in a member of the union:
<pre class="smallexample"> union foo u;
/* <span class="roman">...</span> */
u = (union foo) x == u.i = x
u = (union foo) y == u.d = y
</pre>
<p>You can also use the union cast as a function argument:
<pre class="smallexample"> void hack (union foo);
/* <span class="roman">...</span> */
hack ((union foo) x);
</pre>
</body></html>

View file

@ -0,0 +1,61 @@
<html lang="en">
<head>
<title>Character Escapes - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Dollar-Signs.html#Dollar-Signs" title="Dollar Signs">
<link rel="next" href="Variable-Attributes.html#Variable-Attributes" title="Variable Attributes">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Character-Escapes"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Variable-Attributes.html#Variable-Attributes">Variable Attributes</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Dollar-Signs.html#Dollar-Signs">Dollar Signs</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.35 The Character &lt;ESC&gt; in Constants</h3>
<p>You can use the sequence &lsquo;<samp><span class="samp">\e</span></samp>&rsquo; in a string or character constant to
stand for the ASCII character &lt;ESC&gt;.
</body></html>

View file

@ -0,0 +1,123 @@
<html lang="en">
<head>
<title>Characters implementation - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Implementation.html#C-Implementation" title="C Implementation">
<link rel="prev" href="Identifiers-implementation.html#Identifiers-implementation" title="Identifiers implementation">
<link rel="next" href="Integers-implementation.html#Integers-implementation" title="Integers implementation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Characters-implementation"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Integers-implementation.html#Integers-implementation">Integers implementation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Identifiers-implementation.html#Identifiers-implementation">Identifiers implementation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Implementation.html#C-Implementation">C Implementation</a>
<hr>
</div>
<h3 class="section">4.4 Characters</h3>
<ul>
<li><cite>The number of bits in a byte (C90 3.4, C99 3.6).</cite>
<p>Determined by ABI.
<li><cite>The values of the members of the execution character set (C90
and C99 5.2.1).</cite>
<p>Determined by ABI.
<li><cite>The unique value of the member of the execution character set produced
for each of the standard alphabetic escape sequences (C90 and C99 5.2.2).</cite>
<p>Determined by ABI.
<li><cite>The value of a </cite><code>char</code><cite> object into which has been stored any
character other than a member of the basic execution character set
(C90 6.1.2.5, C99 6.2.5).</cite>
<p>Determined by ABI.
<li><cite>Which of </cite><code>signed char</code><cite> or </cite><code>unsigned char</code><cite> has the same
range, representation, and behavior as &ldquo;plain&rdquo; </cite><code>char</code><cite> (C90
6.1.2.5, C90 6.2.1.1, C99 6.2.5, C99 6.3.1.1).</cite>
<p><a name="index-fsigned_002dchar-2398"></a><a name="index-funsigned_002dchar-2399"></a>Determined by ABI. The options <samp><span class="option">-funsigned-char</span></samp> and
<samp><span class="option">-fsigned-char</span></samp> change the default. See <a href="C-Dialect-Options.html#C-Dialect-Options">Options Controlling C Dialect</a>.
<li><cite>The mapping of members of the source character set (in character
constants and string literals) to members of the execution character
set (C90 6.1.3.4, C99 6.4.4.4, C90 and C99 5.1.1.2).</cite>
<p>Determined by ABI.
<li><cite>The value of an integer character constant containing more than one
character or containing a character or escape sequence that does not map
to a single-byte execution character (C90 6.1.3.4, C99 6.4.4.4).</cite>
<p>See <a href="../cpp/Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">Implementation-defined behavior</a>.
<li><cite>The value of a wide character constant containing more than one
multibyte character, or containing a multibyte character or escape
sequence not represented in the extended execution character set (C90
6.1.3.4, C99 6.4.4.4).</cite>
<p>See <a href="../cpp/Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">Implementation-defined behavior</a>.
<li><cite>The current locale used to convert a wide character constant consisting
of a single multibyte character that maps to a member of the extended
execution character set into a corresponding wide character code (C90
6.1.3.4, C99 6.4.4.4).</cite>
<p>See <a href="../cpp/Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">Implementation-defined behavior</a>.
<li><cite>The current locale used to convert a wide string literal into
corresponding wide character codes (C90 6.1.4, C99 6.4.5).</cite>
<p>See <a href="../cpp/Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">Implementation-defined behavior</a>.
<li><cite>The value of a string literal containing a multibyte character or escape
sequence not represented in the execution character set (C90 6.1.4, C99 6.4.5).</cite>
<p>See <a href="../cpp/Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">Implementation-defined behavior</a>.
</ul>
</body></html>

View file

@ -0,0 +1,632 @@
<html lang="en">
<head>
<title>Code Gen Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC">
<link rel="prev" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="next" href="Environment-Variables.html#Environment-Variables" title="Environment Variables">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Code-Gen-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Environment-Variables.html#Environment-Variables">Environment Variables</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking-GCC">Invoking GCC</a>
<hr>
</div>
<h3 class="section">3.18 Options for Code Generation Conventions</h3>
<p><a name="index-code-generation-conventions-2328"></a><a name="index-options_002c-code-generation-2329"></a><a name="index-run_002dtime-options-2330"></a>
These machine-independent options control the interface conventions
used in code generation.
<p>Most of them have both positive and negative forms; the negative form
of <samp><span class="option">-ffoo</span></samp> is <samp><span class="option">-fno-foo</span></samp>. In the table below, only
one of the forms is listed&mdash;the one that is not the default. You
can figure out the other form by either removing &lsquo;<samp><span class="samp">no-</span></samp>&rsquo; or adding
it.
<dl>
<dt><code>-fbounds-check</code><dd><a name="index-fbounds_002dcheck-2331"></a>For front ends that support it, generate additional code to check that
indices used to access arrays are within the declared range. This is
currently only supported by the Java and Fortran front ends, where
this option defaults to true and false respectively.
<br><dt><code>-fstack-reuse=</code><var>reuse-level</var><dd><a name="index-fstack_005freuse-2332"></a>This option controls stack space reuse for user declared local/auto variables
and compiler generated temporaries. <var>reuse_level</var> can be &lsquo;<samp><span class="samp">all</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">named_vars</span></samp>&rsquo;, or &lsquo;<samp><span class="samp">none</span></samp>&rsquo;. &lsquo;<samp><span class="samp">all</span></samp>&rsquo; enables stack reuse for all
local variables and temporaries, &lsquo;<samp><span class="samp">named_vars</span></samp>&rsquo; enables the reuse only for
user defined local variables with names, and &lsquo;<samp><span class="samp">none</span></samp>&rsquo; disables stack reuse
completely. The default value is &lsquo;<samp><span class="samp">all</span></samp>&rsquo;. The option is needed when the
program extends the lifetime of a scoped local variable or a compiler generated
temporary beyond the end point defined by the language. When a lifetime of
a variable ends, and if the variable lives in memory, the optimizing compiler
has the freedom to reuse its stack space with other temporaries or scoped
local variables whose live range does not overlap with it. Legacy code extending
local lifetime will likely to break with the stack reuse optimization.
<p>For example,
<pre class="smallexample"> int *p;
{
int local1;
p = &amp;local1;
local1 = 10;
....
}
{
int local2;
local2 = 20;
...
}
if (*p == 10) // out of scope use of local1
{
}
</pre>
<p>Another example:
<pre class="smallexample">
struct A
{
A(int k) : i(k), j(k) { }
int i;
int j;
};
A *ap;
void foo(const A&amp; ar)
{
ap = &amp;ar;
}
void bar()
{
foo(A(10)); // temp object's lifetime ends when foo returns
{
A a(20);
....
}
ap-&gt;i+= 10; // ap references out of scope temp whose space
// is reused with a. What is the value of ap-&gt;i?
}
</pre>
<p>The lifetime of a compiler generated temporary is well defined by the C++
standard. When a lifetime of a temporary ends, and if the temporary lives
in memory, the optimizing compiler has the freedom to reuse its stack
space with other temporaries or scoped local variables whose live range
does not overlap with it. However some of the legacy code relies on
the behavior of older compilers in which temporaries' stack space is
not reused, the aggressive stack reuse can lead to runtime errors. This
option is used to control the temporary stack reuse optimization.
<br><dt><code>-ftrapv</code><dd><a name="index-ftrapv-2333"></a>This option generates traps for signed overflow on addition, subtraction,
multiplication operations.
<br><dt><code>-fwrapv</code><dd><a name="index-fwrapv-2334"></a>This option instructs the compiler to assume that signed arithmetic
overflow of addition, subtraction and multiplication wraps around
using twos-complement representation. This flag enables some optimizations
and disables others. This option is enabled by default for the Java
front end, as required by the Java language specification.
<br><dt><code>-fexceptions</code><dd><a name="index-fexceptions-2335"></a>Enable exception handling. Generates extra code needed to propagate
exceptions. For some targets, this implies GCC generates frame
unwind information for all functions, which can produce significant data
size overhead, although it does not affect execution. If you do not
specify this option, GCC enables it by default for languages like
C++ that normally require exception handling, and disables it for
languages like C that do not normally require it. However, you may need
to enable this option when compiling C code that needs to interoperate
properly with exception handlers written in C++. You may also wish to
disable this option if you are compiling older C++ programs that don't
use exception handling.
<br><dt><code>-fnon-call-exceptions</code><dd><a name="index-fnon_002dcall_002dexceptions-2336"></a>Generate code that allows trapping instructions to throw exceptions.
Note that this requires platform-specific runtime support that does
not exist everywhere. Moreover, it only allows <em>trapping</em>
instructions to throw exceptions, i.e. memory references or floating-point
instructions. It does not allow exceptions to be thrown from
arbitrary signal handlers such as <code>SIGALRM</code>.
<br><dt><code>-fdelete-dead-exceptions</code><dd><a name="index-fdelete_002ddead_002dexceptions-2337"></a>Consider that instructions that may throw exceptions but don't otherwise
contribute to the execution of the program can be optimized away.
This option is enabled by default for the Ada front end, as permitted by
the Ada language specification.
Optimization passes that cause dead exceptions to be removed are enabled independently at different optimization levels.
<br><dt><code>-funwind-tables</code><dd><a name="index-funwind_002dtables-2338"></a>Similar to <samp><span class="option">-fexceptions</span></samp>, except that it just generates any needed
static data, but does not affect the generated code in any other way.
You normally do not need to enable this option; instead, a language processor
that needs this handling enables it on your behalf.
<br><dt><code>-fasynchronous-unwind-tables</code><dd><a name="index-fasynchronous_002dunwind_002dtables-2339"></a>Generate unwind table in DWARF 2 format, if supported by target machine. The
table is exact at each instruction boundary, so it can be used for stack
unwinding from asynchronous events (such as debugger or garbage collector).
<br><dt><code>-fpcc-struct-return</code><dd><a name="index-fpcc_002dstruct_002dreturn-2340"></a>Return &ldquo;short&rdquo; <code>struct</code> and <code>union</code> values in memory like
longer ones, rather than in registers. This convention is less
efficient, but it has the advantage of allowing intercallability between
GCC-compiled files and files compiled with other compilers, particularly
the Portable C Compiler (pcc).
<p>The precise convention for returning structures in memory depends
on the target configuration macros.
<p>Short structures and unions are those whose size and alignment match
that of some integer type.
<p><strong>Warning:</strong> code compiled with the <samp><span class="option">-fpcc-struct-return</span></samp>
switch is not binary compatible with code compiled with the
<samp><span class="option">-freg-struct-return</span></samp> switch.
Use it to conform to a non-default application binary interface.
<br><dt><code>-freg-struct-return</code><dd><a name="index-freg_002dstruct_002dreturn-2341"></a>Return <code>struct</code> and <code>union</code> values in registers when possible.
This is more efficient for small structures than
<samp><span class="option">-fpcc-struct-return</span></samp>.
<p>If you specify neither <samp><span class="option">-fpcc-struct-return</span></samp> nor
<samp><span class="option">-freg-struct-return</span></samp>, GCC defaults to whichever convention is
standard for the target. If there is no standard convention, GCC
defaults to <samp><span class="option">-fpcc-struct-return</span></samp>, except on targets where GCC is
the principal compiler. In those cases, we can choose the standard, and
we chose the more efficient register return alternative.
<p><strong>Warning:</strong> code compiled with the <samp><span class="option">-freg-struct-return</span></samp>
switch is not binary compatible with code compiled with the
<samp><span class="option">-fpcc-struct-return</span></samp> switch.
Use it to conform to a non-default application binary interface.
<br><dt><code>-fshort-enums</code><dd><a name="index-fshort_002denums-2342"></a>Allocate to an <code>enum</code> type only as many bytes as it needs for the
declared range of possible values. Specifically, the <code>enum</code> type
is equivalent to the smallest integer type that has enough room.
<p><strong>Warning:</strong> the <samp><span class="option">-fshort-enums</span></samp> switch causes GCC to generate
code that is not binary compatible with code generated without that switch.
Use it to conform to a non-default application binary interface.
<br><dt><code>-fshort-double</code><dd><a name="index-fshort_002ddouble-2343"></a>Use the same size for <code>double</code> as for <code>float</code>.
<p><strong>Warning:</strong> the <samp><span class="option">-fshort-double</span></samp> switch causes GCC to generate
code that is not binary compatible with code generated without that switch.
Use it to conform to a non-default application binary interface.
<br><dt><code>-fshort-wchar</code><dd><a name="index-fshort_002dwchar-2344"></a>Override the underlying type for &lsquo;<samp><span class="samp">wchar_t</span></samp>&rsquo; to be &lsquo;<samp><span class="samp">short
unsigned int</span></samp>&rsquo; instead of the default for the target. This option is
useful for building programs to run under WINE.
<p><strong>Warning:</strong> the <samp><span class="option">-fshort-wchar</span></samp> switch causes GCC to generate
code that is not binary compatible with code generated without that switch.
Use it to conform to a non-default application binary interface.
<br><dt><code>-fno-common</code><dd><a name="index-fno_002dcommon-2345"></a>In C code, controls the placement of uninitialized global variables.
Unix C compilers have traditionally permitted multiple definitions of
such variables in different compilation units by placing the variables
in a common block.
This is the behavior specified by <samp><span class="option">-fcommon</span></samp>, and is the default
for GCC on most targets.
On the other hand, this behavior is not required by ISO C, and on some
targets may carry a speed or code size penalty on variable references.
The <samp><span class="option">-fno-common</span></samp> option specifies that the compiler should place
uninitialized global variables in the data section of the object file,
rather than generating them as common blocks.
This has the effect that if the same variable is declared
(without <code>extern</code>) in two different compilations,
you get a multiple-definition error when you link them.
In this case, you must compile with <samp><span class="option">-fcommon</span></samp> instead.
Compiling with <samp><span class="option">-fno-common</span></samp> is useful on targets for which
it provides better performance, or if you wish to verify that the
program will work on other systems that always treat uninitialized
variable declarations this way.
<br><dt><code>-fno-ident</code><dd><a name="index-fno_002dident-2346"></a>Ignore the &lsquo;<samp><span class="samp">#ident</span></samp>&rsquo; directive.
<br><dt><code>-finhibit-size-directive</code><dd><a name="index-finhibit_002dsize_002ddirective-2347"></a>Don't output a <code>.size</code> assembler directive, or anything else that
would cause trouble if the function is split in the middle, and the
two halves are placed at locations far apart in memory. This option is
used when compiling <samp><span class="file">crtstuff.c</span></samp>; you should not need to use it
for anything else.
<br><dt><code>-fverbose-asm</code><dd><a name="index-fverbose_002dasm-2348"></a>Put extra commentary information in the generated assembly code to
make it more readable. This option is generally only of use to those
who actually need to read the generated assembly code (perhaps while
debugging the compiler itself).
<p><samp><span class="option">-fno-verbose-asm</span></samp>, the default, causes the
extra information to be omitted and is useful when comparing two assembler
files.
<br><dt><code>-frecord-gcc-switches</code><dd><a name="index-frecord_002dgcc_002dswitches-2349"></a>This switch causes the command line used to invoke the
compiler to be recorded into the object file that is being created.
This switch is only implemented on some targets and the exact format
of the recording is target and binary file format dependent, but it
usually takes the form of a section containing ASCII text. This
switch is related to the <samp><span class="option">-fverbose-asm</span></samp> switch, but that
switch only records information in the assembler output file as
comments, so it never reaches the object file.
See also <samp><span class="option">-grecord-gcc-switches</span></samp> for another
way of storing compiler options into the object file.
<br><dt><code>-fpic</code><dd><a name="index-fpic-2350"></a><a name="index-global-offset-table-2351"></a><a name="index-PIC-2352"></a>Generate position-independent code (PIC) suitable for use in a shared
library, if supported for the target machine. Such code accesses all
constant addresses through a global offset table (GOT). The dynamic
loader resolves the GOT entries when the program starts (the dynamic
loader is not part of GCC; it is part of the operating system). If
the GOT size for the linked executable exceeds a machine-specific
maximum size, you get an error message from the linker indicating that
<samp><span class="option">-fpic</span></samp> does not work; in that case, recompile with <samp><span class="option">-fPIC</span></samp>
instead. (These maximums are 8k on the SPARC and 32k
on the m68k and RS/6000. The 386 has no such limit.)
<p>Position-independent code requires special support, and therefore works
only on certain machines. For the 386, GCC supports PIC for System V
but not for the Sun 386i. Code generated for the IBM RS/6000 is always
position-independent.
<p>When this flag is set, the macros <code>__pic__</code> and <code>__PIC__</code>
are defined to 1.
<br><dt><code>-fPIC</code><dd><a name="index-fPIC-2353"></a>If supported for the target machine, emit position-independent code,
suitable for dynamic linking and avoiding any limit on the size of the
global offset table. This option makes a difference on the m68k,
PowerPC and SPARC.
<p>Position-independent code requires special support, and therefore works
only on certain machines.
<p>When this flag is set, the macros <code>__pic__</code> and <code>__PIC__</code>
are defined to 2.
<br><dt><code>-fpie</code><dt><code>-fPIE</code><dd><a name="index-fpie-2354"></a><a name="index-fPIE-2355"></a>These options are similar to <samp><span class="option">-fpic</span></samp> and <samp><span class="option">-fPIC</span></samp>, but
generated position independent code can be only linked into executables.
Usually these options are used when <samp><span class="option">-pie</span></samp> GCC option is
used during linking.
<p><samp><span class="option">-fpie</span></samp> and <samp><span class="option">-fPIE</span></samp> both define the macros
<code>__pie__</code> and <code>__PIE__</code>. The macros have the value 1
for <samp><span class="option">-fpie</span></samp> and 2 for <samp><span class="option">-fPIE</span></samp>.
<br><dt><code>-fno-jump-tables</code><dd><a name="index-fno_002djump_002dtables-2356"></a>Do not use jump tables for switch statements even where it would be
more efficient than other code generation strategies. This option is
of use in conjunction with <samp><span class="option">-fpic</span></samp> or <samp><span class="option">-fPIC</span></samp> for
building code that forms part of a dynamic linker and cannot
reference the address of a jump table. On some targets, jump tables
do not require a GOT and this option is not needed.
<br><dt><code>-ffixed-</code><var>reg</var><dd><a name="index-ffixed-2357"></a>Treat the register named <var>reg</var> as a fixed register; generated code
should never refer to it (except perhaps as a stack pointer, frame
pointer or in some other fixed role).
<p><var>reg</var> must be the name of a register. The register names accepted
are machine-specific and are defined in the <code>REGISTER_NAMES</code>
macro in the machine description macro file.
<p>This flag does not have a negative form, because it specifies a
three-way choice.
<br><dt><code>-fcall-used-</code><var>reg</var><dd><a name="index-fcall_002dused-2358"></a>Treat the register named <var>reg</var> as an allocable register that is
clobbered by function calls. It may be allocated for temporaries or
variables that do not live across a call. Functions compiled this way
do not save and restore the register <var>reg</var>.
<p>It is an error to use this flag with the frame pointer or stack pointer.
Use of this flag for other registers that have fixed pervasive roles in
the machine's execution model produces disastrous results.
<p>This flag does not have a negative form, because it specifies a
three-way choice.
<br><dt><code>-fcall-saved-</code><var>reg</var><dd><a name="index-fcall_002dsaved-2359"></a>Treat the register named <var>reg</var> as an allocable register saved by
functions. It may be allocated even for temporaries or variables that
live across a call. Functions compiled this way save and restore
the register <var>reg</var> if they use it.
<p>It is an error to use this flag with the frame pointer or stack pointer.
Use of this flag for other registers that have fixed pervasive roles in
the machine's execution model produces disastrous results.
<p>A different sort of disaster results from the use of this flag for
a register in which function values may be returned.
<p>This flag does not have a negative form, because it specifies a
three-way choice.
<br><dt><code>-fpack-struct[=</code><var>n</var><code>]</code><dd><a name="index-fpack_002dstruct-2360"></a>Without a value specified, pack all structure members together without
holes. When a value is specified (which must be a small power of two), pack
structure members according to this value, representing the maximum
alignment (that is, objects with default alignment requirements larger than
this are output potentially unaligned at the next fitting location.
<p><strong>Warning:</strong> the <samp><span class="option">-fpack-struct</span></samp> switch causes GCC to generate
code that is not binary compatible with code generated without that switch.
Additionally, it makes the code suboptimal.
Use it to conform to a non-default application binary interface.
<br><dt><code>-finstrument-functions</code><dd><a name="index-finstrument_002dfunctions-2361"></a>Generate instrumentation calls for entry and exit to functions. Just
after function entry and just before function exit, the following
profiling functions are called with the address of the current
function and its call site. (On some platforms,
<code>__builtin_return_address</code> does not work beyond the current
function, so the call site information may not be available to the
profiling functions otherwise.)
<pre class="smallexample"> void __cyg_profile_func_enter (void *this_fn,
void *call_site);
void __cyg_profile_func_exit (void *this_fn,
void *call_site);
</pre>
<p>The first argument is the address of the start of the current function,
which may be looked up exactly in the symbol table.
<p>This instrumentation is also done for functions expanded inline in other
functions. The profiling calls indicate where, conceptually, the
inline function is entered and exited. This means that addressable
versions of such functions must be available. If all your uses of a
function are expanded inline, this may mean an additional expansion of
code size. If you use &lsquo;<samp><span class="samp">extern inline</span></samp>&rsquo; in your C code, an
addressable version of such functions must be provided. (This is
normally the case anyway, but if you get lucky and the optimizer always
expands the functions inline, you might have gotten away without
providing static copies.)
<p>A function may be given the attribute <code>no_instrument_function</code>, in
which case this instrumentation is not done. This can be used, for
example, for the profiling functions listed above, high-priority
interrupt routines, and any functions from which the profiling functions
cannot safely be called (perhaps signal handlers, if the profiling
routines generate output or allocate memory).
<br><dt><code>-finstrument-functions-exclude-file-list=</code><var>file</var><code>,</code><var>file</var><code>,...</code><dd><a name="index-finstrument_002dfunctions_002dexclude_002dfile_002dlist-2362"></a>
Set the list of functions that are excluded from instrumentation (see
the description of <code>-finstrument-functions</code>). If the file that
contains a function definition matches with one of <var>file</var>, then
that function is not instrumented. The match is done on substrings:
if the <var>file</var> parameter is a substring of the file name, it is
considered to be a match.
<p>For example:
<pre class="smallexample"> -finstrument-functions-exclude-file-list=/bits/stl,include/sys
</pre>
<p class="noindent">excludes any inline function defined in files whose pathnames
contain <code>/bits/stl</code> or <code>include/sys</code>.
<p>If, for some reason, you want to include letter <code>','</code> in one of
<var>sym</var>, write <code>'\,'</code>. For example,
<code>-finstrument-functions-exclude-file-list='\,\,tmp'</code>
(note the single quote surrounding the option).
<br><dt><code>-finstrument-functions-exclude-function-list=</code><var>sym</var><code>,</code><var>sym</var><code>,...</code><dd><a name="index-finstrument_002dfunctions_002dexclude_002dfunction_002dlist-2363"></a>
This is similar to <code>-finstrument-functions-exclude-file-list</code>,
but this option sets the list of function names to be excluded from
instrumentation. The function name to be matched is its user-visible
name, such as <code>vector&lt;int&gt; blah(const vector&lt;int&gt; &amp;)</code>, not the
internal mangled name (e.g., <code>_Z4blahRSt6vectorIiSaIiEE</code>). The
match is done on substrings: if the <var>sym</var> parameter is a substring
of the function name, it is considered to be a match. For C99 and C++
extended identifiers, the function name must be given in UTF-8, not
using universal character names.
<br><dt><code>-fstack-check</code><dd><a name="index-fstack_002dcheck-2364"></a>Generate code to verify that you do not go beyond the boundary of the
stack. You should specify this flag if you are running in an
environment with multiple threads, but you only rarely need to specify it in
a single-threaded environment since stack overflow is automatically
detected on nearly all systems if there is only one stack.
<p>Note that this switch does not actually cause checking to be done; the
operating system or the language runtime must do that. The switch causes
generation of code to ensure that they see the stack being extended.
<p>You can additionally specify a string parameter: <code>no</code> means no
checking, <code>generic</code> means force the use of old-style checking,
<code>specific</code> means use the best checking method and is equivalent
to bare <samp><span class="option">-fstack-check</span></samp>.
<p>Old-style checking is a generic mechanism that requires no specific
target support in the compiler but comes with the following drawbacks:
<ol type=1 start=1>
<li>Modified allocation strategy for large objects: they are always
allocated dynamically if their size exceeds a fixed threshold.
<li>Fixed limit on the size of the static frame of functions: when it is
topped by a particular function, stack checking is not reliable and
a warning is issued by the compiler.
<li>Inefficiency: because of both the modified allocation strategy and the
generic implementation, code performance is hampered.
</ol>
<p>Note that old-style stack checking is also the fallback method for
<code>specific</code> if no target support has been added in the compiler.
<br><dt><code>-fstack-limit-register=</code><var>reg</var><dt><code>-fstack-limit-symbol=</code><var>sym</var><dt><code>-fno-stack-limit</code><dd><a name="index-fstack_002dlimit_002dregister-2365"></a><a name="index-fstack_002dlimit_002dsymbol-2366"></a><a name="index-fno_002dstack_002dlimit-2367"></a>Generate code to ensure that the stack does not grow beyond a certain value,
either the value of a register or the address of a symbol. If a larger
stack is required, a signal is raised at run time. For most targets,
the signal is raised before the stack overruns the boundary, so
it is possible to catch the signal without taking special precautions.
<p>For instance, if the stack starts at absolute address &lsquo;<samp><span class="samp">0x80000000</span></samp>&rsquo;
and grows downwards, you can use the flags
<samp><span class="option">-fstack-limit-symbol=__stack_limit</span></samp> and
<samp><span class="option">-Wl,--defsym,__stack_limit=0x7ffe0000</span></samp> to enforce a stack limit
of 128KB. Note that this may only work with the GNU linker.
<br><dt><code>-fsplit-stack</code><dd><a name="index-fsplit_002dstack-2368"></a>Generate code to automatically split the stack before it overflows.
The resulting program has a discontiguous stack which can only
overflow if the program is unable to allocate any more memory. This
is most useful when running threaded programs, as it is no longer
necessary to calculate a good stack size to use for each thread. This
is currently only implemented for the i386 and x86_64 back ends running
GNU/Linux.
<p>When code compiled with <samp><span class="option">-fsplit-stack</span></samp> calls code compiled
without <samp><span class="option">-fsplit-stack</span></samp>, there may not be much stack space
available for the latter code to run. If compiling all code,
including library code, with <samp><span class="option">-fsplit-stack</span></samp> is not an option,
then the linker can fix up these calls so that the code compiled
without <samp><span class="option">-fsplit-stack</span></samp> always has a large stack. Support for
this is implemented in the gold linker in GNU binutils release 2.21
and later.
<br><dt><code>-fleading-underscore</code><dd><a name="index-fleading_002dunderscore-2369"></a>This option and its counterpart, <samp><span class="option">-fno-leading-underscore</span></samp>, forcibly
change the way C symbols are represented in the object file. One use
is to help link with legacy assembly code.
<p><strong>Warning:</strong> the <samp><span class="option">-fleading-underscore</span></samp> switch causes GCC to
generate code that is not binary compatible with code generated without that
switch. Use it to conform to a non-default application binary interface.
Not all targets provide complete support for this switch.
<br><dt><code>-ftls-model=</code><var>model</var><dd><a name="index-ftls_002dmodel-2370"></a>Alter the thread-local storage model to be used (see <a href="Thread_002dLocal.html#Thread_002dLocal">Thread-Local</a>).
The <var>model</var> argument should be one of <code>global-dynamic</code>,
<code>local-dynamic</code>, <code>initial-exec</code> or <code>local-exec</code>.
<p>The default without <samp><span class="option">-fpic</span></samp> is <code>initial-exec</code>; with
<samp><span class="option">-fpic</span></samp> the default is <code>global-dynamic</code>.
<br><dt><code>-fvisibility=</code><var>default|internal|hidden|protected</var><dd><a name="index-fvisibility-2371"></a>Set the default ELF image symbol visibility to the specified option&mdash;all
symbols are marked with this unless overridden within the code.
Using this feature can very substantially improve linking and
load times of shared object libraries, produce more optimized
code, provide near-perfect API export and prevent symbol clashes.
It is <strong>strongly</strong> recommended that you use this in any shared objects
you distribute.
<p>Despite the nomenclature, <code>default</code> always means public; i.e.,
available to be linked against from outside the shared object.
<code>protected</code> and <code>internal</code> are pretty useless in real-world
usage so the only other commonly used option is <code>hidden</code>.
The default if <samp><span class="option">-fvisibility</span></samp> isn't specified is
<code>default</code>, i.e., make every
symbol public&mdash;this causes the same behavior as previous versions of
GCC.
<p>A good explanation of the benefits offered by ensuring ELF
symbols have the correct visibility is given by &ldquo;How To Write
Shared Libraries&rdquo; by Ulrich Drepper (which can be found at
<a href="http://people.redhat.com/~drepper/">http://people.redhat.com/~drepper/</a><!-- /@w -->)&mdash;however a superior
solution made possible by this option to marking things hidden when
the default is public is to make the default hidden and mark things
public. This is the norm with DLLs on Windows and with <samp><span class="option">-fvisibility=hidden</span></samp>
and <code>__attribute__ ((visibility("default")))</code> instead of
<code>__declspec(dllexport)</code> you get almost identical semantics with
identical syntax. This is a great boon to those working with
cross-platform projects.
<p>For those adding visibility support to existing code, you may find
&lsquo;<samp><span class="samp">#pragma GCC visibility</span></samp>&rsquo; of use. This works by you enclosing
the declarations you wish to set visibility for with (for example)
&lsquo;<samp><span class="samp">#pragma GCC visibility push(hidden)</span></samp>&rsquo; and
&lsquo;<samp><span class="samp">#pragma GCC visibility pop</span></samp>&rsquo;.
Bear in mind that symbol visibility should be viewed <strong>as
part of the API interface contract</strong> and thus all new code should
always specify visibility when it is not the default; i.e., declarations
only for use within the local DSO should <strong>always</strong> be marked explicitly
as hidden as so to avoid PLT indirection overheads&mdash;making this
abundantly clear also aids readability and self-documentation of the code.
Note that due to ISO C++ specification requirements, <code>operator new</code> and
<code>operator delete</code> must always be of default visibility.
<p>Be aware that headers from outside your project, in particular system
headers and headers from any other library you use, may not be
expecting to be compiled with visibility other than the default. You
may need to explicitly say &lsquo;<samp><span class="samp">#pragma GCC visibility push(default)</span></samp>&rsquo;
before including any such headers.
<p>&lsquo;<samp><span class="samp">extern</span></samp>&rsquo; declarations are not affected by <samp><span class="option">-fvisibility</span></samp>, so
a lot of code can be recompiled with <samp><span class="option">-fvisibility=hidden</span></samp> with
no modifications. However, this means that calls to <code>extern</code>
functions with no explicit visibility use the PLT, so it is more
effective to use <code>__attribute ((visibility))</code> and/or
<code>#pragma GCC visibility</code> to tell the compiler which <code>extern</code>
declarations should be treated as hidden.
<p>Note that <samp><span class="option">-fvisibility</span></samp> does affect C++ vague linkage
entities. This means that, for instance, an exception class that is
be thrown between DSOs must be explicitly marked with default
visibility so that the &lsquo;<samp><span class="samp">type_info</span></samp>&rsquo; nodes are unified between
the DSOs.
<p>An overview of these techniques, their benefits and how to use them
is at <a href="http://gcc.gnu.org/wiki/Visibility">http://gcc.gnu.org/wiki/Visibility</a>.
<br><dt><code>-fstrict-volatile-bitfields</code><dd><a name="index-fstrict_002dvolatile_002dbitfields-2372"></a>This option should be used if accesses to volatile bit-fields (or other
structure fields, although the compiler usually honors those types
anyway) should use a single access of the width of the
field's type, aligned to a natural alignment if possible. For
example, targets with memory-mapped peripheral registers might require
all such accesses to be 16 bits wide; with this flag you can
declare all peripheral bit-fields as <code>unsigned short</code> (assuming short
is 16 bits on these targets) to force GCC to use 16-bit accesses
instead of, perhaps, a more efficient 32-bit access.
<p>If this option is disabled, the compiler uses the most efficient
instruction. In the previous example, that might be a 32-bit load
instruction, even though that accesses bytes that do not contain
any portion of the bit-field, or memory-mapped registers unrelated to
the one being updated.
<p>In some cases, such as when the <code>packed</code> attribute is applied to a
structure field, it may not be possible to access the field with a single
read or write that is correctly aligned for the target machine. In this
case GCC falls back to generating multiple accesses rather than code that
will fault or truncate the result at run time.
<p>The default value of this option is determined by the application binary
interface for the target processor.
<br><dt><code>-fsync-libcalls</code><dd><a name="index-fsync_002dlibcalls-2373"></a>This option controls whether any out-of-line instance of the <code>__sync</code>
family of functions may be used to implement the C++11 <code>__atomic</code>
family of functions.
<p>The default value of this option is enabled, thus the only useful form
of the option is <samp><span class="option">-fno-sync-libcalls</span></samp>. This option is used in
the implementation of the <samp><span class="file">libatomic</span></samp> runtime library.
</dl>
<!-- man end -->
</body></html>

View file

@ -0,0 +1,188 @@
<html lang="en">
<head>
<title>Compatibility - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Objective_002dC.html#Objective_002dC" title="Objective-C">
<link rel="next" href="Gcov.html#Gcov" title="Gcov">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Compatibility"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Gcov.html#Gcov">Gcov</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Objective_002dC.html#Objective_002dC">Objective-C</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">9 Binary Compatibility</h2>
<p><a name="index-binary-compatibility-3536"></a><a name="index-ABI-3537"></a><a name="index-application-binary-interface-3538"></a>
Binary compatibility encompasses several related concepts:
<dl>
<dt><dfn>application binary interface (ABI)</dfn><dd>The set of runtime conventions followed by all of the tools that deal
with binary representations of a program, including compilers, assemblers,
linkers, and language runtime support.
Some ABIs are formal with a written specification, possibly designed
by multiple interested parties. Others are simply the way things are
actually done by a particular set of tools.
<br><dt><dfn>ABI conformance</dfn><dd>A compiler conforms to an ABI if it generates code that follows all of
the specifications enumerated by that ABI.
A library conforms to an ABI if it is implemented according to that ABI.
An application conforms to an ABI if it is built using tools that conform
to that ABI and does not contain source code that specifically changes
behavior specified by the ABI.
<br><dt><dfn>calling conventions</dfn><dd>Calling conventions are a subset of an ABI that specify of how arguments
are passed and function results are returned.
<br><dt><dfn>interoperability</dfn><dd>Different sets of tools are interoperable if they generate files that
can be used in the same program. The set of tools includes compilers,
assemblers, linkers, libraries, header files, startup files, and debuggers.
Binaries produced by different sets of tools are not interoperable unless
they implement the same ABI. This applies to different versions of the
same tools as well as tools from different vendors.
<br><dt><dfn>intercallability</dfn><dd>Whether a function in a binary built by one set of tools can call a
function in a binary built by a different set of tools is a subset
of interoperability.
<br><dt><dfn>implementation-defined features</dfn><dd>Language standards include lists of implementation-defined features whose
behavior can vary from one implementation to another. Some of these
features are normally covered by a platform's ABI and others are not.
The features that are not covered by an ABI generally affect how a
program behaves, but not intercallability.
<br><dt><dfn>compatibility</dfn><dd>Conformance to the same ABI and the same behavior of implementation-defined
features are both relevant for compatibility.
</dl>
<p>The application binary interface implemented by a C or C++ compiler
affects code generation and runtime support for:
<ul>
<li>size and alignment of data types
<li>layout of structured types
<li>calling conventions
<li>register usage conventions
<li>interfaces for runtime arithmetic support
<li>object file formats
</ul>
<p>In addition, the application binary interface implemented by a C++ compiler
affects code generation and runtime support for:
<ul>
<li>name mangling
<li>exception handling
<li>invoking constructors and destructors
<li>layout, alignment, and padding of classes
<li>layout and alignment of virtual tables
</ul>
<p>Some GCC compilation options cause the compiler to generate code that
does not conform to the platform's default ABI. Other options cause
different program behavior for implementation-defined features that are
not covered by an ABI. These options are provided for consistency with
other compilers that do not follow the platform's default ABI or the
usual behavior of implementation-defined features for the platform.
Be very careful about using such options.
<p>Most platforms have a well-defined ABI that covers C code, but ABIs
that cover C++ functionality are not yet common.
<p>Starting with GCC 3.2, GCC binary conventions for C++ are based on a
written, vendor-neutral C++ ABI that was designed to be specific to
64-bit Itanium but also includes generic specifications that apply to
any platform.
This C++ ABI is also implemented by other compiler vendors on some
platforms, notably GNU/Linux and BSD systems.
We have tried hard to provide a stable ABI that will be compatible with
future GCC releases, but it is possible that we will encounter problems
that make this difficult. Such problems could include different
interpretations of the C++ ABI by different vendors, bugs in the ABI, or
bugs in the implementation of the ABI in different compilers.
GCC's <samp><span class="option">-Wabi</span></samp> switch warns when G++ generates code that is
probably not compatible with the C++ ABI.
<p>The C++ library used with a C++ compiler includes the Standard C++
Library, with functionality defined in the C++ Standard, plus language
runtime support. The runtime support is included in a C++ ABI, but there
is no formal ABI for the Standard C++ Library. Two implementations
of that library are interoperable if one follows the de-facto ABI of the
other and if they are both built with the same compiler, or with compilers
that conform to the same ABI for C++ compiler and runtime support.
<p>When G++ and another C++ compiler conform to the same C++ ABI, but the
implementations of the Standard C++ Library that they normally use do not
follow the same ABI for the Standard C++ Library, object files built with
those compilers can be used in the same program only if they use the same
C++ library. This requires specifying the location of the C++ library
header files when invoking the compiler whose usual library is not being
used. The location of GCC's C++ header files depends on how the GCC
build was configured, but can be seen by using the G++ <samp><span class="option">-v</span></samp> option.
With default configuration options for G++ 3.3 the compile line for a
different C++ compiler needs to include
<pre class="smallexample"> -I<var>gcc_install_directory</var>/include/c++/3.3
</pre>
<p>Similarly, compiling code with G++ that must use a C++ library other
than the GNU C++ library requires specifying the location of the header
files for that other library.
<p>The most straightforward way to link a program to use a particular
C++ library is to use a C++ driver that specifies that C++ library by
default. The <samp><span class="command">g++</span></samp> driver, for example, tells the linker where
to find GCC's C++ library (<samp><span class="file">libstdc++</span></samp>) plus the other libraries
and startup files it needs, in the proper order.
<p>If a program must use a different C++ library and it's not possible
to do the final link using a C++ driver that uses that library by default,
it is necessary to tell <samp><span class="command">g++</span></samp> the location and name of that
library. It might also be necessary to specify different startup files
and other runtime support libraries, and to suppress the use of GCC's
support libraries with one or more of the options <samp><span class="option">-nostdlib</span></samp>,
<samp><span class="option">-nostartfiles</span></samp>, and <samp><span class="option">-nodefaultlibs</span></samp>.
<!-- Copyright (C) 1996-2013 Free Software Foundation, Inc. -->
<!-- This is part of the GCC manual. -->
<!-- For copying conditions, see the file gcc.texi. -->
</body></html>

View file

@ -0,0 +1,106 @@
<html lang="en">
<head>
<title>Complex - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Long-Long.html#Long-Long" title="Long Long">
<link rel="next" href="Floating-Types.html#Floating-Types" title="Floating Types">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Complex"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Floating-Types.html#Floating-Types">Floating Types</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Long-Long.html#Long-Long">Long Long</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.10 Complex Numbers</h3>
<p><a name="index-complex-numbers-2448"></a><a name="index-g_t_0040code_007b_005fComplex_007d-keyword-2449"></a><a name="index-g_t_0040code_007b_005f_005fcomplex_005f_005f_007d-keyword-2450"></a>
ISO C99 supports complex floating data types, and as an extension GCC
supports them in C90 mode and in C++. GCC also supports complex integer data
types which are not part of ISO C99. You can declare complex types
using the keyword <code>_Complex</code>. As an extension, the older GNU
keyword <code>__complex__</code> is also supported.
<p>For example, &lsquo;<samp><span class="samp">_Complex double x;</span></samp>&rsquo; declares <code>x</code> as a
variable whose real part and imaginary part are both of type
<code>double</code>. &lsquo;<samp><span class="samp">_Complex short int y;</span></samp>&rsquo; declares <code>y</code> to
have real and imaginary parts of type <code>short int</code>; this is not
likely to be useful, but it shows that the set of complex types is
complete.
<p>To write a constant with a complex data type, use the suffix &lsquo;<samp><span class="samp">i</span></samp>&rsquo; or
&lsquo;<samp><span class="samp">j</span></samp>&rsquo; (either one; they are equivalent). For example, <code>2.5fi</code>
has type <code>_Complex float</code> and <code>3i</code> has type
<code>_Complex int</code>. Such a constant always has a pure imaginary
value, but you can form any complex value you like by adding one to a
real constant. This is a GNU extension; if you have an ISO C99
conforming C library (such as the GNU C Library), and want to construct complex
constants of floating type, you should include <code>&lt;complex.h&gt;</code> and
use the macros <code>I</code> or <code>_Complex_I</code> instead.
<p><a name="index-g_t_0040code_007b_005f_005freal_005f_005f_007d-keyword-2451"></a><a name="index-g_t_0040code_007b_005f_005fimag_005f_005f_007d-keyword-2452"></a>To extract the real part of a complex-valued expression <var>exp</var>, write
<code>__real__ </code><var>exp</var>. Likewise, use <code>__imag__</code> to
extract the imaginary part. This is a GNU extension; for values of
floating type, you should use the ISO C99 functions <code>crealf</code>,
<code>creal</code>, <code>creall</code>, <code>cimagf</code>, <code>cimag</code> and
<code>cimagl</code>, declared in <code>&lt;complex.h&gt;</code> and also provided as
built-in functions by GCC.
<p><a name="index-complex-conjugation-2453"></a>The operator &lsquo;<samp><span class="samp">~</span></samp>&rsquo; performs complex conjugation when used on a value
with a complex type. This is a GNU extension; for values of
floating type, you should use the ISO C99 functions <code>conjf</code>,
<code>conj</code> and <code>conjl</code>, declared in <code>&lt;complex.h&gt;</code> and also
provided as built-in functions by GCC.
<p>GCC can allocate complex automatic variables in a noncontiguous
fashion; it's even possible for the real part to be in a register while
the imaginary part is on the stack (or vice versa). Only the DWARF 2
debug info format can represent this, so use of DWARF 2 is recommended.
If you are using the stabs debug info format, GCC describes a noncontiguous
complex variable as if it were two separate variables of noncomplex type.
If the variable's actual name is <code>foo</code>, the two fictitious
variables are named <code>foo$real</code> and <code>foo$imag</code>. You can
examine and set these two fictitious variables with your debugger.
</body></html>

View file

@ -0,0 +1,133 @@
<html lang="en">
<head>
<title>Compound Literals - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Initializers.html#Initializers" title="Initializers">
<link rel="next" href="Designated-Inits.html#Designated-Inits" title="Designated Inits">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Compound-Literals"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Designated-Inits.html#Designated-Inits">Designated Inits</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Initializers.html#Initializers">Initializers</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.25 Compound Literals</h3>
<p><a name="index-constructor-expressions-2551"></a><a name="index-initializations-in-expressions-2552"></a><a name="index-structures_002c-constructor-expression-2553"></a><a name="index-expressions_002c-constructor-2554"></a><a name="index-compound-literals-2555"></a><!-- The GNU C name for what C99 calls compound literals was "constructor expressions". -->
<p>ISO C99 supports compound literals. A compound literal looks like
a cast containing an initializer. Its value is an object of the
type specified in the cast, containing the elements specified in
the initializer; it is an lvalue. As an extension, GCC supports
compound literals in C90 mode and in C++, though the semantics are
somewhat different in C++.
<p>Usually, the specified type is a structure. Assume that
<code>struct foo</code> and <code>structure</code> are declared as shown:
<pre class="smallexample"> struct foo {int a; char b[2];} structure;
</pre>
<p class="noindent">Here is an example of constructing a <code>struct foo</code> with a compound literal:
<pre class="smallexample"> structure = ((struct foo) {x + y, 'a', 0});
</pre>
<p class="noindent">This is equivalent to writing the following:
<pre class="smallexample"> {
struct foo temp = {x + y, 'a', 0};
structure = temp;
}
</pre>
<p>You can also construct an array, though this is dangerous in C++, as
explained below. If all the elements of the compound literal are
(made up of) simple constant expressions, suitable for use in
initializers of objects of static storage duration, then the compound
literal can be coerced to a pointer to its first element and used in
such an initializer, as shown here:
<pre class="smallexample"> char **foo = (char *[]) { "x", "y", "z" };
</pre>
<p>Compound literals for scalar types and union types are
also allowed, but then the compound literal is equivalent
to a cast.
<p>As a GNU extension, GCC allows initialization of objects with static storage
duration by compound literals (which is not possible in ISO C99, because
the initializer is not a constant).
It is handled as if the object is initialized only with the bracket
enclosed list if the types of the compound literal and the object match.
The initializer list of the compound literal must be constant.
If the object being initialized has array type of unknown size, the size is
determined by compound literal size.
<pre class="smallexample"> static struct foo x = (struct foo) {1, 'a', 'b'};
static int y[] = (int []) {1, 2, 3};
static int z[] = (int [3]) {1};
</pre>
<p class="noindent">The above lines are equivalent to the following:
<pre class="smallexample"> static struct foo x = {1, 'a', 'b'};
static int y[] = {1, 2, 3};
static int z[] = {1, 0, 0};
</pre>
<p>In C, a compound literal designates an unnamed object with static or
automatic storage duration. In C++, a compound literal designates a
temporary object, which only lives until the end of its
full-expression. As a result, well-defined C code that takes the
address of a subobject of a compound literal can be undefined in C++.
For instance, if the array compound literal example above appeared
inside a function, any subsequent use of &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; in C++ has
undefined behavior because the lifetime of the array ends after the
declaration of &lsquo;<samp><span class="samp">foo</span></samp>&rsquo;. As a result, the C++ compiler now rejects
the conversion of a temporary array to a pointer.
<p>As an optimization, the C++ compiler sometimes gives array compound
literals longer lifetimes: when the array either appears outside a
function or has const-qualified type. If &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; and its
initializer had elements of &lsquo;<samp><span class="samp">char *const</span></samp>&rsquo; type rather than
&lsquo;<samp><span class="samp">char *</span></samp>&rsquo;, or if &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; were a global variable, the array
would have static storage duration. But it is probably safest just to
avoid the use of array compound literals in code compiled as C++.
</body></html>

View file

@ -0,0 +1,69 @@
<html lang="en">
<head>
<title>Conditionally-supported behavior - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002b_002b-Implementation.html#C_002b_002b-Implementation" title="C++ Implementation">
<link rel="next" href="Exception-handling.html#Exception-handling" title="Exception handling">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Conditionally-supported-behavior"></a>
<a name="Conditionally_002dsupported-behavior"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Exception-handling.html#Exception-handling">Exception handling</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002b_002b-Implementation.html#C_002b_002b-Implementation">C++ Implementation</a>
<hr>
</div>
<h3 class="section">5.1 Conditionally-supported behavior</h3>
<p><cite>Each implementation shall include documentation that identifies
all conditionally-supported constructs that it does not support (C++0x
1.4).</cite>
<ul>
<li><cite>Whether an argument of class type with a non-trivial copy
constructor or destructor can be passed to ... (C++0x 5.2.2).</cite>
<p>Such argument passing is not supported.
</ul>
</body></html>

View file

@ -0,0 +1,81 @@
<html lang="en">
<head>
<title>Conditionals - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Typeof.html#Typeof" title="Typeof">
<link rel="next" href="_005f_005fint128.html#g_t_005f_005fint128" title="__int128">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Conditionals"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="_005f_005fint128.html#g_t_005f_005fint128">__int128</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Typeof.html#Typeof">Typeof</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.7 Conditionals with Omitted Operands</h3>
<p><a name="index-conditional-expressions_002c-extensions-2435"></a><a name="index-omitted-middle_002doperands-2436"></a><a name="index-middle_002doperands_002c-omitted-2437"></a><a name="index-extensions_002c-_0040code_007b_003f_003a_007d-2438"></a><a name="index-g_t_0040code_007b_003f_003a_007d-extensions-2439"></a>
The middle operand in a conditional expression may be omitted. Then
if the first operand is nonzero, its value is the value of the conditional
expression.
<p>Therefore, the expression
<pre class="smallexample"> x ? : y
</pre>
<p class="noindent">has the value of <code>x</code> if that is nonzero; otherwise, the value of
<code>y</code>.
<p>This example is perfectly equivalent to
<pre class="smallexample"> x ? x : y
</pre>
<p><a name="index-side-effect-in-_0040code_007b_003f_003a_007d-2440"></a><a name="index-g_t_0040code_007b_003f_003a_007d-side-effect-2441"></a>In this simple case, the ability to omit the middle operand is not
especially useful. When it becomes useful is when the first operand does,
or may (if it is a macro argument), contain a side effect. Then repeating
the operand in the middle would perform the side effect twice. Omitting
the middle operand uses the value already computed without the undesirable
effects of recomputing it.
</body></html>

View file

@ -0,0 +1,112 @@
<html lang="en">
<head>
<title>Constant string objects - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Objective_002dC.html#Objective_002dC" title="Objective-C">
<link rel="prev" href="Garbage-Collection.html#Garbage-Collection" title="Garbage Collection">
<link rel="next" href="compatibility_005falias.html#compatibility_005falias" title="compatibility_alias">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Constant-string-objects"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="compatibility_005falias.html#compatibility_005falias">compatibility_alias</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Garbage-Collection.html#Garbage-Collection">Garbage Collection</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Objective_002dC.html#Objective_002dC">Objective-C</a>
<hr>
</div>
<h3 class="section">8.5 Constant string objects</h3>
<p>GNU Objective-C provides constant string objects that are generated
directly by the compiler. You declare a constant string object by
prefixing a C constant string with the character &lsquo;<samp><span class="samp">@</span></samp>&rsquo;:
<pre class="smallexample"> id myString = @"this is a constant string object";
</pre>
<p>The constant string objects are by default instances of the
<code>NXConstantString</code> class which is provided by the GNU Objective-C
runtime. To get the definition of this class you must include the
<samp><span class="file">objc/NXConstStr.h</span></samp> header file.
<p>User defined libraries may want to implement their own constant string
class. To be able to support them, the GNU Objective-C compiler provides
a new command line options <samp><span class="option">-fconstant-string-class=</span><var>class-name</var></samp>.
The provided class should adhere to a strict structure, the same
as <code>NXConstantString</code>'s structure:
<pre class="smallexample">
@interface MyConstantStringClass
{
Class isa;
char *c_string;
unsigned int len;
}
@end
</pre>
<p><code>NXConstantString</code> inherits from <code>Object</code>; user class
libraries may choose to inherit the customized constant string class
from a different class than <code>Object</code>. There is no requirement in
the methods the constant string class has to implement, but the final
ivar layout of the class must be the compatible with the given
structure.
<p>When the compiler creates the statically allocated constant string
object, the <code>c_string</code> field will be filled by the compiler with
the string; the <code>length</code> field will be filled by the compiler with
the string length; the <code>isa</code> pointer will be filled with
<code>NULL</code> by the compiler, and it will later be fixed up automatically
at runtime by the GNU Objective-C runtime library to point to the class
which was set by the <samp><span class="option">-fconstant-string-class</span></samp> option when the
object file is loaded (if you wonder how it works behind the scenes, the
name of the class to use, and the list of static objects to fixup, are
stored by the compiler in the object file in a place where the GNU
runtime library will find them at runtime).
<p>As a result, when a file is compiled with the
<samp><span class="option">-fconstant-string-class</span></samp> option, all the constant string objects
will be instances of the class specified as argument to this option. It
is possible to have multiple compilation units referring to different
constant string classes, neither the compiler nor the linker impose any
restrictions in doing this.
<!-- ========================================================================= -->
</body></html>

View file

@ -0,0 +1,78 @@
<html lang="en">
<head>
<title>Constraints - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Extended-Asm.html#Extended-Asm" title="Extended Asm">
<link rel="next" href="Asm-Labels.html#Asm-Labels" title="Asm Labels">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Constraints"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Asm-Labels.html#Asm-Labels">Asm Labels</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Extended-Asm.html#Extended-Asm">Extended Asm</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.42 Constraints for <code>asm</code> Operands</h3>
<p><a name="index-operand-constraints_002c-_0040code_007basm_007d-2815"></a><a name="index-constraints_002c-_0040code_007basm_007d-2816"></a><a name="index-g_t_0040code_007basm_007d-constraints-2817"></a>
Here are specific details on what constraint letters you can use with
<code>asm</code> operands.
Constraints can say whether
an operand may be in a register, and which kinds of register; whether the
operand can be a memory reference, and which kinds of address; whether the
operand may be an immediate constant, and which possible values it may
have. Constraints can also require two operands to match.
Side-effects aren't allowed in operands of inline <code>asm</code>, unless
&lsquo;<samp><span class="samp">&lt;</span></samp>&rsquo; or &lsquo;<samp><span class="samp">&gt;</span></samp>&rsquo; constraints are used, because there is no guarantee
that the side-effects will happen exactly once in an instruction that can update
the addressing register.
<ul class="menu">
<li><a accesskey="1" href="Simple-Constraints.html#Simple-Constraints">Simple Constraints</a>: Basic use of constraints.
<li><a accesskey="2" href="Multi_002dAlternative.html#Multi_002dAlternative">Multi-Alternative</a>: When an insn has two alternative constraint-patterns.
<li><a accesskey="3" href="Modifiers.html#Modifiers">Modifiers</a>: More precise control over effects of constraints.
<li><a accesskey="4" href="Machine-Constraints.html#Machine-Constraints">Machine Constraints</a>: Special constraints for some particular machines.
</ul>
</body></html>

View file

@ -0,0 +1,174 @@
<html lang="en">
<head>
<title>Constructing Calls - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Nested-Functions.html#Nested-Functions" title="Nested Functions">
<link rel="next" href="Typeof.html#Typeof" title="Typeof">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Constructing-Calls"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Typeof.html#Typeof">Typeof</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Nested-Functions.html#Nested-Functions">Nested Functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.5 Constructing Function Calls</h3>
<p><a name="index-constructing-calls-2420"></a><a name="index-forwarding-calls-2421"></a>
Using the built-in functions described below, you can record
the arguments a function received, and call another function
with the same arguments, without knowing the number or types
of the arguments.
<p>You can also record the return value of that function call,
and later return that value, without knowing what data type
the function tried to return (as long as your caller expects
that data type).
<p>However, these built-in functions may interact badly with some
sophisticated features or other extensions of the language. It
is, therefore, not recommended to use them outside very simple
functions acting as mere forwarders for their arguments.
<div class="defun">
&mdash; Built-in Function: void * <b>__builtin_apply_args</b> ()<var><a name="index-g_t_005f_005fbuiltin_005fapply_005fargs-2422"></a></var><br>
<blockquote><p>This built-in function returns a pointer to data
describing how to perform a call with the same arguments as are passed
to the current function.
<p>The function saves the arg pointer register, structure value address,
and all registers that might be used to pass arguments to a function
into a block of memory allocated on the stack. Then it returns the
address of that block.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void * <b>__builtin_apply</b> (<var>void </var>(<var>*function</var>)()<var>, void *arguments, size_t size</var>)<var><a name="index-g_t_005f_005fbuiltin_005fapply-2423"></a></var><br>
<blockquote><p>This built-in function invokes <var>function</var>
with a copy of the parameters described by <var>arguments</var>
and <var>size</var>.
<p>The value of <var>arguments</var> should be the value returned by
<code>__builtin_apply_args</code>. The argument <var>size</var> specifies the size
of the stack argument data, in bytes.
<p>This function returns a pointer to data describing
how to return whatever value is returned by <var>function</var>. The data
is saved in a block of memory allocated on the stack.
<p>It is not always simple to compute the proper value for <var>size</var>. The
value is used by <code>__builtin_apply</code> to compute the amount of data
that should be pushed on the stack and copied from the incoming argument
area.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: void <b>__builtin_return</b> (<var>void *result</var>)<var><a name="index-g_t_005f_005fbuiltin_005freturn-2424"></a></var><br>
<blockquote><p>This built-in function returns the value described by <var>result</var> from
the containing function. You should specify, for <var>result</var>, a value
returned by <code>__builtin_apply</code>.
</p></blockquote></div>
<div class="defun">
&mdash; Built-in Function: <b>__builtin_va_arg_pack</b> ()<var><a name="index-g_t_005f_005fbuiltin_005fva_005farg_005fpack-2425"></a></var><br>
<blockquote><p>This built-in function represents all anonymous arguments of an inline
function. It can be used only in inline functions that are always
inlined, never compiled as a separate function, such as those using
<code>__attribute__ ((__always_inline__))</code> or
<code>__attribute__ ((__gnu_inline__))</code> extern inline functions.
It must be only passed as last argument to some other function
with variable arguments. This is useful for writing small wrapper
inlines for variable argument functions, when using preprocessor
macros is undesirable. For example:
<pre class="smallexample"> extern int myprintf (FILE *f, const char *format, ...);
extern inline __attribute__ ((__gnu_inline__)) int
myprintf (FILE *f, const char *format, ...)
{
int r = fprintf (f, "myprintf: ");
if (r &lt; 0)
return r;
int s = fprintf (f, format, __builtin_va_arg_pack ());
if (s &lt; 0)
return s;
return r + s;
}
</pre>
</blockquote></div>
<div class="defun">
&mdash; Built-in Function: size_t <b>__builtin_va_arg_pack_len</b> ()<var><a name="index-g_t_005f_005fbuiltin_005fva_005farg_005fpack_005flen-2426"></a></var><br>
<blockquote><p>This built-in function returns the number of anonymous arguments of
an inline function. It can be used only in inline functions that
are always inlined, never compiled as a separate function, such
as those using <code>__attribute__ ((__always_inline__))</code> or
<code>__attribute__ ((__gnu_inline__))</code> extern inline functions.
For example following does link- or run-time checking of open
arguments for optimized code:
<pre class="smallexample"> #ifdef __OPTIMIZE__
extern inline __attribute__((__gnu_inline__)) int
myopen (const char *path, int oflag, ...)
{
if (__builtin_va_arg_pack_len () &gt; 1)
warn_open_too_many_arguments ();
if (__builtin_constant_p (oflag))
{
if ((oflag &amp; O_CREAT) != 0 &amp;&amp; __builtin_va_arg_pack_len () &lt; 1)
{
warn_open_missing_mode ();
return __open_2 (path, oflag);
}
return open (path, oflag, __builtin_va_arg_pack ());
}
if (__builtin_va_arg_pack_len () &lt; 1)
return __open_2 (path, oflag);
return open (path, oflag, __builtin_va_arg_pack ());
}
#endif
</pre>
</blockquote></div>
</body></html>

View file

@ -0,0 +1,72 @@
<html lang="en">
<head>
<title>Contributing - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Service.html#Service" title="Service">
<link rel="next" href="Funding.html#Funding" title="Funding">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Contributing"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Funding.html#Funding">Funding</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Service.html#Service">Service</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">14 Contributing to GCC Development</h2>
<p>If you would like to help pretest GCC releases to assure they work well,
current development sources are available by SVN (see
<a href="http://gcc.gnu.org/svn.html">http://gcc.gnu.org/svn.html</a>). Source and binary snapshots are
also available for FTP; see <a href="http://gcc.gnu.org/snapshots.html">http://gcc.gnu.org/snapshots.html</a>.
<p>If you would like to work on improvements to GCC, please read the
advice at these URLs:
<pre class="smallexample"> <a href="http://gcc.gnu.org/contribute.html">http://gcc.gnu.org/contribute.html</a>
<a href="http://gcc.gnu.org/contributewhy.html">http://gcc.gnu.org/contributewhy.html</a>
</pre>
<p class="noindent">for information on how to make useful contributions and avoid
duplication of effort. Suggested projects are listed at
<a href="http://gcc.gnu.org/projects/">http://gcc.gnu.org/projects/</a>.
</body></html>

View file

@ -0,0 +1,106 @@
<html lang="en">
<head>
<title>Copy Assignment - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002b_002b-Misunderstandings.html#C_002b_002b-Misunderstandings" title="C++ Misunderstandings">
<link rel="prev" href="Temporaries.html#Temporaries" title="Temporaries">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Copy-Assignment"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Temporaries.html#Temporaries">Temporaries</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002b_002b-Misunderstandings.html#C_002b_002b-Misunderstandings">C++ Misunderstandings</a>
<hr>
</div>
<h4 class="subsection">11.7.4 Implicit Copy-Assignment for Virtual Bases</h4>
<p>When a base class is virtual, only one subobject of the base class
belongs to each full object. Also, the constructors and destructors are
invoked only once, and called from the most-derived class. However, such
objects behave unspecified when being assigned. For example:
<pre class="smallexample"> struct Base{
char *name;
Base(char *n) : name(strdup(n)){}
Base&amp; operator= (const Base&amp; other){
free (name);
name = strdup (other.name);
}
};
struct A:virtual Base{
int val;
A():Base("A"){}
};
struct B:virtual Base{
int bval;
B():Base("B"){}
};
struct Derived:public A, public B{
Derived():Base("Derived"){}
};
void func(Derived &amp;d1, Derived &amp;d2)
{
d1 = d2;
}
</pre>
<p>The C++ standard specifies that &lsquo;<samp><span class="samp">Base::Base</span></samp>&rsquo; is only called once
when constructing or copy-constructing a Derived object. It is
unspecified whether &lsquo;<samp><span class="samp">Base::operator=</span></samp>&rsquo; is called more than once when
the implicit copy-assignment for Derived objects is invoked (as it is
inside &lsquo;<samp><span class="samp">func</span></samp>&rsquo; in the example).
<p>G++ implements the &ldquo;intuitive&rdquo; algorithm for copy-assignment: assign all
direct bases, then assign all members. In that algorithm, the virtual
base subobject can be encountered more than once. In the example, copying
proceeds in the following order: &lsquo;<samp><span class="samp">val</span></samp>&rsquo;, &lsquo;<samp><span class="samp">name</span></samp>&rsquo; (via
<code>strdup</code>), &lsquo;<samp><span class="samp">bval</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">name</span></samp>&rsquo; again.
<p>If application code relies on copy-assignment, a user-defined
copy-assignment operator removes any uncertainties. With such an
operator, the application can define whether and how the virtual base
subobject is assigned.
</body></html>

View file

@ -0,0 +1,758 @@
<html lang="en">
<head>
<title>Copying - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="GNU-Project.html#GNU-Project" title="GNU Project">
<link rel="next" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" title="GNU Free Documentation License">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Copying"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">GNU Free Documentation License</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="GNU-Project.html#GNU-Project">GNU Project</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<!-- man begin DESCRIPTION -->
<h2 class="unnumbered">GNU General Public License</h2>
<div align="center">Version 3, 29 June 2007</div>
<!-- This file is intended to be included in another file. -->
<pre class="display"> Copyright &copy; 2007 Free Software Foundation, Inc. <a href="http://fsf.org/">http://fsf.org/</a>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
</pre>
<h3 class="heading">Preamble</h3>
<p>The GNU General Public License is a free, copyleft license for
software and other kinds of works.
<p>The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom
to share and change all versions of a program&ndash;to make sure it remains
free software for all its users. We, the Free Software Foundation,
use the GNU General Public License for most of our software; it
applies also to any other work released this way by its authors. You
can apply it to your programs, too.
<p>When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
<p>To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you
have certain responsibilities if you distribute copies of the
software, or if you modify it: responsibilities to respect the freedom
of others.
<p>For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too,
receive or can get the source code. And you must show them these
terms so they know their rights.
<p>Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
<p>For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
<p>Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so. This is fundamentally incompatible with the
aim of protecting users' freedom to change the software. The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products. If such problems arise substantially in
other domains, we stand ready to extend this provision to those
domains in future versions of the GPL, as needed to protect the
freedom of users.
<p>Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish
to avoid the special danger that patents applied to a free program
could make it effectively proprietary. To prevent this, the GPL
assures that patents cannot be used to render the program non-free.
<p>The precise terms and conditions for copying, distribution and
modification follow.
<h3 class="heading">TERMS AND CONDITIONS</h3>
<ol type=1 start=0>
<li>Definitions.
<p>&ldquo;This License&rdquo; refers to version 3 of the GNU General Public License.
<p>&ldquo;Copyright&rdquo; also means copyright-like laws that apply to other kinds
of works, such as semiconductor masks.
<p>&ldquo;The Program&rdquo; refers to any copyrightable work licensed under this
License. Each licensee is addressed as &ldquo;you&rdquo;. &ldquo;Licensees&rdquo; and
&ldquo;recipients&rdquo; may be individuals or organizations.
<p>To &ldquo;modify&rdquo; a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of
an exact copy. The resulting work is called a &ldquo;modified version&rdquo; of
the earlier work or a work &ldquo;based on&rdquo; the earlier work.
<p>A &ldquo;covered work&rdquo; means either the unmodified Program or a work based
on the Program.
<p>To &ldquo;propagate&rdquo; a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
<p>To &ldquo;convey&rdquo; a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user
through a computer network, with no transfer of a copy, is not
conveying.
<p>An interactive user interface displays &ldquo;Appropriate Legal Notices&rdquo; to
the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
<li>Source Code.
<p>The &ldquo;source code&rdquo; for a work means the preferred form of the work for
making modifications to it. &ldquo;Object code&rdquo; means any non-source form
of a work.
<p>A &ldquo;Standard Interface&rdquo; means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
<p>The &ldquo;System Libraries&rdquo; of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
&ldquo;Major Component&rdquo;, in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
<p>The &ldquo;Corresponding Source&rdquo; for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
<p>The Corresponding Source need not include anything that users can
regenerate automatically from other parts of the Corresponding Source.
<p>The Corresponding Source for a work in source code form is that same
work.
<li>Basic Permissions.
<p>All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
<p>You may make, run and propagate covered works that you do not convey,
without conditions so long as your license otherwise remains in force.
You may convey covered works to others for the sole purpose of having
them make modifications exclusively for you, or provide you with
facilities for running those works, provided that you comply with the
terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for
you must do so exclusively on your behalf, under your direction and
control, on terms that prohibit them from making any copies of your
copyrighted material outside their relationship with you.
<p>Conveying under any other circumstances is permitted solely under the
conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
<li>Protecting Users' Legal Rights From Anti-Circumvention Law.
<p>No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
<p>When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License with
respect to the covered work, and you disclaim any intention to limit
operation or modification of the work as a means of enforcing, against
the work's users, your or third parties' legal rights to forbid
circumvention of technological measures.
<li>Conveying Verbatim Copies.
<p>You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
<p>You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
<li>Conveying Modified Source Versions.
<p>You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:
<ol type=a start=1>
<li>The work must carry prominent notices stating that you modified it,
and giving a relevant date.
<li>The work must carry prominent notices stating that it is released
under this License and any conditions added under section 7. This
requirement modifies the requirement in section 4 to &ldquo;keep intact all
notices&rdquo;.
<li>You must license the entire work, as a whole, under this License to
anyone who comes into possession of a copy. This License will
therefore apply, along with any applicable section 7 additional terms,
to the whole of the work, and all its parts, regardless of how they
are packaged. This License gives no permission to license the work in
any other way, but it does not invalidate such permission if you have
separately received it.
<li>If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your work
need not make them do so.
</ol>
<p>A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
&ldquo;aggregate&rdquo; if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
<li>Conveying Non-Source Forms.
<p>You may convey a covered work in object code form under the terms of
sections 4 and 5, provided that you also convey the machine-readable
Corresponding Source under the terms of this License, in one of these
ways:
<ol type=a start=1>
<li>Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium customarily
used for software interchange.
<li>Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a written
offer, valid for at least three years and valid for as long as you
offer spare parts or customer support for that product model, to give
anyone who possesses the object code either (1) a copy of the
Corresponding Source for all the software in the product that is
covered by this License, on a durable physical medium customarily used
for software interchange, for a price no more than your reasonable
cost of physically performing this conveying of source, or (2) access
to copy the Corresponding Source from a network server at no charge.
<li>Convey individual copies of the object code with a copy of the written
offer to provide the Corresponding Source. This alternative is
allowed only occasionally and noncommercially, and only if you
received the object code with such an offer, in accord with subsection
6b.
<li>Convey the object code by offering access from a designated place
(gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to copy
the object code is a network server, the Corresponding Source may be
on a different server (operated by you or a third party) that supports
equivalent copying facilities, provided you maintain clear directions
next to the object code saying where to find the Corresponding Source.
Regardless of what server hosts the Corresponding Source, you remain
obligated to ensure that it is available for as long as needed to
satisfy these requirements.
<li>Convey the object code using peer-to-peer transmission, provided you
inform other peers where the object code and Corresponding Source of
the work are being offered to the general public at no charge under
subsection 6d.
</ol>
<p>A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
<p>A &ldquo;User Product&rdquo; is either (1) a &ldquo;consumer product&rdquo;, which means any
tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product is a
consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
&ldquo;normally used&rdquo; refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the way
in which the particular user actually uses, or expects or is expected
to use, the product. A product is a consumer product regardless of
whether the product has substantial commercial, industrial or
non-consumer uses, unless such uses represent the only significant
mode of use of the product.
<p>&ldquo;Installation Information&rdquo; for a User Product means any methods,
procedures, authorization keys, or other information required to
install and execute modified versions of a covered work in that User
Product from a modified version of its Corresponding Source. The
information must suffice to ensure that the continued functioning of
the modified object code is in no case prevented or interfered with
solely because modification has been made.
<p>If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
<p>The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or
updates for a work that has been modified or installed by the
recipient, or for the User Product in which it has been modified or
installed. Access to a network may be denied when the modification
itself materially and adversely affects the operation of the network
or violates the rules and protocols for communication across the
network.
<p>Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
<li>Additional Terms.
<p>&ldquo;Additional permissions&rdquo; are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
<p>When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
<p>Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders
of that material) supplement the terms of this License with terms:
<ol type=a start=1>
<li>Disclaiming warranty or limiting liability differently from the terms
of sections 15 and 16 of this License; or
<li>Requiring preservation of specified reasonable legal notices or author
attributions in that material or in the Appropriate Legal Notices
displayed by works containing it; or
<li>Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
<li>Limiting the use for publicity purposes of names of licensors or
authors of the material; or
<li>Declining to grant rights under trademark law for use of some trade
names, trademarks, or service marks; or
<li>Requiring indemnification of licensors and authors of that material by
anyone who conveys the material (or modified versions of it) with
contractual assumptions of liability to the recipient, for any
liability that these contractual assumptions directly impose on those
licensors and authors.
</ol>
<p>All other non-permissive additional terms are considered &ldquo;further
restrictions&rdquo; within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
<p>If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
<p>Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions; the
above requirements apply either way.
<li>Termination.
<p>You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
<p>However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
<p>Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
<p>Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
<li>Acceptance Not Required for Having Copies.
<p>You are not required to accept this License in order to receive or run
a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
<li>Automatic Licensing of Downstream Recipients.
<p>Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
<p>An &ldquo;entity transaction&rdquo; is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
<p>You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
<li>Patents.
<p>A &ldquo;contributor&rdquo; is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's &ldquo;contributor version&rdquo;.
<p>A contributor's &ldquo;essential patent claims&rdquo; are all patent claims owned
or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, &ldquo;control&rdquo; includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
<p>In the following three paragraphs, a &ldquo;patent license&rdquo; is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To &ldquo;grant&rdquo; such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
<p>If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. &ldquo;Knowingly relying&rdquo; means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
<p>If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
<p>A patent license is &ldquo;discriminatory&rdquo; if it does not include within the
scope of its coverage, prohibits the exercise of, or is conditioned on
the non-exercise of one or more of the rights that are specifically
granted under this License. You may not convey a covered work if you
are a party to an arrangement with a third party that is in the
business of distributing software, under which you make payment to the
third party based on the extent of your activity of conveying the
work, and under which the third party grants, to any of the parties
who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by
you (or copies made from those copies), or (b) primarily for and in
connection with specific products or compilations that contain the
covered work, unless you entered into that arrangement, or that patent
license was granted, prior to 28 March 2007.
<p>Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
<li>No Surrender of Others' Freedom.
<p>If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey
a covered work so as to satisfy simultaneously your obligations under
this License and any other pertinent obligations, then as a
consequence you may not convey it at all. For example, if you agree
to terms that obligate you to collect a royalty for further conveying
from those to whom you convey the Program, the only way you could
satisfy both those terms and this License would be to refrain entirely
from conveying the Program.
<li>Use with the GNU Affero General Public License.
<p>Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
<li>Revised Versions of this License.
<p>The Free Software Foundation may publish revised and/or new versions
of the GNU General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
<p>Each version is given a distinguishing version number. If the Program
specifies that a certain numbered version of the GNU General Public
License &ldquo;or any later version&rdquo; applies to it, you have the option of
following the terms and conditions either of that numbered version or
of any later version published by the Free Software Foundation. If
the Program does not specify a version number of the GNU General
Public License, you may choose any version ever published by the Free
Software Foundation.
<p>If the Program specifies that a proxy can decide which future versions
of the GNU General Public License can be used, that proxy's public
statement of acceptance of a version permanently authorizes you to
choose that version for the Program.
<p>Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
<li>Disclaimer of Warranty.
<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
<li>Limitation of Liability.
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
<li>Interpretation of Sections 15 and 16.
<p>If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
</ol>
<h3 class="heading">END OF TERMS AND CONDITIONS</h3>
<h3 class="heading">How to Apply These Terms to Your New Programs</h3>
<p>If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
<p>To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found.
<pre class="smallexample"> <var>one line to give the program's name and a brief idea of what it does.</var>
Copyright (C) <var>year</var> <var>name of author</var>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.
</pre>
<p>Also add information on how to contact you by electronic and paper mail.
<p>If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<pre class="smallexample"> <var>program</var> Copyright (C) <var>year</var> <var>name of author</var>
This program comes with ABSOLUTELY NO WARRANTY; for details type &lsquo;<samp><span class="samp">show w</span></samp>&rsquo;.
This is free software, and you are welcome to redistribute it
under certain conditions; type &lsquo;<samp><span class="samp">show c</span></samp>&rsquo; for details.
</pre>
<p>The hypothetical commands &lsquo;<samp><span class="samp">show w</span></samp>&rsquo; and &lsquo;<samp><span class="samp">show c</span></samp>&rsquo; should show
the appropriate parts of the General Public License. Of course, your
program's commands might be different; for a GUI interface, you would
use an &ldquo;about box&rdquo;.
<p>You should also get your employer (if you work as a programmer) or school,
if any, to sign a &ldquo;copyright disclaimer&rdquo; for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.
<p>The GNU General Public License does not permit incorporating your
program into proprietary programs. If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use
the GNU Lesser General Public License instead of this License. But
first, please read <a href="http://www.gnu.org/philosophy/why-not-lgpl.html">http://www.gnu.org/philosophy/why-not-lgpl.html</a>.
<!-- man end -->
<!-- -->
<!-- GFDL -->
<!-- -->
<!-- Special handling for inclusion in the install manual. -->
<!-- man begin DESCRIPTION -->
</body></html>

View file

@ -0,0 +1,94 @@
<html lang="en">
<head>
<title>Cross-profiling - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Gcov.html#Gcov" title="Gcov">
<link rel="prev" href="Gcov-Data-Files.html#Gcov-Data-Files" title="Gcov Data Files">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Cross-profiling"></a>
<a name="Cross_002dprofiling"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Gcov-Data-Files.html#Gcov-Data-Files">Gcov Data Files</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Gcov.html#Gcov">Gcov</a>
<hr>
</div>
<h3 class="section">10.5 Data file relocation to support cross-profiling</h3>
<p>Running the program will cause profile output to be generated. For each
source file compiled with <samp><span class="option">-fprofile-arcs</span></samp>, an accompanying <samp><span class="file">.gcda</span></samp>
file will be placed in the object file directory. That implicitly requires
running the program on the same system as it was built or having the same
absolute directory structure on the target system. The program will try
to create the needed directory structure, if it is not already present.
<p>To support cross-profiling, a program compiled with <samp><span class="option">-fprofile-arcs</span></samp>
can relocate the data files based on two environment variables:
<ul>
<li>GCOV_PREFIX contains the prefix to add to the absolute paths
in the object file. Prefix can be absolute, or relative. The
default is no prefix.
<li>GCOV_PREFIX_STRIP indicates the how many initial directory names to strip off
the hardwired absolute paths. Default value is 0.
<p><em>Note:</em> If GCOV_PREFIX_STRIP is set without GCOV_PREFIX is undefined,
then a relative path is made out of the hardwired absolute paths.
</ul>
<p>For example, if the object file <samp><span class="file">/user/build/foo.o</span></samp> was built with
<samp><span class="option">-fprofile-arcs</span></samp>, the final executable will try to create the data file
<samp><span class="file">/user/build/foo.gcda</span></samp> when running on the target system. This will
fail if the corresponding directory does not exist and it is unable to create
it. This can be overcome by, for example, setting the environment as
&lsquo;<samp><span class="samp">GCOV_PREFIX=/target/run</span></samp>&rsquo; and &lsquo;<samp><span class="samp">GCOV_PREFIX_STRIP=1</span></samp>&rsquo;. Such a
setting will name the data file <samp><span class="file">/target/run/build/foo.gcda</span></samp>.
<p>You must move the data files to the expected directory tree in order to
use them for profile directed optimizations (<samp><span class="option">--use-profile</span></samp>), or to
use the <samp><span class="command">gcov</span></samp> tool.
<!-- Copyright (C) 1988-2013 Free Software Foundation, Inc. -->
<!-- This is part of the GCC manual. -->
<!-- For copying conditions, see the file gcc.texi. -->
</body></html>

View file

@ -0,0 +1,281 @@
<html lang="en">
<head>
<title>DEC Alpha Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="Darwin-Options.html#Darwin-Options" title="Darwin Options">
<link rel="next" href="FR30-Options.html#FR30-Options" title="FR30 Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="DEC-Alpha-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="FR30-Options.html#FR30-Options">FR30 Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Darwin-Options.html#Darwin-Options">Darwin Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.10 DEC Alpha Options</h4>
<p>These &lsquo;<samp><span class="samp">-m</span></samp>&rsquo; options are defined for the DEC Alpha implementations:
<dl>
<dt><code>-mno-soft-float</code><dt><code>-msoft-float</code><dd><a name="index-mno_002dsoft_002dfloat-1318"></a><a name="index-msoft_002dfloat-1319"></a>Use (do not use) the hardware floating-point instructions for
floating-point operations. When <samp><span class="option">-msoft-float</span></samp> is specified,
functions in <samp><span class="file">libgcc.a</span></samp> are used to perform floating-point
operations. Unless they are replaced by routines that emulate the
floating-point operations, or compiled in such a way as to call such
emulations routines, these routines issue floating-point
operations. If you are compiling for an Alpha without floating-point
operations, you must ensure that the library is built so as not to call
them.
<p>Note that Alpha implementations without floating-point operations are
required to have floating-point registers.
<br><dt><code>-mfp-reg</code><dt><code>-mno-fp-regs</code><dd><a name="index-mfp_002dreg-1320"></a><a name="index-mno_002dfp_002dregs-1321"></a>Generate code that uses (does not use) the floating-point register set.
<samp><span class="option">-mno-fp-regs</span></samp> implies <samp><span class="option">-msoft-float</span></samp>. If the floating-point
register set is not used, floating-point operands are passed in integer
registers as if they were integers and floating-point results are passed
in <code>$0</code> instead of <code>$f0</code>. This is a non-standard calling sequence,
so any function with a floating-point argument or return value called by code
compiled with <samp><span class="option">-mno-fp-regs</span></samp> must also be compiled with that
option.
<p>A typical use of this option is building a kernel that does not use,
and hence need not save and restore, any floating-point registers.
<br><dt><code>-mieee</code><dd><a name="index-mieee-1322"></a>The Alpha architecture implements floating-point hardware optimized for
maximum performance. It is mostly compliant with the IEEE floating-point
standard. However, for full compliance, software assistance is
required. This option generates code fully IEEE-compliant code
<em>except</em> that the <var>inexact-flag</var> is not maintained (see below).
If this option is turned on, the preprocessor macro <code>_IEEE_FP</code> is
defined during compilation. The resulting code is less efficient but is
able to correctly support denormalized numbers and exceptional IEEE
values such as not-a-number and plus/minus infinity. Other Alpha
compilers call this option <samp><span class="option">-ieee_with_no_inexact</span></samp>.
<br><dt><code>-mieee-with-inexact</code><dd><a name="index-mieee_002dwith_002dinexact-1323"></a>This is like <samp><span class="option">-mieee</span></samp> except the generated code also maintains
the IEEE <var>inexact-flag</var>. Turning on this option causes the
generated code to implement fully-compliant IEEE math. In addition to
<code>_IEEE_FP</code>, <code>_IEEE_FP_EXACT</code> is defined as a preprocessor
macro. On some Alpha implementations the resulting code may execute
significantly slower than the code generated by default. Since there is
very little code that depends on the <var>inexact-flag</var>, you should
normally not specify this option. Other Alpha compilers call this
option <samp><span class="option">-ieee_with_inexact</span></samp>.
<br><dt><code>-mfp-trap-mode=</code><var>trap-mode</var><dd><a name="index-mfp_002dtrap_002dmode-1324"></a>This option controls what floating-point related traps are enabled.
Other Alpha compilers call this option <samp><span class="option">-fptm </span><var>trap-mode</var></samp>.
The trap mode can be set to one of four values:
<dl>
<dt>&lsquo;<samp><span class="samp">n</span></samp>&rsquo;<dd>This is the default (normal) setting. The only traps that are enabled
are the ones that cannot be disabled in software (e.g., division by zero
trap).
<br><dt>&lsquo;<samp><span class="samp">u</span></samp>&rsquo;<dd>In addition to the traps enabled by &lsquo;<samp><span class="samp">n</span></samp>&rsquo;, underflow traps are enabled
as well.
<br><dt>&lsquo;<samp><span class="samp">su</span></samp>&rsquo;<dd>Like &lsquo;<samp><span class="samp">u</span></samp>&rsquo;, but the instructions are marked to be safe for software
completion (see Alpha architecture manual for details).
<br><dt>&lsquo;<samp><span class="samp">sui</span></samp>&rsquo;<dd>Like &lsquo;<samp><span class="samp">su</span></samp>&rsquo;, but inexact traps are enabled as well.
</dl>
<br><dt><code>-mfp-rounding-mode=</code><var>rounding-mode</var><dd><a name="index-mfp_002drounding_002dmode-1325"></a>Selects the IEEE rounding mode. Other Alpha compilers call this option
<samp><span class="option">-fprm </span><var>rounding-mode</var></samp>. The <var>rounding-mode</var> can be one
of:
<dl>
<dt>&lsquo;<samp><span class="samp">n</span></samp>&rsquo;<dd>Normal IEEE rounding mode. Floating-point numbers are rounded towards
the nearest machine number or towards the even machine number in case
of a tie.
<br><dt>&lsquo;<samp><span class="samp">m</span></samp>&rsquo;<dd>Round towards minus infinity.
<br><dt>&lsquo;<samp><span class="samp">c</span></samp>&rsquo;<dd>Chopped rounding mode. Floating-point numbers are rounded towards zero.
<br><dt>&lsquo;<samp><span class="samp">d</span></samp>&rsquo;<dd>Dynamic rounding mode. A field in the floating-point control register
(<var>fpcr</var>, see Alpha architecture reference manual) controls the
rounding mode in effect. The C library initializes this register for
rounding towards plus infinity. Thus, unless your program modifies the
<var>fpcr</var>, &lsquo;<samp><span class="samp">d</span></samp>&rsquo; corresponds to round towards plus infinity.
</dl>
<br><dt><code>-mtrap-precision=</code><var>trap-precision</var><dd><a name="index-mtrap_002dprecision-1326"></a>In the Alpha architecture, floating-point traps are imprecise. This
means without software assistance it is impossible to recover from a
floating trap and program execution normally needs to be terminated.
GCC can generate code that can assist operating system trap handlers
in determining the exact location that caused a floating-point trap.
Depending on the requirements of an application, different levels of
precisions can be selected:
<dl>
<dt>&lsquo;<samp><span class="samp">p</span></samp>&rsquo;<dd>Program precision. This option is the default and means a trap handler
can only identify which program caused a floating-point exception.
<br><dt>&lsquo;<samp><span class="samp">f</span></samp>&rsquo;<dd>Function precision. The trap handler can determine the function that
caused a floating-point exception.
<br><dt>&lsquo;<samp><span class="samp">i</span></samp>&rsquo;<dd>Instruction precision. The trap handler can determine the exact
instruction that caused a floating-point exception.
</dl>
<p>Other Alpha compilers provide the equivalent options called
<samp><span class="option">-scope_safe</span></samp> and <samp><span class="option">-resumption_safe</span></samp>.
<br><dt><code>-mieee-conformant</code><dd><a name="index-mieee_002dconformant-1327"></a>This option marks the generated code as IEEE conformant. You must not
use this option unless you also specify <samp><span class="option">-mtrap-precision=i</span></samp> and either
<samp><span class="option">-mfp-trap-mode=su</span></samp> or <samp><span class="option">-mfp-trap-mode=sui</span></samp>. Its only effect
is to emit the line &lsquo;<samp><span class="samp">.eflag 48</span></samp>&rsquo; in the function prologue of the
generated assembly file.
<br><dt><code>-mbuild-constants</code><dd><a name="index-mbuild_002dconstants-1328"></a>Normally GCC examines a 32- or 64-bit integer constant to
see if it can construct it from smaller constants in two or three
instructions. If it cannot, it outputs the constant as a literal and
generates code to load it from the data segment at run time.
<p>Use this option to require GCC to construct <em>all</em> integer constants
using code, even if it takes more instructions (the maximum is six).
<p>You typically use this option to build a shared library dynamic
loader. Itself a shared library, it must relocate itself in memory
before it can find the variables and constants in its own data segment.
<br><dt><code>-mbwx</code><dt><code>-mno-bwx</code><dt><code>-mcix</code><dt><code>-mno-cix</code><dt><code>-mfix</code><dt><code>-mno-fix</code><dt><code>-mmax</code><dt><code>-mno-max</code><dd><a name="index-mbwx-1329"></a><a name="index-mno_002dbwx-1330"></a><a name="index-mcix-1331"></a><a name="index-mno_002dcix-1332"></a><a name="index-mfix-1333"></a><a name="index-mno_002dfix-1334"></a><a name="index-mmax-1335"></a><a name="index-mno_002dmax-1336"></a>Indicate whether GCC should generate code to use the optional BWX,
CIX, FIX and MAX instruction sets. The default is to use the instruction
sets supported by the CPU type specified via <samp><span class="option">-mcpu=</span></samp> option or that
of the CPU on which GCC was built if none is specified.
<br><dt><code>-mfloat-vax</code><dt><code>-mfloat-ieee</code><dd><a name="index-mfloat_002dvax-1337"></a><a name="index-mfloat_002dieee-1338"></a>Generate code that uses (does not use) VAX F and G floating-point
arithmetic instead of IEEE single and double precision.
<br><dt><code>-mexplicit-relocs</code><dt><code>-mno-explicit-relocs</code><dd><a name="index-mexplicit_002drelocs-1339"></a><a name="index-mno_002dexplicit_002drelocs-1340"></a>Older Alpha assemblers provided no way to generate symbol relocations
except via assembler macros. Use of these macros does not allow
optimal instruction scheduling. GNU binutils as of version 2.12
supports a new syntax that allows the compiler to explicitly mark
which relocations should apply to which instructions. This option
is mostly useful for debugging, as GCC detects the capabilities of
the assembler when it is built and sets the default accordingly.
<br><dt><code>-msmall-data</code><dt><code>-mlarge-data</code><dd><a name="index-msmall_002ddata-1341"></a><a name="index-mlarge_002ddata-1342"></a>When <samp><span class="option">-mexplicit-relocs</span></samp> is in effect, static data is
accessed via <dfn>gp-relative</dfn> relocations. When <samp><span class="option">-msmall-data</span></samp>
is used, objects 8 bytes long or smaller are placed in a <dfn>small data area</dfn>
(the <code>.sdata</code> and <code>.sbss</code> sections) and are accessed via
16-bit relocations off of the <code>$gp</code> register. This limits the
size of the small data area to 64KB, but allows the variables to be
directly accessed via a single instruction.
<p>The default is <samp><span class="option">-mlarge-data</span></samp>. With this option the data area
is limited to just below 2GB. Programs that require more than 2GB of
data must use <code>malloc</code> or <code>mmap</code> to allocate the data in the
heap instead of in the program's data segment.
<p>When generating code for shared libraries, <samp><span class="option">-fpic</span></samp> implies
<samp><span class="option">-msmall-data</span></samp> and <samp><span class="option">-fPIC</span></samp> implies <samp><span class="option">-mlarge-data</span></samp>.
<br><dt><code>-msmall-text</code><dt><code>-mlarge-text</code><dd><a name="index-msmall_002dtext-1343"></a><a name="index-mlarge_002dtext-1344"></a>When <samp><span class="option">-msmall-text</span></samp> is used, the compiler assumes that the
code of the entire program (or shared library) fits in 4MB, and is
thus reachable with a branch instruction. When <samp><span class="option">-msmall-data</span></samp>
is used, the compiler can assume that all local symbols share the
same <code>$gp</code> value, and thus reduce the number of instructions
required for a function call from 4 to 1.
<p>The default is <samp><span class="option">-mlarge-text</span></samp>.
<br><dt><code>-mcpu=</code><var>cpu_type</var><dd><a name="index-mcpu-1345"></a>Set the instruction set and instruction scheduling parameters for
machine type <var>cpu_type</var>. You can specify either the &lsquo;<samp><span class="samp">EV</span></samp>&rsquo;
style name or the corresponding chip number. GCC supports scheduling
parameters for the EV4, EV5 and EV6 family of processors and
chooses the default values for the instruction set from the processor
you specify. If you do not specify a processor type, GCC defaults
to the processor on which the compiler was built.
<p>Supported values for <var>cpu_type</var> are
<dl>
<dt>&lsquo;<samp><span class="samp">ev4</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">ev45</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">21064</span></samp>&rsquo;<dd>Schedules as an EV4 and has no instruction set extensions.
<br><dt>&lsquo;<samp><span class="samp">ev5</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">21164</span></samp>&rsquo;<dd>Schedules as an EV5 and has no instruction set extensions.
<br><dt>&lsquo;<samp><span class="samp">ev56</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">21164a</span></samp>&rsquo;<dd>Schedules as an EV5 and supports the BWX extension.
<br><dt>&lsquo;<samp><span class="samp">pca56</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">21164pc</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">21164PC</span></samp>&rsquo;<dd>Schedules as an EV5 and supports the BWX and MAX extensions.
<br><dt>&lsquo;<samp><span class="samp">ev6</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">21264</span></samp>&rsquo;<dd>Schedules as an EV6 and supports the BWX, FIX, and MAX extensions.
<br><dt>&lsquo;<samp><span class="samp">ev67</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">21264a</span></samp>&rsquo;<dd>Schedules as an EV6 and supports the BWX, CIX, FIX, and MAX extensions.
</dl>
<p>Native toolchains also support the value &lsquo;<samp><span class="samp">native</span></samp>&rsquo;,
which selects the best architecture option for the host processor.
<samp><span class="option">-mcpu=native</span></samp> has no effect if GCC does not recognize
the processor.
<br><dt><code>-mtune=</code><var>cpu_type</var><dd><a name="index-mtune-1346"></a>Set only the instruction scheduling parameters for machine type
<var>cpu_type</var>. The instruction set is not changed.
<p>Native toolchains also support the value &lsquo;<samp><span class="samp">native</span></samp>&rsquo;,
which selects the best architecture option for the host processor.
<samp><span class="option">-mtune=native</span></samp> has no effect if GCC does not recognize
the processor.
<br><dt><code>-mmemory-latency=</code><var>time</var><dd><a name="index-mmemory_002dlatency-1347"></a>Sets the latency the scheduler should assume for typical memory
references as seen by the application. This number is highly
dependent on the memory access patterns used by the application
and the size of the external cache on the machine.
<p>Valid options for <var>time</var> are
<dl>
<dt>&lsquo;<samp><var>number</var></samp>&rsquo;<dd>A decimal number representing clock cycles.
<br><dt>&lsquo;<samp><span class="samp">L1</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">L2</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">L3</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">main</span></samp>&rsquo;<dd>The compiler contains estimates of the number of clock cycles for
&ldquo;typical&rdquo; EV4 &amp; EV5 hardware for the Level 1, 2 &amp; 3 caches
(also called Dcache, Scache, and Bcache), as well as to main memory.
Note that L3 is only valid for EV5.
</dl>
</dl>
</body></html>

View file

@ -0,0 +1,67 @@
<html lang="en">
<head>
<title>Darwin Format Checks - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Target-Format-Checks.html#Target-Format-Checks" title="Target Format Checks">
<link rel="prev" href="Solaris-Format-Checks.html#Solaris-Format-Checks" title="Solaris Format Checks">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Darwin-Format-Checks"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Solaris-Format-Checks.html#Solaris-Format-Checks">Solaris Format Checks</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Target-Format-Checks.html#Target-Format-Checks">Target Format Checks</a>
<hr>
</div>
<h4 class="subsection">6.57.2 Darwin Format Checks</h4>
<p>Darwin targets support the <code>CFString</code> (or <code>__CFString__</code>) in the format
attribute context. Declarations made with such attribution are parsed for correct syntax
and format argument types. However, parsing of the format string itself is currently undefined
and is not carried out by this version of the compiler.
<p>Additionally, <code>CFStringRefs</code> (defined by the <code>CoreFoundation</code> headers) may
also be used as format arguments. Note that the relevant headers are only likely to be
available on Darwin (OSX) installations. On such installations, the XCode and system
documentation provide descriptions of <code>CFString</code>, <code>CFStringRefs</code> and
associated functions.
</body></html>

View file

@ -0,0 +1,182 @@
<html lang="en">
<head>
<title>Darwin Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="CR16-Options.html#CR16-Options" title="CR16 Options">
<link rel="next" href="DEC-Alpha-Options.html#DEC-Alpha-Options" title="DEC Alpha Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Darwin-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="DEC-Alpha-Options.html#DEC-Alpha-Options">DEC Alpha Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="CR16-Options.html#CR16-Options">CR16 Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.9 Darwin Options</h4>
<p><a name="index-Darwin-options-1243"></a>
These options are defined for all architectures running the Darwin operating
system.
<p>FSF GCC on Darwin does not create &ldquo;fat&rdquo; object files; it creates
an object file for the single architecture that GCC was built to
target. Apple's GCC on Darwin does create &ldquo;fat&rdquo; files if multiple
<samp><span class="option">-arch</span></samp> options are used; it does so by running the compiler or
linker multiple times and joining the results together with
<samp><span class="file">lipo</span></samp>.
<p>The subtype of the file created (like &lsquo;<samp><span class="samp">ppc7400</span></samp>&rsquo; or &lsquo;<samp><span class="samp">ppc970</span></samp>&rsquo; or
&lsquo;<samp><span class="samp">i686</span></samp>&rsquo;) is determined by the flags that specify the ISA
that GCC is targeting, like <samp><span class="option">-mcpu</span></samp> or <samp><span class="option">-march</span></samp>. The
<samp><span class="option">-force_cpusubtype_ALL</span></samp> option can be used to override this.
<p>The Darwin tools vary in their behavior when presented with an ISA
mismatch. The assembler, <samp><span class="file">as</span></samp>, only permits instructions to
be used that are valid for the subtype of the file it is generating,
so you cannot put 64-bit instructions in a &lsquo;<samp><span class="samp">ppc750</span></samp>&rsquo; object file.
The linker for shared libraries, <samp><span class="file">/usr/bin/libtool</span></samp>, fails
and prints an error if asked to create a shared library with a less
restrictive subtype than its input files (for instance, trying to put
a &lsquo;<samp><span class="samp">ppc970</span></samp>&rsquo; object file in a &lsquo;<samp><span class="samp">ppc7400</span></samp>&rsquo; library). The linker
for executables, <samp><span class="command">ld</span></samp>, quietly gives the executable the most
restrictive subtype of any of its input files.
<dl>
<dt><code>-F</code><var>dir</var><dd><a name="index-F-1244"></a>Add the framework directory <var>dir</var> to the head of the list of
directories to be searched for header files. These directories are
interleaved with those specified by <samp><span class="option">-I</span></samp> options and are
scanned in a left-to-right order.
<p>A framework directory is a directory with frameworks in it. A
framework is a directory with a <samp><span class="file">Headers</span></samp> and/or
<samp><span class="file">PrivateHeaders</span></samp> directory contained directly in it that ends
in <samp><span class="file">.framework</span></samp>. The name of a framework is the name of this
directory excluding the <samp><span class="file">.framework</span></samp>. Headers associated with
the framework are found in one of those two directories, with
<samp><span class="file">Headers</span></samp> being searched first. A subframework is a framework
directory that is in a framework's <samp><span class="file">Frameworks</span></samp> directory.
Includes of subframework headers can only appear in a header of a
framework that contains the subframework, or in a sibling subframework
header. Two subframeworks are siblings if they occur in the same
framework. A subframework should not have the same name as a
framework; a warning is issued if this is violated. Currently a
subframework cannot have subframeworks; in the future, the mechanism
may be extended to support this. The standard frameworks can be found
in <samp><span class="file">/System/Library/Frameworks</span></samp> and
<samp><span class="file">/Library/Frameworks</span></samp>. An example include looks like
<code>#include &lt;Framework/header.h&gt;</code>, where <samp><span class="file">Framework</span></samp> denotes
the name of the framework and <samp><span class="file">header.h</span></samp> is found in the
<samp><span class="file">PrivateHeaders</span></samp> or <samp><span class="file">Headers</span></samp> directory.
<br><dt><code>-iframework</code><var>dir</var><dd><a name="index-iframework-1245"></a>Like <samp><span class="option">-F</span></samp> except the directory is a treated as a system
directory. The main difference between this <samp><span class="option">-iframework</span></samp> and
<samp><span class="option">-F</span></samp> is that with <samp><span class="option">-iframework</span></samp> the compiler does not
warn about constructs contained within header files found via
<var>dir</var>. This option is valid only for the C family of languages.
<br><dt><code>-gused</code><dd><a name="index-gused-1246"></a>Emit debugging information for symbols that are used. For stabs
debugging format, this enables <samp><span class="option">-feliminate-unused-debug-symbols</span></samp>.
This is by default ON.
<br><dt><code>-gfull</code><dd><a name="index-gfull-1247"></a>Emit debugging information for all symbols and types.
<br><dt><code>-mmacosx-version-min=</code><var>version</var><dd>The earliest version of MacOS X that this executable will run on
is <var>version</var>. Typical values of <var>version</var> include <code>10.1</code>,
<code>10.2</code>, and <code>10.3.9</code>.
<p>If the compiler was built to use the system's headers by default,
then the default for this option is the system version on which the
compiler is running, otherwise the default is to make choices that
are compatible with as many systems and code bases as possible.
<br><dt><code>-mkernel</code><dd><a name="index-mkernel-1248"></a>Enable kernel development mode. The <samp><span class="option">-mkernel</span></samp> option sets
<samp><span class="option">-static</span></samp>, <samp><span class="option">-fno-common</span></samp>, <samp><span class="option">-fno-cxa-atexit</span></samp>,
<samp><span class="option">-fno-exceptions</span></samp>, <samp><span class="option">-fno-non-call-exceptions</span></samp>,
<samp><span class="option">-fapple-kext</span></samp>, <samp><span class="option">-fno-weak</span></samp> and <samp><span class="option">-fno-rtti</span></samp> where
applicable. This mode also sets <samp><span class="option">-mno-altivec</span></samp>,
<samp><span class="option">-msoft-float</span></samp>, <samp><span class="option">-fno-builtin</span></samp> and
<samp><span class="option">-mlong-branch</span></samp> for PowerPC targets.
<br><dt><code>-mone-byte-bool</code><dd><a name="index-mone_002dbyte_002dbool-1249"></a>Override the defaults for &lsquo;<samp><span class="samp">bool</span></samp>&rsquo; so that &lsquo;<samp><span class="samp">sizeof(bool)==1</span></samp>&rsquo;.
By default &lsquo;<samp><span class="samp">sizeof(bool)</span></samp>&rsquo; is &lsquo;<samp><span class="samp">4</span></samp>&rsquo; when compiling for
Darwin/PowerPC and &lsquo;<samp><span class="samp">1</span></samp>&rsquo; when compiling for Darwin/x86, so this
option has no effect on x86.
<p><strong>Warning:</strong> The <samp><span class="option">-mone-byte-bool</span></samp> switch causes GCC
to generate code that is not binary compatible with code generated
without that switch. Using this switch may require recompiling all
other modules in a program, including system libraries. Use this
switch to conform to a non-default data model.
<br><dt><code>-mfix-and-continue</code><dt><code>-ffix-and-continue</code><dt><code>-findirect-data</code><dd><a name="index-mfix_002dand_002dcontinue-1250"></a><a name="index-ffix_002dand_002dcontinue-1251"></a><a name="index-findirect_002ddata-1252"></a>Generate code suitable for fast turnaround development, such as to
allow GDB to dynamically load <code>.o</code> files into already-running
programs. <samp><span class="option">-findirect-data</span></samp> and <samp><span class="option">-ffix-and-continue</span></samp>
are provided for backwards compatibility.
<br><dt><code>-all_load</code><dd><a name="index-all_005fload-1253"></a>Loads all members of static archive libraries.
See man ld(1) for more information.
<br><dt><code>-arch_errors_fatal</code><dd><a name="index-arch_005ferrors_005ffatal-1254"></a>Cause the errors having to do with files that have the wrong architecture
to be fatal.
<br><dt><code>-bind_at_load</code><dd><a name="index-bind_005fat_005fload-1255"></a>Causes the output file to be marked such that the dynamic linker will
bind all undefined references when the file is loaded or launched.
<br><dt><code>-bundle</code><dd><a name="index-bundle-1256"></a>Produce a Mach-o bundle format file.
See man ld(1) for more information.
<br><dt><code>-bundle_loader </code><var>executable</var><dd><a name="index-bundle_005floader-1257"></a>This option specifies the <var>executable</var> that will load the build
output file being linked. See man ld(1) for more information.
<br><dt><code>-dynamiclib</code><dd><a name="index-dynamiclib-1258"></a>When passed this option, GCC produces a dynamic library instead of
an executable when linking, using the Darwin <samp><span class="file">libtool</span></samp> command.
<br><dt><code>-force_cpusubtype_ALL</code><dd><a name="index-force_005fcpusubtype_005fALL-1259"></a>This causes GCC's output file to have the <var>ALL</var> subtype, instead of
one controlled by the <samp><span class="option">-mcpu</span></samp> or <samp><span class="option">-march</span></samp> option.
<br><dt><code>-allowable_client </code><var>client_name</var><dt><code>-client_name</code><dt><code>-compatibility_version</code><dt><code>-current_version</code><dt><code>-dead_strip</code><dt><code>-dependency-file</code><dt><code>-dylib_file</code><dt><code>-dylinker_install_name</code><dt><code>-dynamic</code><dt><code>-exported_symbols_list</code><dt><code>-filelist</code><dt><code>-flat_namespace</code><dt><code>-force_flat_namespace</code><dt><code>-headerpad_max_install_names</code><dt><code>-image_base</code><dt><code>-init</code><dt><code>-install_name</code><dt><code>-keep_private_externs</code><dt><code>-multi_module</code><dt><code>-multiply_defined</code><dt><code>-multiply_defined_unused</code><dt><code>-noall_load</code><dt><code>-no_dead_strip_inits_and_terms</code><dt><code>-nofixprebinding</code><dt><code>-nomultidefs</code><dt><code>-noprebind</code><dt><code>-noseglinkedit</code><dt><code>-pagezero_size</code><dt><code>-prebind</code><dt><code>-prebind_all_twolevel_modules</code><dt><code>-private_bundle</code><dt><code>-read_only_relocs</code><dt><code>-sectalign</code><dt><code>-sectobjectsymbols</code><dt><code>-whyload</code><dt><code>-seg1addr</code><dt><code>-sectcreate</code><dt><code>-sectobjectsymbols</code><dt><code>-sectorder</code><dt><code>-segaddr</code><dt><code>-segs_read_only_addr</code><dt><code>-segs_read_write_addr</code><dt><code>-seg_addr_table</code><dt><code>-seg_addr_table_filename</code><dt><code>-seglinkedit</code><dt><code>-segprot</code><dt><code>-segs_read_only_addr</code><dt><code>-segs_read_write_addr</code><dt><code>-single_module</code><dt><code>-static</code><dt><code>-sub_library</code><dt><code>-sub_umbrella</code><dt><code>-twolevel_namespace</code><dt><code>-umbrella</code><dt><code>-undefined</code><dt><code>-unexported_symbols_list</code><dt><code>-weak_reference_mismatches</code><dt><code>-whatsloaded</code><dd><a name="index-allowable_005fclient-1260"></a><a name="index-client_005fname-1261"></a><a name="index-compatibility_005fversion-1262"></a><a name="index-current_005fversion-1263"></a><a name="index-dead_005fstrip-1264"></a><a name="index-dependency_002dfile-1265"></a><a name="index-dylib_005ffile-1266"></a><a name="index-dylinker_005finstall_005fname-1267"></a><a name="index-dynamic-1268"></a><a name="index-exported_005fsymbols_005flist-1269"></a><a name="index-filelist-1270"></a><a name="index-flat_005fnamespace-1271"></a><a name="index-force_005fflat_005fnamespace-1272"></a><a name="index-headerpad_005fmax_005finstall_005fnames-1273"></a><a name="index-image_005fbase-1274"></a><a name="index-init-1275"></a><a name="index-install_005fname-1276"></a><a name="index-keep_005fprivate_005fexterns-1277"></a><a name="index-multi_005fmodule-1278"></a><a name="index-multiply_005fdefined-1279"></a><a name="index-multiply_005fdefined_005funused-1280"></a><a name="index-noall_005fload-1281"></a><a name="index-no_005fdead_005fstrip_005finits_005fand_005fterms-1282"></a><a name="index-nofixprebinding-1283"></a><a name="index-nomultidefs-1284"></a><a name="index-noprebind-1285"></a><a name="index-noseglinkedit-1286"></a><a name="index-pagezero_005fsize-1287"></a><a name="index-prebind-1288"></a><a name="index-prebind_005fall_005ftwolevel_005fmodules-1289"></a><a name="index-private_005fbundle-1290"></a><a name="index-read_005fonly_005frelocs-1291"></a><a name="index-sectalign-1292"></a><a name="index-sectobjectsymbols-1293"></a><a name="index-whyload-1294"></a><a name="index-seg1addr-1295"></a><a name="index-sectcreate-1296"></a><a name="index-sectobjectsymbols-1297"></a><a name="index-sectorder-1298"></a><a name="index-segaddr-1299"></a><a name="index-segs_005fread_005fonly_005faddr-1300"></a><a name="index-segs_005fread_005fwrite_005faddr-1301"></a><a name="index-seg_005faddr_005ftable-1302"></a><a name="index-seg_005faddr_005ftable_005ffilename-1303"></a><a name="index-seglinkedit-1304"></a><a name="index-segprot-1305"></a><a name="index-segs_005fread_005fonly_005faddr-1306"></a><a name="index-segs_005fread_005fwrite_005faddr-1307"></a><a name="index-single_005fmodule-1308"></a><a name="index-static-1309"></a><a name="index-sub_005flibrary-1310"></a><a name="index-sub_005fumbrella-1311"></a><a name="index-twolevel_005fnamespace-1312"></a><a name="index-umbrella-1313"></a><a name="index-undefined-1314"></a><a name="index-unexported_005fsymbols_005flist-1315"></a><a name="index-weak_005freference_005fmismatches-1316"></a><a name="index-whatsloaded-1317"></a>These options are passed to the Darwin linker. The Darwin linker man page
describes them in detail.
</dl>
</body></html>

View file

@ -0,0 +1,79 @@
<html lang="en">
<head>
<title>Darwin Pragmas - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Pragmas.html#Pragmas" title="Pragmas">
<link rel="prev" href="RS_002f6000-and-PowerPC-Pragmas.html#RS_002f6000-and-PowerPC-Pragmas" title="RS/6000 and PowerPC Pragmas">
<link rel="next" href="Solaris-Pragmas.html#Solaris-Pragmas" title="Solaris Pragmas">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Darwin-Pragmas"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Solaris-Pragmas.html#Solaris-Pragmas">Solaris Pragmas</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="RS_002f6000-and-PowerPC-Pragmas.html#RS_002f6000-and-PowerPC-Pragmas">RS/6000 and PowerPC Pragmas</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Pragmas.html#Pragmas">Pragmas</a>
<hr>
</div>
<h4 class="subsection">6.58.5 Darwin Pragmas</h4>
<p>The following pragmas are available for all architectures running the
Darwin operating system. These are useful for compatibility with other
Mac OS compilers.
<dl>
<dt><code>mark </code><var>tokens</var><code>...</code><dd><a name="index-pragma_002c-mark-3471"></a>This pragma is accepted, but has no effect.
<br><dt><code>options align=</code><var>alignment</var><dd><a name="index-pragma_002c-options-align-3472"></a>This pragma sets the alignment of fields in structures. The values of
<var>alignment</var> may be <code>mac68k</code>, to emulate m68k alignment, or
<code>power</code>, to emulate PowerPC alignment. Uses of this pragma nest
properly; to restore the previous setting, use <code>reset</code> for the
<var>alignment</var>.
<br><dt><code>segment </code><var>tokens</var><code>...</code><dd><a name="index-pragma_002c-segment-3473"></a>This pragma is accepted, but has no effect.
<br><dt><code>unused (</code><var>var</var><code> [, </code><var>var</var><code>]...)</code><dd><a name="index-pragma_002c-unused-3474"></a>This pragma declares variables to be possibly unused. GCC does not
produce warnings for the listed variables. The effect is similar to
that of the <code>unused</code> attribute, except that this pragma may appear
anywhere within the variables' scopes.
</dl>
</body></html>

View file

@ -0,0 +1,97 @@
<html lang="en">
<head>
<title>Decimal Float - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Half_002dPrecision.html#Half_002dPrecision" title="Half-Precision">
<link rel="next" href="Hex-Floats.html#Hex-Floats" title="Hex Floats">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Decimal-Float"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Hex-Floats.html#Hex-Floats">Hex Floats</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Half_002dPrecision.html#Half_002dPrecision">Half-Precision</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.13 Decimal Floating Types</h3>
<p><a name="index-decimal-floating-types-2463"></a><a name="index-g_t_0040code_007b_005fDecimal32_007d-data-type-2464"></a><a name="index-g_t_0040code_007b_005fDecimal64_007d-data-type-2465"></a><a name="index-g_t_0040code_007b_005fDecimal128_007d-data-type-2466"></a><a name="index-g_t_0040code_007bdf_007d-integer-suffix-2467"></a><a name="index-g_t_0040code_007bdd_007d-integer-suffix-2468"></a><a name="index-g_t_0040code_007bdl_007d-integer-suffix-2469"></a><a name="index-g_t_0040code_007bDF_007d-integer-suffix-2470"></a><a name="index-g_t_0040code_007bDD_007d-integer-suffix-2471"></a><a name="index-g_t_0040code_007bDL_007d-integer-suffix-2472"></a>
As an extension, GNU C supports decimal floating types as
defined in the N1312 draft of ISO/IEC WDTR24732. Support for decimal
floating types in GCC will evolve as the draft technical report changes.
Calling conventions for any target might also change. Not all targets
support decimal floating types.
<p>The decimal floating types are <code>_Decimal32</code>, <code>_Decimal64</code>, and
<code>_Decimal128</code>. They use a radix of ten, unlike the floating types
<code>float</code>, <code>double</code>, and <code>long double</code> whose radix is not
specified by the C standard but is usually two.
<p>Support for decimal floating types includes the arithmetic operators
add, subtract, multiply, divide; unary arithmetic operators;
relational operators; equality operators; and conversions to and from
integer and other floating types. Use a suffix &lsquo;<samp><span class="samp">df</span></samp>&rsquo; or
&lsquo;<samp><span class="samp">DF</span></samp>&rsquo; in a literal constant of type <code>_Decimal32</code>, &lsquo;<samp><span class="samp">dd</span></samp>&rsquo;
or &lsquo;<samp><span class="samp">DD</span></samp>&rsquo; for <code>_Decimal64</code>, and &lsquo;<samp><span class="samp">dl</span></samp>&rsquo; or &lsquo;<samp><span class="samp">DL</span></samp>&rsquo; for
<code>_Decimal128</code>.
<p>GCC support of decimal float as specified by the draft technical report
is incomplete:
<ul>
<li>When the value of a decimal floating type cannot be represented in the
integer type to which it is being converted, the result is undefined
rather than the result value specified by the draft technical report.
<li>GCC does not provide the C library functionality associated with
<samp><span class="file">math.h</span></samp>, <samp><span class="file">fenv.h</span></samp>, <samp><span class="file">stdio.h</span></samp>, <samp><span class="file">stdlib.h</span></samp>, and
<samp><span class="file">wchar.h</span></samp>, which must come from a separate C library implementation.
Because of this the GNU C compiler does not define macro
<code>__STDC_DEC_FP__</code> to indicate that the implementation conforms to
the technical report.
</ul>
<p>Types <code>_Decimal32</code>, <code>_Decimal64</code>, and <code>_Decimal128</code>
are supported by the DWARF 2 debug information format.
</body></html>

View file

@ -0,0 +1,66 @@
<html lang="en">
<head>
<title>Declarators implementation - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Implementation.html#C-Implementation" title="C Implementation">
<link rel="prev" href="Qualifiers-implementation.html#Qualifiers-implementation" title="Qualifiers implementation">
<link rel="next" href="Statements-implementation.html#Statements-implementation" title="Statements implementation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Declarators-implementation"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Statements-implementation.html#Statements-implementation">Statements implementation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Qualifiers-implementation.html#Qualifiers-implementation">Qualifiers implementation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Implementation.html#C-Implementation">C Implementation</a>
<hr>
</div>
<h3 class="section">4.11 Declarators</h3>
<ul>
<li><cite>The maximum number of declarators that may modify an arithmetic,
structure or union type (C90 6.5.4).</cite>
<p>GCC is only limited by available memory.
</ul>
</body></html>

View file

@ -0,0 +1,117 @@
<html lang="en">
<head>
<title>Deprecated Features - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions" title="C++ Extensions">
<link rel="prev" href="Java-Exceptions.html#Java-Exceptions" title="Java Exceptions">
<link rel="next" href="Backwards-Compatibility.html#Backwards-Compatibility" title="Backwards Compatibility">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Deprecated-Features"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Backwards-Compatibility.html#Backwards-Compatibility">Backwards Compatibility</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Java-Exceptions.html#Java-Exceptions">Java Exceptions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002b_002b-Extensions.html#C_002b_002b-Extensions">C++ Extensions</a>
<hr>
</div>
<h3 class="section">7.12 Deprecated Features</h3>
<p>In the past, the GNU C++ compiler was extended to experiment with new
features, at a time when the C++ language was still evolving. Now that
the C++ standard is complete, some of those features are superseded by
superior alternatives. Using the old features might cause a warning in
some cases that the feature will be dropped in the future. In other
cases, the feature might be gone already.
<p>While the list below is not exhaustive, it documents some of the options
that are now deprecated:
<dl>
<dt><code>-fexternal-templates</code><dt><code>-falt-external-templates</code><dd>These are two of the many ways for G++ to implement template
instantiation. See <a href="Template-Instantiation.html#Template-Instantiation">Template Instantiation</a>. The C++ standard clearly
defines how template definitions have to be organized across
implementation units. G++ has an implicit instantiation mechanism that
should work just fine for standard-conforming code.
<br><dt><code>-fstrict-prototype</code><dt><code>-fno-strict-prototype</code><dd>Previously it was possible to use an empty prototype parameter list to
indicate an unspecified number of parameters (like C), rather than no
parameters, as C++ demands. This feature has been removed, except where
it is required for backwards compatibility. See <a href="Backwards-Compatibility.html#Backwards-Compatibility">Backwards Compatibility</a>.
</dl>
<p>G++ allows a virtual function returning &lsquo;<samp><span class="samp">void *</span></samp>&rsquo; to be overridden
by one returning a different pointer type. This extension to the
covariant return type rules is now deprecated and will be removed from a
future version.
<p>The G++ minimum and maximum operators (&lsquo;<samp><span class="samp">&lt;?</span></samp>&rsquo; and &lsquo;<samp><span class="samp">&gt;?</span></samp>&rsquo;) and
their compound forms (&lsquo;<samp><span class="samp">&lt;?=</span></samp>&rsquo;) and &lsquo;<samp><span class="samp">&gt;?=</span></samp>&rsquo;) have been deprecated
and are now removed from G++. Code using these operators should be
modified to use <code>std::min</code> and <code>std::max</code> instead.
<p>The named return value extension has been deprecated, and is now
removed from G++.
<p>The use of initializer lists with new expressions has been deprecated,
and is now removed from G++.
<p>Floating and complex non-type template parameters have been deprecated,
and are now removed from G++.
<p>The implicit typename extension has been deprecated and is now
removed from G++.
<p>The use of default arguments in function pointers, function typedefs
and other places where they are not permitted by the standard is
deprecated and will be removed from a future version of G++.
<p>G++ allows floating-point literals to appear in integral constant expressions,
e.g. &lsquo;<samp><span class="samp"> enum E { e = int(2.2 * 3.7) } </span></samp>&rsquo;
This extension is deprecated and will be removed from a future version.
<p>G++ allows static data members of const floating-point type to be declared
with an initializer in a class definition. The standard only allows
initializers for static members of const integral types and const
enumeration types so this extension has been deprecated and will be removed
from a future version.
</body></html>

View file

@ -0,0 +1,161 @@
<html lang="en">
<head>
<title>Designated Inits - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Compound-Literals.html#Compound-Literals" title="Compound Literals">
<link rel="next" href="Case-Ranges.html#Case-Ranges" title="Case Ranges">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Designated-Inits"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Case-Ranges.html#Case-Ranges">Case Ranges</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Compound-Literals.html#Compound-Literals">Compound Literals</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.26 Designated Initializers</h3>
<p><a name="index-initializers-with-labeled-elements-2556"></a><a name="index-labeled-elements-in-initializers-2557"></a><a name="index-case-labels-in-initializers-2558"></a><a name="index-designated-initializers-2559"></a>
Standard C90 requires the elements of an initializer to appear in a fixed
order, the same as the order of the elements in the array or structure
being initialized.
<p>In ISO C99 you can give the elements in any order, specifying the array
indices or structure field names they apply to, and GNU C allows this as
an extension in C90 mode as well. This extension is not
implemented in GNU C++.
<p>To specify an array index, write
&lsquo;<samp><span class="samp">[</span><var>index</var><span class="samp">] =</span></samp>&rsquo; before the element value. For example,
<pre class="smallexample"> int a[6] = { [4] = 29, [2] = 15 };
</pre>
<p class="noindent">is equivalent to
<pre class="smallexample"> int a[6] = { 0, 0, 15, 0, 29, 0 };
</pre>
<p class="noindent">The index values must be constant expressions, even if the array being
initialized is automatic.
<p>An alternative syntax for this that has been obsolete since GCC 2.5 but
GCC still accepts is to write &lsquo;<samp><span class="samp">[</span><var>index</var><span class="samp">]</span></samp>&rsquo; before the element
value, with no &lsquo;<samp><span class="samp">=</span></samp>&rsquo;.
<p>To initialize a range of elements to the same value, write
&lsquo;<samp><span class="samp">[</span><var>first</var><span class="samp"> ... </span><var>last</var><span class="samp">] = </span><var>value</var></samp>&rsquo;. This is a GNU
extension. For example,
<pre class="smallexample"> int widths[] = { [0 ... 9] = 1, [10 ... 99] = 2, [100] = 3 };
</pre>
<p class="noindent">If the value in it has side-effects, the side-effects happen only once,
not for each initialized field by the range initializer.
<p class="noindent">Note that the length of the array is the highest value specified
plus one.
<p>In a structure initializer, specify the name of a field to initialize
with &lsquo;<samp><span class="samp">.</span><var>fieldname</var><span class="samp"> =</span></samp>&rsquo; before the element value. For example,
given the following structure,
<pre class="smallexample"> struct point { int x, y; };
</pre>
<p class="noindent">the following initialization
<pre class="smallexample"> struct point p = { .y = yvalue, .x = xvalue };
</pre>
<p class="noindent">is equivalent to
<pre class="smallexample"> struct point p = { xvalue, yvalue };
</pre>
<p>Another syntax that has the same meaning, obsolete since GCC 2.5, is
&lsquo;<samp><var>fieldname</var><span class="samp">:</span></samp>&rsquo;, as shown here:
<pre class="smallexample"> struct point p = { y: yvalue, x: xvalue };
</pre>
<p><a name="index-designators-2560"></a>The &lsquo;<samp><span class="samp">[</span><var>index</var><span class="samp">]</span></samp>&rsquo; or &lsquo;<samp><span class="samp">.</span><var>fieldname</var></samp>&rsquo; is known as a
<dfn>designator</dfn>. You can also use a designator (or the obsolete colon
syntax) when initializing a union, to specify which element of the union
should be used. For example,
<pre class="smallexample"> union foo { int i; double d; };
union foo f = { .d = 4 };
</pre>
<p class="noindent">converts 4 to a <code>double</code> to store it in the union using
the second element. By contrast, casting 4 to type <code>union foo</code>
stores it into the union as the integer <code>i</code>, since it is
an integer. (See <a href="Cast-to-Union.html#Cast-to-Union">Cast to Union</a>.)
<p>You can combine this technique of naming elements with ordinary C
initialization of successive elements. Each initializer element that
does not have a designator applies to the next consecutive element of the
array or structure. For example,
<pre class="smallexample"> int a[6] = { [1] = v1, v2, [4] = v4 };
</pre>
<p class="noindent">is equivalent to
<pre class="smallexample"> int a[6] = { 0, v1, v2, 0, v4, 0 };
</pre>
<p>Labeling the elements of an array initializer is especially useful
when the indices are characters or belong to an <code>enum</code> type.
For example:
<pre class="smallexample"> int whitespace[256]
= { [' '] = 1, ['\t'] = 1, ['\h'] = 1,
['\f'] = 1, ['\n'] = 1, ['\r'] = 1 };
</pre>
<p><a name="index-designator-lists-2561"></a>You can also write a series of &lsquo;<samp><span class="samp">.</span><var>fieldname</var></samp>&rsquo; and
&lsquo;<samp><span class="samp">[</span><var>index</var><span class="samp">]</span></samp>&rsquo; designators before an &lsquo;<samp><span class="samp">=</span></samp>&rsquo; to specify a
nested subobject to initialize; the list is taken relative to the
subobject corresponding to the closest surrounding brace pair. For
example, with the &lsquo;<samp><span class="samp">struct point</span></samp>&rsquo; declaration above:
<pre class="smallexample"> struct point ptarray[10] = { [2].y = yv2, [2].x = xv2, [0].x = xv0 };
</pre>
<p class="noindent">If the same field is initialized multiple times, it has the value from
the last initialization. If any such overridden initialization has
side-effect, it is unspecified whether the side-effect happens or not.
Currently, GCC discards them and issues a warning.
</body></html>

View file

@ -0,0 +1,130 @@
<html lang="en">
<head>
<title>Diagnostic Pragmas - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Pragmas.html#Pragmas" title="Pragmas">
<link rel="prev" href="Weak-Pragmas.html#Weak-Pragmas" title="Weak Pragmas">
<link rel="next" href="Visibility-Pragmas.html#Visibility-Pragmas" title="Visibility Pragmas">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Diagnostic-Pragmas"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Visibility-Pragmas.html#Visibility-Pragmas">Visibility Pragmas</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Weak-Pragmas.html#Weak-Pragmas">Weak Pragmas</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Pragmas.html#Pragmas">Pragmas</a>
<hr>
</div>
<h4 class="subsection">6.58.10 Diagnostic Pragmas</h4>
<p>GCC allows the user to selectively enable or disable certain types of
diagnostics, and change the kind of the diagnostic. For example, a
project's policy might require that all sources compile with
<samp><span class="option">-Werror</span></samp> but certain files might have exceptions allowing
specific types of warnings. Or, a project might selectively enable
diagnostics and treat them as errors depending on which preprocessor
macros are defined.
<dl>
<dt><code>#pragma GCC diagnostic </code><var>kind</var> <var>option</var><dd><a name="index-pragma_002c-diagnostic-3480"></a>
Modifies the disposition of a diagnostic. Note that not all
diagnostics are modifiable; at the moment only warnings (normally
controlled by &lsquo;<samp><span class="samp">-W...</span></samp>&rsquo;) can be controlled, and not all of them.
Use <samp><span class="option">-fdiagnostics-show-option</span></samp> to determine which diagnostics
are controllable and which option controls them.
<p><var>kind</var> is &lsquo;<samp><span class="samp">error</span></samp>&rsquo; to treat this diagnostic as an error,
&lsquo;<samp><span class="samp">warning</span></samp>&rsquo; to treat it like a warning (even if <samp><span class="option">-Werror</span></samp> is
in effect), or &lsquo;<samp><span class="samp">ignored</span></samp>&rsquo; if the diagnostic is to be ignored.
<var>option</var> is a double quoted string that matches the command-line
option.
<pre class="smallexample"> #pragma GCC diagnostic warning "-Wformat"
#pragma GCC diagnostic error "-Wformat"
#pragma GCC diagnostic ignored "-Wformat"
</pre>
<p>Note that these pragmas override any command-line options. GCC keeps
track of the location of each pragma, and issues diagnostics according
to the state as of that point in the source file. Thus, pragmas occurring
after a line do not affect diagnostics caused by that line.
<br><dt><code>#pragma GCC diagnostic push</code><dt><code>#pragma GCC diagnostic pop</code><dd>
Causes GCC to remember the state of the diagnostics as of each
<code>push</code>, and restore to that point at each <code>pop</code>. If a
<code>pop</code> has no matching <code>push</code>, the command-line options are
restored.
<pre class="smallexample"> #pragma GCC diagnostic error "-Wuninitialized"
foo(a); /* error is given for this one */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
foo(b); /* no diagnostic for this one */
#pragma GCC diagnostic pop
foo(c); /* error is given for this one */
#pragma GCC diagnostic pop
foo(d); /* depends on command-line options */
</pre>
</dl>
<p>GCC also offers a simple mechanism for printing messages during
compilation.
<dl>
<dt><code>#pragma message </code><var>string</var><dd><a name="index-pragma_002c-diagnostic-3481"></a>
Prints <var>string</var> as a compiler message on compilation. The message
is informational only, and is neither a compilation warning nor an error.
<pre class="smallexample"> #pragma message "Compiling " __FILE__ "..."
</pre>
<p><var>string</var> may be parenthesized, and is printed with location
information. For example,
<pre class="smallexample"> #define DO_PRAGMA(x) _Pragma (#x)
#define TODO(x) DO_PRAGMA(message ("TODO - " #x))
TODO(Remember to fix this)
</pre>
<p class="noindent">prints &lsquo;<samp><span class="samp">/tmp/file.c:4: note: #pragma message:
TODO - Remember to fix this</span></samp>&rsquo;.
</dl>
</body></html>

View file

@ -0,0 +1,94 @@
<html lang="en">
<head>
<title>Directly-mapped Integer Functions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="FR_002dV-Built_002din-Functions.html#FR_002dV-Built_002din-Functions" title="FR-V Built-in Functions">
<link rel="prev" href="Argument-Types.html#Argument-Types" title="Argument Types">
<link rel="next" href="Directly_002dmapped-Media-Functions.html#Directly_002dmapped-Media-Functions" title="Directly-mapped Media Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Directly-mapped-Integer-Functions"></a>
<a name="Directly_002dmapped-Integer-Functions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Directly_002dmapped-Media-Functions.html#Directly_002dmapped-Media-Functions">Directly-mapped Media Functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Argument-Types.html#Argument-Types">Argument Types</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="FR_002dV-Built_002din-Functions.html#FR_002dV-Built_002din-Functions">FR-V Built-in Functions</a>
<hr>
</div>
<h5 class="subsubsection">6.56.6.2 Directly-mapped Integer Functions</h5>
<p>The functions listed below map directly to FR-V I-type instructions.
<p><table summary=""><tr align="left"><td valign="top" width="45%">Function prototype </td><td valign="top" width="32%">Example usage </td><td valign="top" width="23%">Assembly output
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __ADDSS (sw1, sw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __ADDSS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>ADDSS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __SCAN (sw1, sw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __SCAN (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>SCAN </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __SCUTSS (sw1)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __SCUTSS (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>SCUTSS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __SLASS (sw1, sw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __SLASS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>SLASS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __SMASS (sw1, sw1)</code>
</td><td valign="top" width="32%"><code>__SMASS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>SMASS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __SMSSS (sw1, sw1)</code>
</td><td valign="top" width="32%"><code>__SMSSS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>SMSSS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __SMU (sw1, sw1)</code>
</td><td valign="top" width="32%"><code>__SMU (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>SMU </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw2 __SMUL (sw1, sw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __SMUL (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>SMUL </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __SUBSS (sw1, sw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __SUBSS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>SUBSS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __UMUL (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __UMUL (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>UMUL </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr></table>
</body></html>

View file

@ -0,0 +1,328 @@
<html lang="en">
<head>
<title>Directly-mapped Media Functions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="FR_002dV-Built_002din-Functions.html#FR_002dV-Built_002din-Functions" title="FR-V Built-in Functions">
<link rel="prev" href="Directly_002dmapped-Integer-Functions.html#Directly_002dmapped-Integer-Functions" title="Directly-mapped Integer Functions">
<link rel="next" href="Raw-read_002fwrite-Functions.html#Raw-read_002fwrite-Functions" title="Raw read/write Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Directly-mapped-Media-Functions"></a>
<a name="Directly_002dmapped-Media-Functions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Raw-read_002fwrite-Functions.html#Raw-read_002fwrite-Functions">Raw read/write Functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Directly_002dmapped-Integer-Functions.html#Directly_002dmapped-Integer-Functions">Directly-mapped Integer Functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="FR_002dV-Built_002din-Functions.html#FR_002dV-Built_002din-Functions">FR-V Built-in Functions</a>
<hr>
</div>
<h5 class="subsubsection">6.56.6.3 Directly-mapped Media Functions</h5>
<p>The functions listed below map directly to FR-V M-type instructions.
<p><table summary=""><tr align="left"><td valign="top" width="45%">Function prototype </td><td valign="top" width="32%">Example usage </td><td valign="top" width="23%">Assembly output
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MABSHS (sw1)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MABSHS (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MABSHS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MADDACCS (acc, acc)</code>
</td><td valign="top" width="32%"><code>__MADDACCS (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MADDACCS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __MADDHSS (sw1, sw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MADDHSS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MADDHSS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MADDHUS (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MADDHUS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MADDHUS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MAND (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MAND (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MAND </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MASACCS (acc, acc)</code>
</td><td valign="top" width="32%"><code>__MASACCS (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MASACCS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MAVEH (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MAVEH (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MAVEH </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __MBTOH (uw1)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MBTOH (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MBTOH </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MBTOHE (uw1 *, uw1)</code>
</td><td valign="top" width="32%"><code>__MBTOHE (&amp;</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MBTOHE </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MCLRACC (acc)</code>
</td><td valign="top" width="32%"><code>__MCLRACC (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MCLRACC </code><var>a</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MCLRACCA (void)</code>
</td><td valign="top" width="32%"><code>__MCLRACCA ()</code>
</td><td valign="top" width="23%"><code>MCLRACCA</code>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __Mcop1 (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __Mcop1 (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>Mcop1 </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __Mcop2 (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __Mcop2 (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>Mcop2 </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MCPLHI (uw2, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MCPLHI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MCPLHI </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MCPLI (uw2, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MCPLI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MCPLI </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MCPXIS (acc, sw1, sw1)</code>
</td><td valign="top" width="32%"><code>__MCPXIS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MCPXIS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MCPXIU (acc, uw1, uw1)</code>
</td><td valign="top" width="32%"><code>__MCPXIU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MCPXIU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MCPXRS (acc, sw1, sw1)</code>
</td><td valign="top" width="32%"><code>__MCPXRS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MCPXRS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MCPXRU (acc, uw1, uw1)</code>
</td><td valign="top" width="32%"><code>__MCPXRU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MCPXRU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MCUT (acc, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MCUT (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MCUT </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MCUTSS (acc, sw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MCUTSS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MCUTSS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MDADDACCS (acc, acc)</code>
</td><td valign="top" width="32%"><code>__MDADDACCS (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MDADDACCS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MDASACCS (acc, acc)</code>
</td><td valign="top" width="32%"><code>__MDASACCS (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MDASACCS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __MDCUTSSI (acc, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MDCUTSSI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MDCUTSSI </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __MDPACKH (uw2, uw2)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MDPACKH (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MDPACKH </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __MDROTLI (uw2, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MDROTLI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MDROTLI </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MDSUBACCS (acc, acc)</code>
</td><td valign="top" width="32%"><code>__MDSUBACCS (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MDSUBACCS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MDUNPACKH (uw1 *, uw2)</code>
</td><td valign="top" width="32%"><code>__MDUNPACKH (&amp;</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MDUNPACKH </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __MEXPDHD (uw1, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MEXPDHD (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MEXPDHD </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MEXPDHW (uw1, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MEXPDHW (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MEXPDHW </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MHDSETH (uw1, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MHDSETH (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MHDSETH </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __MHDSETS (const)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MHDSETS (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MHDSETS #</code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MHSETHIH (uw1, const)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MHSETHIH (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MHSETHIH #</code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __MHSETHIS (sw1, const)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MHSETHIS (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MHSETHIS #</code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MHSETLOH (uw1, const)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MHSETLOH (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MHSETLOH #</code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __MHSETLOS (sw1, const)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MHSETLOS (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MHSETLOS #</code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MHTOB (uw2)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MHTOB (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MHTOB </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MMACHS (acc, sw1, sw1)</code>
</td><td valign="top" width="32%"><code>__MMACHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MMACHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MMACHU (acc, uw1, uw1)</code>
</td><td valign="top" width="32%"><code>__MMACHU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MMACHU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MMRDHS (acc, sw1, sw1)</code>
</td><td valign="top" width="32%"><code>__MMRDHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MMRDHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MMRDHU (acc, uw1, uw1)</code>
</td><td valign="top" width="32%"><code>__MMRDHU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MMRDHU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MMULHS (acc, sw1, sw1)</code>
</td><td valign="top" width="32%"><code>__MMULHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MMULHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MMULHU (acc, uw1, uw1)</code>
</td><td valign="top" width="32%"><code>__MMULHU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MMULHU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MMULXHS (acc, sw1, sw1)</code>
</td><td valign="top" width="32%"><code>__MMULXHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MMULXHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MMULXHU (acc, uw1, uw1)</code>
</td><td valign="top" width="32%"><code>__MMULXHU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MMULXHU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MNOT (uw1)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MNOT (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MNOT </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MOR (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MOR (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MOR </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MPACKH (uh, uh)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MPACKH (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MPACKH </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw2 __MQADDHSS (sw2, sw2)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MQADDHSS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQADDHSS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __MQADDHUS (uw2, uw2)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MQADDHUS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQADDHUS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQCPXIS (acc, sw2, sw2)</code>
</td><td valign="top" width="32%"><code>__MQCPXIS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQCPXIS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQCPXIU (acc, uw2, uw2)</code>
</td><td valign="top" width="32%"><code>__MQCPXIU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQCPXIU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQCPXRS (acc, sw2, sw2)</code>
</td><td valign="top" width="32%"><code>__MQCPXRS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQCPXRS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQCPXRU (acc, uw2, uw2)</code>
</td><td valign="top" width="32%"><code>__MQCPXRU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQCPXRU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw2 __MQLCLRHS (sw2, sw2)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MQLCLRHS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQLCLRHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw2 __MQLMTHS (sw2, sw2)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MQLMTHS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQLMTHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQMACHS (acc, sw2, sw2)</code>
</td><td valign="top" width="32%"><code>__MQMACHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQMACHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQMACHU (acc, uw2, uw2)</code>
</td><td valign="top" width="32%"><code>__MQMACHU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQMACHU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQMACXHS (acc, sw2, sw2)</code>
</td><td valign="top" width="32%"><code>__MQMACXHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQMACXHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQMULHS (acc, sw2, sw2)</code>
</td><td valign="top" width="32%"><code>__MQMULHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQMULHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQMULHU (acc, uw2, uw2)</code>
</td><td valign="top" width="32%"><code>__MQMULHU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQMULHU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQMULXHS (acc, sw2, sw2)</code>
</td><td valign="top" width="32%"><code>__MQMULXHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQMULXHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQMULXHU (acc, uw2, uw2)</code>
</td><td valign="top" width="32%"><code>__MQMULXHU (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQMULXHU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw2 __MQSATHS (sw2, sw2)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MQSATHS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQSATHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __MQSLLHI (uw2, int)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MQSLLHI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQSLLHI </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw2 __MQSRAHI (sw2, int)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MQSRAHI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQSRAHI </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw2 __MQSUBHSS (sw2, sw2)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MQSUBHSS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQSUBHSS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __MQSUBHUS (uw2, uw2)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MQSUBHUS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQSUBHUS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQXMACHS (acc, sw2, sw2)</code>
</td><td valign="top" width="32%"><code>__MQXMACHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQXMACHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MQXMACXHS (acc, sw2, sw2)</code>
</td><td valign="top" width="32%"><code>__MQXMACXHS (</code><var>c</var><code>, </code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MQXMACXHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MRDACC (acc)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MRDACC (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MRDACC </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MRDACCG (acc)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MRDACCG (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MRDACCG </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MROTLI (uw1, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MROTLI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MROTLI </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MROTRI (uw1, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MROTRI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MROTRI </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __MSATHS (sw1, sw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MSATHS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MSATHS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MSATHU (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MSATHU (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MSATHU </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MSLLHI (uw1, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MSLLHI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MSLLHI </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __MSRAHI (sw1, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MSRAHI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MSRAHI </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MSRLHI (uw1, const)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MSRLHI (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MSRLHI </code><var>a</var><code>,#</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MSUBACCS (acc, acc)</code>
</td><td valign="top" width="32%"><code>__MSUBACCS (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MSUBACCS </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>sw1 __MSUBHSS (sw1, sw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MSUBHSS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MSUBHSS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MSUBHUS (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MSUBHUS (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MSUBHUS </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MTRAP (void)</code>
</td><td valign="top" width="32%"><code>__MTRAP ()</code>
</td><td valign="top" width="23%"><code>MTRAP</code>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw2 __MUNPACKH (uw1)</code>
</td><td valign="top" width="32%"><var>b</var><code> = __MUNPACKH (</code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MUNPACKH </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MWCUT (uw2, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MWCUT (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MWCUT </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MWTACC (acc, uw1)</code>
</td><td valign="top" width="32%"><code>__MWTACC (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MWTACC </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>void __MWTACCG (acc, uw1)</code>
</td><td valign="top" width="32%"><code>__MWTACCG (</code><var>b</var><code>, </code><var>a</var><code>)</code>
</td><td valign="top" width="23%"><code>MWTACCG </code><var>a</var><code>,</code><var>b</var>
<br></td></tr><tr align="left"><td valign="top" width="45%"><code>uw1 __MXOR (uw1, uw1)</code>
</td><td valign="top" width="32%"><var>c</var><code> = __MXOR (</code><var>a</var><code>, </code><var>b</var><code>)</code>
</td><td valign="top" width="23%"><code>MXOR </code><var>a</var><code>,</code><var>b</var><code>,</code><var>c</var>
<br></td></tr></table>
</body></html>

View file

@ -0,0 +1,187 @@
<html lang="en">
<head>
<title>Directory Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC">
<link rel="prev" href="Link-Options.html#Link-Options" title="Link Options">
<link rel="next" href="Spec-Files.html#Spec-Files" title="Spec Files">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Directory-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Spec-Files.html#Spec-Files">Spec Files</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Link-Options.html#Link-Options">Link Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking-GCC">Invoking GCC</a>
<hr>
</div>
<h3 class="section">3.14 Options for Directory Search</h3>
<p><a name="index-directory-options-1057"></a><a name="index-options_002c-directory-search-1058"></a><a name="index-search-path-1059"></a>
These options specify directories to search for header files, for
libraries and for parts of the compiler:
<dl>
<dt><code>-I</code><var>dir</var><dd><a name="index-I-1060"></a>Add the directory <var>dir</var> to the head of the list of directories to be
searched for header files. This can be used to override a system header
file, substituting your own version, since these directories are
searched before the system header file directories. However, you should
not use this option to add directories that contain vendor-supplied
system header files (use <samp><span class="option">-isystem</span></samp> for that). If you use more than
one <samp><span class="option">-I</span></samp> option, the directories are scanned in left-to-right
order; the standard system directories come after.
<p>If a standard system include directory, or a directory specified with
<samp><span class="option">-isystem</span></samp>, is also specified with <samp><span class="option">-I</span></samp>, the <samp><span class="option">-I</span></samp>
option is ignored. The directory is still searched but as a
system directory at its normal position in the system include chain.
This is to ensure that GCC's procedure to fix buggy system headers and
the ordering for the <code>include_next</code> directive are not inadvertently changed.
If you really need to change the search order for system directories,
use the <samp><span class="option">-nostdinc</span></samp> and/or <samp><span class="option">-isystem</span></samp> options.
<br><dt><code>-iplugindir=</code><var>dir</var><dd>Set the directory to search for plugins that are passed
by <samp><span class="option">-fplugin=</span><var>name</var></samp> instead of
<samp><span class="option">-fplugin=</span><var>path</var><span class="option">/</span><var>name</var><span class="option">.so</span></samp>. This option is not meant
to be used by the user, but only passed by the driver.
<br><dt><code>-iquote</code><var>dir</var><dd><a name="index-iquote-1061"></a>Add the directory <var>dir</var> to the head of the list of directories to
be searched for header files only for the case of &lsquo;<samp><span class="samp">#include
"</span><var>file</var><span class="samp">"</span></samp>&rsquo;; they are not searched for &lsquo;<samp><span class="samp">#include &lt;</span><var>file</var><span class="samp">&gt;</span></samp>&rsquo;,
otherwise just like <samp><span class="option">-I</span></samp>.
<br><dt><code>-L</code><var>dir</var><dd><a name="index-L-1062"></a>Add directory <var>dir</var> to the list of directories to be searched
for <samp><span class="option">-l</span></samp>.
<br><dt><code>-B</code><var>prefix</var><dd><a name="index-B-1063"></a>This option specifies where to find the executables, libraries,
include files, and data files of the compiler itself.
<p>The compiler driver program runs one or more of the subprograms
<samp><span class="command">cpp</span></samp>, <samp><span class="command">cc1</span></samp>, <samp><span class="command">as</span></samp> and <samp><span class="command">ld</span></samp>. It tries
<var>prefix</var> as a prefix for each program it tries to run, both with and
without &lsquo;<samp><var>machine</var><span class="samp">/</span><var>version</var><span class="samp">/</span></samp>&rsquo; (see <a href="Target-Options.html#Target-Options">Target Options</a>).
<p>For each subprogram to be run, the compiler driver first tries the
<samp><span class="option">-B</span></samp> prefix, if any. If that name is not found, or if <samp><span class="option">-B</span></samp>
is not specified, the driver tries two standard prefixes,
<samp><span class="file">/usr/lib/gcc/</span></samp> and <samp><span class="file">/usr/local/lib/gcc/</span></samp>. If neither of
those results in a file name that is found, the unmodified program
name is searched for using the directories specified in your
<samp><span class="env">PATH</span></samp> environment variable.
<p>The compiler checks to see if the path provided by the <samp><span class="option">-B</span></samp>
refers to a directory, and if necessary it adds a directory
separator character at the end of the path.
<p><samp><span class="option">-B</span></samp> prefixes that effectively specify directory names also apply
to libraries in the linker, because the compiler translates these
options into <samp><span class="option">-L</span></samp> options for the linker. They also apply to
includes files in the preprocessor, because the compiler translates these
options into <samp><span class="option">-isystem</span></samp> options for the preprocessor. In this case,
the compiler appends &lsquo;<samp><span class="samp">include</span></samp>&rsquo; to the prefix.
<p>The runtime support file <samp><span class="file">libgcc.a</span></samp> can also be searched for using
the <samp><span class="option">-B</span></samp> prefix, if needed. If it is not found there, the two
standard prefixes above are tried, and that is all. The file is left
out of the link if it is not found by those means.
<p>Another way to specify a prefix much like the <samp><span class="option">-B</span></samp> prefix is to use
the environment variable <samp><span class="env">GCC_EXEC_PREFIX</span></samp>. See <a href="Environment-Variables.html#Environment-Variables">Environment Variables</a>.
<p>As a special kludge, if the path provided by <samp><span class="option">-B</span></samp> is
<samp><span class="file">[dir/]stage</span><var>N</var><span class="file">/</span></samp>, where <var>N</var> is a number in the range 0 to
9, then it is replaced by <samp><span class="file">[dir/]include</span></samp>. This is to help
with boot-strapping the compiler.
<br><dt><code>-specs=</code><var>file</var><dd><a name="index-specs-1064"></a>Process <var>file</var> after the compiler reads in the standard <samp><span class="file">specs</span></samp>
file, in order to override the defaults which the <samp><span class="command">gcc</span></samp> driver
program uses when determining what switches to pass to <samp><span class="command">cc1</span></samp>,
<samp><span class="command">cc1plus</span></samp>, <samp><span class="command">as</span></samp>, <samp><span class="command">ld</span></samp>, etc. More than one
<samp><span class="option">-specs=</span><var>file</var></samp> can be specified on the command line, and they
are processed in order, from left to right.
<br><dt><code>--sysroot=</code><var>dir</var><dd><a name="index-sysroot-1065"></a>Use <var>dir</var> as the logical root directory for headers and libraries.
For example, if the compiler normally searches for headers in
<samp><span class="file">/usr/include</span></samp> and libraries in <samp><span class="file">/usr/lib</span></samp>, it instead
searches <samp><var>dir</var><span class="file">/usr/include</span></samp> and <samp><var>dir</var><span class="file">/usr/lib</span></samp>.
<p>If you use both this option and the <samp><span class="option">-isysroot</span></samp> option, then
the <samp><span class="option">--sysroot</span></samp> option applies to libraries, but the
<samp><span class="option">-isysroot</span></samp> option applies to header files.
<p>The GNU linker (beginning with version 2.16) has the necessary support
for this option. If your linker does not support this option, the
header file aspect of <samp><span class="option">--sysroot</span></samp> still works, but the
library aspect does not.
<br><dt><code>--no-sysroot-suffix</code><dd><a name="index-no_002dsysroot_002dsuffix-1066"></a>For some targets, a suffix is added to the root directory specified
with <samp><span class="option">--sysroot</span></samp>, depending on the other options used, so that
headers may for example be found in
<samp><var>dir</var><span class="file">/</span><var>suffix</var><span class="file">/usr/include</span></samp> instead of
<samp><var>dir</var><span class="file">/usr/include</span></samp>. This option disables the addition of
such a suffix.
<br><dt><code>-I-</code><dd><a name="index-I_002d-1067"></a>This option has been deprecated. Please use <samp><span class="option">-iquote</span></samp> instead for
<samp><span class="option">-I</span></samp> directories before the <samp><span class="option">-I-</span></samp> and remove the <samp><span class="option">-I-</span></samp>.
Any directories you specify with <samp><span class="option">-I</span></samp> options before the <samp><span class="option">-I-</span></samp>
option are searched only for the case of &lsquo;<samp><span class="samp">#include "</span><var>file</var><span class="samp">"</span></samp>&rsquo;;
they are not searched for &lsquo;<samp><span class="samp">#include &lt;</span><var>file</var><span class="samp">&gt;</span></samp>&rsquo;.
<p>If additional directories are specified with <samp><span class="option">-I</span></samp> options after
the <samp><span class="option">-I-</span></samp>, these directories are searched for all &lsquo;<samp><span class="samp">#include</span></samp>&rsquo;
directives. (Ordinarily <em>all</em> <samp><span class="option">-I</span></samp> directories are used
this way.)
<p>In addition, the <samp><span class="option">-I-</span></samp> option inhibits the use of the current
directory (where the current input file came from) as the first search
directory for &lsquo;<samp><span class="samp">#include "</span><var>file</var><span class="samp">"</span></samp>&rsquo;. There is no way to
override this effect of <samp><span class="option">-I-</span></samp>. With <samp><span class="option">-I.</span></samp> you can specify
searching the directory that is current when the compiler is
invoked. That is not exactly the same as what the preprocessor does
by default, but it is often satisfactory.
<p><samp><span class="option">-I-</span></samp> does not inhibit the use of the standard system directories
for header files. Thus, <samp><span class="option">-I-</span></samp> and <samp><span class="option">-nostdinc</span></samp> are
independent.
</dl>
<!-- man end -->
</body></html>

View file

@ -0,0 +1,145 @@
<html lang="en">
<head>
<title>Disappointments - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Trouble.html#Trouble" title="Trouble">
<link rel="prev" href="Standard-Libraries.html#Standard-Libraries" title="Standard Libraries">
<link rel="next" href="C_002b_002b-Misunderstandings.html#C_002b_002b-Misunderstandings" title="C++ Misunderstandings">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Disappointments"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="C_002b_002b-Misunderstandings.html#C_002b_002b-Misunderstandings">C++ Misunderstandings</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Standard-Libraries.html#Standard-Libraries">Standard Libraries</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Trouble.html#Trouble">Trouble</a>
<hr>
</div>
<h3 class="section">11.6 Disappointments and Misunderstandings</h3>
<p>These problems are perhaps regrettable, but we don't know any practical
way around them.
<ul>
<li>Certain local variables aren't recognized by debuggers when you compile
with optimization.
<p>This occurs because sometimes GCC optimizes the variable out of
existence. There is no way to tell the debugger how to compute the
value such a variable &ldquo;would have had&rdquo;, and it is not clear that would
be desirable anyway. So GCC simply does not mention the eliminated
variable when it writes debugging information.
<p>You have to expect a certain amount of disagreement between the
executable and your source code, when you use optimization.
<p><a name="index-conflicting-types-3569"></a><a name="index-scope-of-declaration-3570"></a><li>Users often think it is a bug when GCC reports an error for code
like this:
<pre class="smallexample"> int foo (struct mumble *);
struct mumble { ... };
int foo (struct mumble *x)
{ ... }
</pre>
<p>This code really is erroneous, because the scope of <code>struct
mumble</code> in the prototype is limited to the argument list containing it.
It does not refer to the <code>struct mumble</code> defined with file scope
immediately below&mdash;they are two unrelated types with similar names in
different scopes.
<p>But in the definition of <code>foo</code>, the file-scope type is used
because that is available to be inherited. Thus, the definition and
the prototype do not match, and you get an error.
<p>This behavior may seem silly, but it's what the ISO standard specifies.
It is easy enough for you to make your code work by moving the
definition of <code>struct mumble</code> above the prototype. It's not worth
being incompatible with ISO C just to avoid an error for the example
shown above.
<li>Accesses to bit-fields even in volatile objects works by accessing larger
objects, such as a byte or a word. You cannot rely on what size of
object is accessed in order to read or write the bit-field; it may even
vary for a given bit-field according to the precise usage.
<p>If you care about controlling the amount of memory that is accessed, use
volatile but do not use bit-fields.
<li>GCC comes with shell scripts to fix certain known problems in system
header files. They install corrected copies of various header files in
a special directory where only GCC will normally look for them. The
scripts adapt to various systems by searching all the system header
files for the problem cases that we know about.
<p>If new system header files are installed, nothing automatically arranges
to update the corrected header files. They can be updated using the
<samp><span class="command">mkheaders</span></samp> script installed in
<samp><var>libexecdir</var><span class="file">/gcc/</span><var>target</var><span class="file">/</span><var>version</var><span class="file">/install-tools/</span></samp>.
<li><a name="index-floating-point-precision-3571"></a>On 68000 and x86 systems, for instance, you can get paradoxical results
if you test the precise values of floating point numbers. For example,
you can find that a floating point value which is not a NaN is not equal
to itself. This results from the fact that the floating point registers
hold a few more bits of precision than fit in a <code>double</code> in memory.
Compiled code moves values between memory and floating point registers
at its convenience, and moving them into memory truncates them.
<p><a name="index-ffloat_002dstore-3572"></a>You can partially avoid this problem by using the <samp><span class="option">-ffloat-store</span></samp>
option (see <a href="Optimize-Options.html#Optimize-Options">Optimize Options</a>).
<li>On AIX and other platforms without weak symbol support, templates
need to be instantiated explicitly and symbols for static members
of templates will not be generated.
<li>On AIX, GCC scans object files and library archives for static
constructors and destructors when linking an application before the
linker prunes unreferenced symbols. This is necessary to prevent the
AIX linker from mistakenly assuming that static constructor or
destructor are unused and removing them before the scanning can occur.
All static constructors and destructors found will be referenced even
though the modules in which they occur may not be used by the program.
This may lead to both increased executable size and unexpected symbol
references.
</ul>
</body></html>

View file

@ -0,0 +1,64 @@
<html lang="en">
<head>
<title>Dollar Signs - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="C_002b_002b-Comments.html#C_002b_002b-Comments" title="C++ Comments">
<link rel="next" href="Character-Escapes.html#Character-Escapes" title="Character Escapes">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Dollar-Signs"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Character-Escapes.html#Character-Escapes">Character Escapes</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="C_002b_002b-Comments.html#C_002b_002b-Comments">C++ Comments</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.34 Dollar Signs in Identifier Names</h3>
<p><a name="index-g_t_0024-2758"></a><a name="index-dollar-signs-in-identifier-names-2759"></a><a name="index-identifier-names_002c-dollar-signs-in-2760"></a>
In GNU C, you may normally use dollar signs in identifier names.
This is because many traditional C implementations allow such identifiers.
However, dollar signs in identifiers are not supported on a few target
machines, typically because the target assembler does not allow them.
</body></html>

View file

@ -0,0 +1,95 @@
<html lang="en">
<head>
<title>Dynamically registering methods - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Messaging-with-the-GNU-Objective_002dC-runtime.html#Messaging-with-the-GNU-Objective_002dC-runtime" title="Messaging with the GNU Objective-C runtime">
<link rel="next" href="Forwarding-hook.html#Forwarding-hook" title="Forwarding hook">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Dynamically-registering-methods"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Forwarding-hook.html#Forwarding-hook">Forwarding hook</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Messaging-with-the-GNU-Objective_002dC-runtime.html#Messaging-with-the-GNU-Objective_002dC-runtime">Messaging with the GNU Objective-C runtime</a>
<hr>
</div>
<h4 class="subsection">8.10.1 Dynamically registering methods</h4>
<p>If <code>objc_msg_lookup()</code> does not find a suitable method
implementation, because the receiver does not implement the required
method, it tries to see if the class can dynamically register the
method.
<p>To do so, the runtime checks if the class of the receiver implements
the method
<pre class="smallexample"> + (BOOL) resolveInstanceMethod: (SEL)selector;
</pre>
<p>in the case of an instance method, or
<pre class="smallexample"> + (BOOL) resolveClassMethod: (SEL)selector;
</pre>
<p>in the case of a class method. If the class implements it, the
runtime invokes it, passing as argument the selector of the original
method, and if it returns <code>YES</code>, the runtime tries the lookup
again, which could now succeed if a matching method was added
dynamically by <code>+resolveInstanceMethod:</code> or
<code>+resolveClassMethod:</code>.
<p>This allows classes to dynamically register methods (by adding them to
the class using <code>class_addMethod</code>) when they are first called.
To do so, a class should implement <code>+resolveInstanceMethod:</code> (or,
depending on the case, <code>+resolveClassMethod:</code>) and have it
recognize the selectors of methods that can be registered dynamically
at runtime, register them, and return <code>YES</code>. It should return
<code>NO</code> for methods that it does not dynamically registered at
runtime.
<p>If <code>+resolveInstanceMethod:</code> (or <code>+resolveClassMethod:</code>) is
not implemented or returns <code>NO</code>, the runtime then tries the
forwarding hook.
<p>Support for <code>+resolveInstanceMethod:</code> and
<code>resolveClassMethod:</code> was added to the GNU Objective-C runtime in
GCC version 4.6.
<!-- ========================================================================= -->
</body></html>

View file

@ -0,0 +1,68 @@
<html lang="en">
<head>
<title>Empty Structures - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Zero-Length.html#Zero-Length" title="Zero Length">
<link rel="next" href="Variable-Length.html#Variable-Length" title="Variable Length">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Empty-Structures"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Variable-Length.html#Variable-Length">Variable Length</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Zero-Length.html#Zero-Length">Zero Length</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.18 Structures With No Members</h3>
<p><a name="index-empty-structures-2525"></a><a name="index-zero_002dsize-structures-2526"></a>
GCC permits a C structure to have no members:
<pre class="smallexample"> struct empty {
};
</pre>
<p>The structure has size zero. In C++, empty structures are part
of the language. G++ treats empty structures as if they had a single
member of type <code>char</code>.
</body></html>

View file

@ -0,0 +1,238 @@
<html lang="en">
<head>
<title>Environment Variables - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC">
<link rel="prev" href="Code-Gen-Options.html#Code-Gen-Options" title="Code Gen Options">
<link rel="next" href="Precompiled-Headers.html#Precompiled-Headers" title="Precompiled Headers">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Environment-Variables"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Precompiled-Headers.html#Precompiled-Headers">Precompiled Headers</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Code-Gen-Options.html#Code-Gen-Options">Code Gen Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking-GCC">Invoking GCC</a>
<hr>
</div>
<h3 class="section">3.19 Environment Variables Affecting GCC</h3>
<p><a name="index-environment-variables-2374"></a>
<!-- man begin ENVIRONMENT -->
This section describes several environment variables that affect how GCC
operates. Some of them work by specifying directories or prefixes to use
when searching for various kinds of files. Some are used to specify other
aspects of the compilation environment.
<p>Note that you can also specify places to search using options such as
<samp><span class="option">-B</span></samp>, <samp><span class="option">-I</span></samp> and <samp><span class="option">-L</span></samp> (see <a href="Directory-Options.html#Directory-Options">Directory Options</a>). These
take precedence over places specified using environment variables, which
in turn take precedence over those specified by the configuration of GCC.
See <a href="../gccint/Driver.html#Driver">Controlling the Compilation Driver <samp><span class="file">gcc</span></samp></a>.
<dl>
<dt><samp><span class="env">LANG</span></samp><dt><samp><span class="env">LC_CTYPE</span></samp><dd><!-- @itemx LC_COLLATE -->
<dt><samp><span class="env">LC_MESSAGES</span></samp><dd><!-- @itemx LC_MONETARY -->
<!-- @itemx LC_NUMERIC -->
<!-- @itemx LC_TIME -->
<dt><samp><span class="env">LC_ALL</span></samp><dd><a name="index-LANG-2375"></a><a name="index-LC_005fCTYPE-2376"></a><!-- @findex LC_COLLATE -->
<a name="index-LC_005fMESSAGES-2377"></a><!-- @findex LC_MONETARY -->
<!-- @findex LC_NUMERIC -->
<!-- @findex LC_TIME -->
<a name="index-LC_005fALL-2378"></a><a name="index-locale-2379"></a>These environment variables control the way that GCC uses
localization information which allows GCC to work with different
national conventions. GCC inspects the locale categories
<samp><span class="env">LC_CTYPE</span></samp> and <samp><span class="env">LC_MESSAGES</span></samp> if it has been configured to do
so. These locale categories can be set to any value supported by your
installation. A typical value is &lsquo;<samp><span class="samp">en_GB.UTF-8</span></samp>&rsquo; for English in the United
Kingdom encoded in UTF-8.
<p>The <samp><span class="env">LC_CTYPE</span></samp> environment variable specifies character
classification. GCC uses it to determine the character boundaries in
a string; this is needed for some multibyte encodings that contain quote
and escape characters that are otherwise interpreted as a string
end or escape.
<p>The <samp><span class="env">LC_MESSAGES</span></samp> environment variable specifies the language to
use in diagnostic messages.
<p>If the <samp><span class="env">LC_ALL</span></samp> environment variable is set, it overrides the value
of <samp><span class="env">LC_CTYPE</span></samp> and <samp><span class="env">LC_MESSAGES</span></samp>; otherwise, <samp><span class="env">LC_CTYPE</span></samp>
and <samp><span class="env">LC_MESSAGES</span></samp> default to the value of the <samp><span class="env">LANG</span></samp>
environment variable. If none of these variables are set, GCC
defaults to traditional C English behavior.
<br><dt><samp><span class="env">TMPDIR</span></samp><dd><a name="index-TMPDIR-2380"></a>If <samp><span class="env">TMPDIR</span></samp> is set, it specifies the directory to use for temporary
files. GCC uses temporary files to hold the output of one stage of
compilation which is to be used as input to the next stage: for example,
the output of the preprocessor, which is the input to the compiler
proper.
<br><dt><samp><span class="env">GCC_COMPARE_DEBUG</span></samp><dd><a name="index-GCC_005fCOMPARE_005fDEBUG-2381"></a>Setting <samp><span class="env">GCC_COMPARE_DEBUG</span></samp> is nearly equivalent to passing
<samp><span class="option">-fcompare-debug</span></samp> to the compiler driver. See the documentation
of this option for more details.
<br><dt><samp><span class="env">GCC_EXEC_PREFIX</span></samp><dd><a name="index-GCC_005fEXEC_005fPREFIX-2382"></a>If <samp><span class="env">GCC_EXEC_PREFIX</span></samp> is set, it specifies a prefix to use in the
names of the subprograms executed by the compiler. No slash is added
when this prefix is combined with the name of a subprogram, but you can
specify a prefix that ends with a slash if you wish.
<p>If <samp><span class="env">GCC_EXEC_PREFIX</span></samp> is not set, GCC attempts to figure out
an appropriate prefix to use based on the pathname it is invoked with.
<p>If GCC cannot find the subprogram using the specified prefix, it
tries looking in the usual places for the subprogram.
<p>The default value of <samp><span class="env">GCC_EXEC_PREFIX</span></samp> is
<samp><var>prefix</var><span class="file">/lib/gcc/</span></samp> where <var>prefix</var> is the prefix to
the installed compiler. In many cases <var>prefix</var> is the value
of <code>prefix</code> when you ran the <samp><span class="file">configure</span></samp> script.
<p>Other prefixes specified with <samp><span class="option">-B</span></samp> take precedence over this prefix.
<p>This prefix is also used for finding files such as <samp><span class="file">crt0.o</span></samp> that are
used for linking.
<p>In addition, the prefix is used in an unusual way in finding the
directories to search for header files. For each of the standard
directories whose name normally begins with &lsquo;<samp><span class="samp">/usr/local/lib/gcc</span></samp>&rsquo;
(more precisely, with the value of <samp><span class="env">GCC_INCLUDE_DIR</span></samp>), GCC tries
replacing that beginning with the specified prefix to produce an
alternate directory name. Thus, with <samp><span class="option">-Bfoo/</span></samp>, GCC searches
<samp><span class="file">foo/bar</span></samp> just before it searches the standard directory
<samp><span class="file">/usr/local/lib/bar</span></samp>.
If a standard directory begins with the configured
<var>prefix</var> then the value of <var>prefix</var> is replaced by
<samp><span class="env">GCC_EXEC_PREFIX</span></samp> when looking for header files.
<br><dt><samp><span class="env">COMPILER_PATH</span></samp><dd><a name="index-COMPILER_005fPATH-2383"></a>The value of <samp><span class="env">COMPILER_PATH</span></samp> is a colon-separated list of
directories, much like <samp><span class="env">PATH</span></samp>. GCC tries the directories thus
specified when searching for subprograms, if it can't find the
subprograms using <samp><span class="env">GCC_EXEC_PREFIX</span></samp>.
<br><dt><samp><span class="env">LIBRARY_PATH</span></samp><dd><a name="index-LIBRARY_005fPATH-2384"></a>The value of <samp><span class="env">LIBRARY_PATH</span></samp> is a colon-separated list of
directories, much like <samp><span class="env">PATH</span></samp>. When configured as a native compiler,
GCC tries the directories thus specified when searching for special
linker files, if it can't find them using <samp><span class="env">GCC_EXEC_PREFIX</span></samp>. Linking
using GCC also uses these directories when searching for ordinary
libraries for the <samp><span class="option">-l</span></samp> option (but directories specified with
<samp><span class="option">-L</span></samp> come first).
<br><dt><samp><span class="env">LANG</span></samp><dd><a name="index-LANG-2385"></a><a name="index-locale-definition-2386"></a>This variable is used to pass locale information to the compiler. One way in
which this information is used is to determine the character set to be used
when character literals, string literals and comments are parsed in C and C++.
When the compiler is configured to allow multibyte characters,
the following values for <samp><span class="env">LANG</span></samp> are recognized:
<dl>
<dt>&lsquo;<samp><span class="samp">C-JIS</span></samp>&rsquo;<dd>Recognize JIS characters.
<br><dt>&lsquo;<samp><span class="samp">C-SJIS</span></samp>&rsquo;<dd>Recognize SJIS characters.
<br><dt>&lsquo;<samp><span class="samp">C-EUCJP</span></samp>&rsquo;<dd>Recognize EUCJP characters.
</dl>
<p>If <samp><span class="env">LANG</span></samp> is not defined, or if it has some other value, then the
compiler uses <code>mblen</code> and <code>mbtowc</code> as defined by the default locale to
recognize and translate multibyte characters.
</dl>
<p class="noindent">Some additional environment variables affect the behavior of the
preprocessor.
<!-- Copyright (C) 1999-2013 Free Software Foundation, Inc. -->
<!-- This is part of the CPP and GCC manuals. -->
<!-- For copying conditions, see the file gcc.texi. -->
<!-- -->
<!-- Environment variables affecting the preprocessor -->
<!-- -->
<!-- If this file is included with the flag ``cppmanual'' set, it is -->
<!-- formatted for inclusion in the CPP manual; otherwise the main GCC manual. -->
<dl>
<dt><samp><span class="env">CPATH</span></samp><a name="index-CPATH-2387"></a><dt><samp><span class="env">C_INCLUDE_PATH</span></samp><a name="index-C_005fINCLUDE_005fPATH-2388"></a><dt><samp><span class="env">CPLUS_INCLUDE_PATH</span></samp><a name="index-CPLUS_005fINCLUDE_005fPATH-2389"></a><dt><samp><span class="env">OBJC_INCLUDE_PATH</span></samp><a name="index-OBJC_005fINCLUDE_005fPATH-2390"></a><dd><!-- Commented out until ObjC++ is part of GCC: -->
<!-- @itemx OBJCPLUS_INCLUDE_PATH -->
Each variable's value is a list of directories separated by a special
character, much like <samp><span class="env">PATH</span></samp>, in which to look for header files.
The special character, <code>PATH_SEPARATOR</code>, is target-dependent and
determined at GCC build time. For Microsoft Windows-based targets it is a
semicolon, and for almost all other targets it is a colon.
<p><samp><span class="env">CPATH</span></samp> specifies a list of directories to be searched as if
specified with <samp><span class="option">-I</span></samp>, but after any paths given with <samp><span class="option">-I</span></samp>
options on the command line. This environment variable is used
regardless of which language is being preprocessed.
<p>The remaining environment variables apply only when preprocessing the
particular language indicated. Each specifies a list of directories
to be searched as if specified with <samp><span class="option">-isystem</span></samp>, but after any
paths given with <samp><span class="option">-isystem</span></samp> options on the command line.
<p>In all these variables, an empty element instructs the compiler to
search its current working directory. Empty elements can appear at the
beginning or end of a path. For instance, if the value of
<samp><span class="env">CPATH</span></samp> is <code>:/special/include</code>, that has the same
effect as &lsquo;<samp><span class="samp">-I.&nbsp;-I/special/include<!-- /@w --></span></samp>&rsquo;.
<!-- man end -->
<!-- man begin ENVIRONMENT -->
<br><dt><samp><span class="env">DEPENDENCIES_OUTPUT</span></samp><a name="index-DEPENDENCIES_005fOUTPUT-2391"></a><dd><a name="index-dependencies-for-make-as-output-2392"></a>If this variable is set, its value specifies how to output
dependencies for Make based on the non-system header files processed
by the compiler. System header files are ignored in the dependency
output.
<p>The value of <samp><span class="env">DEPENDENCIES_OUTPUT</span></samp> can be just a file name, in
which case the Make rules are written to that file, guessing the target
name from the source file name. Or the value can have the form
&lsquo;<samp><var>file</var> <var>target</var></samp>&rsquo;, in which case the rules are written to
file <var>file</var> using <var>target</var> as the target name.
<p>In other words, this environment variable is equivalent to combining
the options <samp><span class="option">-MM</span></samp> and <samp><span class="option">-MF</span></samp>
(see <a href="Preprocessor-Options.html#Preprocessor-Options">Preprocessor Options</a>),
with an optional <samp><span class="option">-MT</span></samp> switch too.
<br><dt><samp><span class="env">SUNPRO_DEPENDENCIES</span></samp><a name="index-SUNPRO_005fDEPENDENCIES-2393"></a><dd><a name="index-dependencies-for-make-as-output-2394"></a>This variable is the same as <samp><span class="env">DEPENDENCIES_OUTPUT</span></samp> (see above),
except that system header files are not ignored, so it implies
<samp><span class="option">-M</span></samp> rather than <samp><span class="option">-MM</span></samp>. However, the dependence on the
main input file is omitted.
See <a href="Preprocessor-Options.html#Preprocessor-Options">Preprocessor Options</a>.
</dl>
<!-- man end -->
</body></html>

View file

@ -0,0 +1,69 @@
<html lang="en">
<head>
<title>Environment implementation - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Implementation.html#C-Implementation" title="C Implementation">
<link rel="prev" href="Translation-implementation.html#Translation-implementation" title="Translation implementation">
<link rel="next" href="Identifiers-implementation.html#Identifiers-implementation" title="Identifiers implementation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Environment-implementation"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Identifiers-implementation.html#Identifiers-implementation">Identifiers implementation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Translation-implementation.html#Translation-implementation">Translation implementation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Implementation.html#C-Implementation">C Implementation</a>
<hr>
</div>
<h3 class="section">4.2 Environment</h3>
<p>The behavior of most of these points are dependent on the implementation
of the C library, and are not defined by GCC itself.
<ul>
<li><cite>The mapping between physical source file multibyte characters
and the source character set in translation phase 1 (C90 and C99 5.1.1.2).</cite>
<p>See <a href="../cpp/Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">Implementation-defined behavior</a>.
</ul>
</body></html>

View file

@ -0,0 +1,70 @@
<html lang="en">
<head>
<title>Escaped Newlines - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Variadic-Macros.html#Variadic-Macros" title="Variadic Macros">
<link rel="next" href="Subscripting.html#Subscripting" title="Subscripting">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Escaped-Newlines"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Subscripting.html#Subscripting">Subscripting</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Variadic-Macros.html#Variadic-Macros">Variadic Macros</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.21 Slightly Looser Rules for Escaped Newlines</h3>
<p><a name="index-escaped-newlines-2539"></a><a name="index-newlines-_0028escaped_0029-2540"></a>
Recently, the preprocessor has relaxed its treatment of escaped
newlines. Previously, the newline had to immediately follow a
backslash. The current implementation allows whitespace in the form
of spaces, horizontal and vertical tabs, and form feeds between the
backslash and the subsequent newline. The preprocessor issues a
warning, but treats it as a valid escaped newline and combines the two
lines to form a single logical line. This works within comments and
tokens, as well as between tokens. Comments are <em>not</em> treated as
whitespace for the purposes of this relaxation, since they have not
yet been replaced with spaces.
</body></html>

View file

@ -0,0 +1 @@
<meta http-equiv="refresh" content="0; url=Extended-Asm.html#Example%20of%20asm%20with%20clobbered%20asm%20reg">

View file

@ -0,0 +1,68 @@
<html lang="en">
<head>
<title>Exception handling - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002b_002b-Implementation.html#C_002b_002b-Implementation" title="C++ Implementation">
<link rel="prev" href="Conditionally_002dsupported-behavior.html#Conditionally_002dsupported-behavior" title="Conditionally-supported behavior">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Exception-handling"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Conditionally_002dsupported-behavior.html#Conditionally_002dsupported-behavior">Conditionally-supported behavior</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002b_002b-Implementation.html#C_002b_002b-Implementation">C++ Implementation</a>
<hr>
</div>
<h3 class="section">5.2 Exception handling</h3>
<ul>
<li><cite>In the situation where no matching handler is found, it is
implementation-defined whether or not the stack is unwound before
std::terminate() is called (C++98 15.5.1).</cite>
<p>The stack is not unwound before std::terminate is called.
</ul>
<!-- Copyright (C) 1988-2013 Free Software Foundation, Inc. -->
<!-- This is part of the GCC manual. -->
<!-- For copying conditions, see the file gcc.texi. -->
</body></html>

View file

@ -0,0 +1,129 @@
<html lang="en">
<head>
<title>Exceptions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Objective_002dC.html#Objective_002dC" title="Objective-C">
<link rel="prev" href="compatibility_005falias.html#compatibility_005falias" title="compatibility_alias">
<link rel="next" href="Synchronization.html#Synchronization" title="Synchronization">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Exceptions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Synchronization.html#Synchronization">Synchronization</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="compatibility_005falias.html#compatibility_005falias">compatibility_alias</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Objective_002dC.html#Objective_002dC">Objective-C</a>
<hr>
</div>
<h3 class="section">8.7 Exceptions</h3>
<p>GNU Objective-C provides exception support built into the language, as
in the following example:
<pre class="smallexample"> @try {
...
@throw expr;
...
}
@catch (AnObjCClass *exc) {
...
@throw expr;
...
@throw;
...
}
@catch (AnotherClass *exc) {
...
}
@catch (id allOthers) {
...
}
@finally {
...
@throw expr;
...
}
</pre>
<p>The <code>@throw</code> statement may appear anywhere in an Objective-C or
Objective-C++ program; when used inside of a <code>@catch</code> block, the
<code>@throw</code> may appear without an argument (as shown above), in
which case the object caught by the <code>@catch</code> will be rethrown.
<p>Note that only (pointers to) Objective-C objects may be thrown and
caught using this scheme. When an object is thrown, it will be caught
by the nearest <code>@catch</code> clause capable of handling objects of
that type, analogously to how <code>catch</code> blocks work in C++ and
Java. A <code>@catch(id ...)</code> clause (as shown above) may also
be provided to catch any and all Objective-C exceptions not caught by
previous <code>@catch</code> clauses (if any).
<p>The <code>@finally</code> clause, if present, will be executed upon exit
from the immediately preceding <code>@try ... @catch</code> section.
This will happen regardless of whether any exceptions are thrown,
caught or rethrown inside the <code>@try ... @catch</code> section,
analogously to the behavior of the <code>finally</code> clause in Java.
<p>There are several caveats to using the new exception mechanism:
<ul>
<li>The <samp><span class="option">-fobjc-exceptions</span></samp> command line option must be used when
compiling Objective-C files that use exceptions.
<li>With the GNU runtime, exceptions are always implemented as &ldquo;native&rdquo;
exceptions and it is recommended that the <samp><span class="option">-fexceptions</span></samp> and
<samp><span class="option">-shared-libgcc</span></samp> options are used when linking.
<li>With the NeXT runtime, although currently designed to be binary
compatible with <code>NS_HANDLER</code>-style idioms provided by the
<code>NSException</code> class, the new exceptions can only be used on Mac
OS X 10.3 (Panther) and later systems, due to additional functionality
needed in the NeXT Objective-C runtime.
<li>As mentioned above, the new exceptions do not support handling
types other than Objective-C objects. Furthermore, when used from
Objective-C++, the Objective-C exception model does not interoperate with C++
exceptions at this time. This means you cannot <code>@throw</code> an exception
from Objective-C and <code>catch</code> it in C++, or vice versa
(i.e., <code>throw ... @catch</code>).
</ul>
<!-- ========================================================================= -->
</body></html>

View file

@ -0,0 +1,134 @@
<html lang="en">
<head>
<title>Executing code before main - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Objective_002dC.html#Objective_002dC" title="Objective-C">
<link rel="prev" href="GNU-Objective_002dC-runtime-API.html#GNU-Objective_002dC-runtime-API" title="GNU Objective-C runtime API">
<link rel="next" href="Type-encoding.html#Type-encoding" title="Type encoding">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Executing-code-before-main"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Type-encoding.html#Type-encoding">Type encoding</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="GNU-Objective_002dC-runtime-API.html#GNU-Objective_002dC-runtime-API">GNU Objective-C runtime API</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Objective_002dC.html#Objective_002dC">Objective-C</a>
<hr>
</div>
<h3 class="section">8.2 <code>+load</code>: Executing code before main</h3>
<p>This section is specific for the GNU Objective-C runtime. If you are
using a different runtime, you can skip it.
<p>The GNU Objective-C runtime provides a way that allows you to execute
code before the execution of the program enters the <code>main</code>
function. The code is executed on a per-class and a per-category basis,
through a special class method <code>+load</code>.
<p>This facility is very useful if you want to initialize global variables
which can be accessed by the program directly, without sending a message
to the class first. The usual way to initialize global variables, in the
<code>+initialize</code> method, might not be useful because
<code>+initialize</code> is only called when the first message is sent to a
class object, which in some cases could be too late.
<p>Suppose for example you have a <code>FileStream</code> class that declares
<code>Stdin</code>, <code>Stdout</code> and <code>Stderr</code> as global variables, like
below:
<pre class="smallexample">
FileStream *Stdin = nil;
FileStream *Stdout = nil;
FileStream *Stderr = nil;
@implementation FileStream
+ (void)initialize
{
Stdin = [[FileStream new] initWithFd:0];
Stdout = [[FileStream new] initWithFd:1];
Stderr = [[FileStream new] initWithFd:2];
}
/* <span class="roman">Other methods here</span> */
@end
</pre>
<p>In this example, the initialization of <code>Stdin</code>, <code>Stdout</code> and
<code>Stderr</code> in <code>+initialize</code> occurs too late. The programmer can
send a message to one of these objects before the variables are actually
initialized, thus sending messages to the <code>nil</code> object. The
<code>+initialize</code> method which actually initializes the global
variables is not invoked until the first message is sent to the class
object. The solution would require these variables to be initialized
just before entering <code>main</code>.
<p>The correct solution of the above problem is to use the <code>+load</code>
method instead of <code>+initialize</code>:
<pre class="smallexample">
@implementation FileStream
+ (void)load
{
Stdin = [[FileStream new] initWithFd:0];
Stdout = [[FileStream new] initWithFd:1];
Stderr = [[FileStream new] initWithFd:2];
}
/* <span class="roman">Other methods here</span> */
@end
</pre>
<p>The <code>+load</code> is a method that is not overridden by categories. If a
class and a category of it both implement <code>+load</code>, both methods are
invoked. This allows some additional initializations to be performed in
a category.
<p>This mechanism is not intended to be a replacement for <code>+initialize</code>.
You should be aware of its limitations when you decide to use it
instead of <code>+initialize</code>.
<ul class="menu">
<li><a accesskey="1" href="What-you-can-and-what-you-cannot-do-in-_002bload.html#What-you-can-and-what-you-cannot-do-in-_002bload">What you can and what you cannot do in +load</a>
</ul>
</body></html>

View file

@ -0,0 +1,90 @@
<html lang="en">
<head>
<title>Explicit Reg Vars - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Asm-Labels.html#Asm-Labels" title="Asm Labels">
<link rel="next" href="Alternate-Keywords.html#Alternate-Keywords" title="Alternate Keywords">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Explicit-Reg-Vars"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Alternate-Keywords.html#Alternate-Keywords">Alternate Keywords</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Asm-Labels.html#Asm-Labels">Asm Labels</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.44 Variables in Specified Registers</h3>
<p><a name="index-explicit-register-variables-2870"></a><a name="index-variables-in-specified-registers-2871"></a><a name="index-specified-registers-2872"></a><a name="index-registers_002c-global-allocation-2873"></a>
GNU C allows you to put a few global variables into specified hardware
registers. You can also specify the register in which an ordinary
register variable should be allocated.
<ul>
<li>Global register variables reserve registers throughout the program.
This may be useful in programs such as programming language
interpreters that have a couple of global variables that are accessed
very often.
<li>Local register variables in specific registers do not reserve the
registers, except at the point where they are used as input or output
operands in an <code>asm</code> statement and the <code>asm</code> statement itself is
not deleted. The compiler's data flow analysis is capable of determining
where the specified registers contain live values, and where they are
available for other uses. Stores into local register variables may be deleted
when they appear to be dead according to dataflow analysis. References
to local register variables may be deleted or moved or simplified.
<p>These local variables are sometimes convenient for use with the extended
<code>asm</code> feature (see <a href="Extended-Asm.html#Extended-Asm">Extended Asm</a>), if you want to write one
output of the assembler instruction directly into a particular register.
(This works provided the register you specify fits the constraints
specified for that operand in the <code>asm</code>.)
</ul>
<ul class="menu">
<li><a accesskey="1" href="Global-Reg-Vars.html#Global-Reg-Vars">Global Reg Vars</a>
<li><a accesskey="2" href="Local-Reg-Vars.html#Local-Reg-Vars">Local Reg Vars</a>
</ul>
</body></html>

View file

@ -0,0 +1,569 @@
<html lang="en">
<head>
<title>Extended Asm - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Volatiles.html#Volatiles" title="Volatiles">
<link rel="next" href="Constraints.html#Constraints" title="Constraints">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Extended-Asm"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Constraints.html#Constraints">Constraints</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Volatiles.html#Volatiles">Volatiles</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.41 Assembler Instructions with C Expression Operands</h3>
<p><a name="index-extended-_0040code_007basm_007d-2810"></a><a name="index-g_t_0040code_007basm_007d-expressions-2811"></a><a name="index-assembler-instructions-2812"></a><a name="index-registers-2813"></a>
In an assembler instruction using <code>asm</code>, you can specify the
operands of the instruction using C expressions. This means you need not
guess which registers or memory locations contain the data you want
to use.
<p>You must specify an assembler instruction template much like what
appears in a machine description, plus an operand constraint string for
each operand.
<p>For example, here is how to use the 68881's <code>fsinx</code> instruction:
<pre class="smallexample"> asm ("fsinx %1,%0" : "=f" (result) : "f" (angle));
</pre>
<p class="noindent">Here <code>angle</code> is the C expression for the input operand while
<code>result</code> is that of the output operand. Each has &lsquo;<samp><span class="samp">"f"</span></samp>&rsquo; as its
operand constraint, saying that a floating-point register is required.
The &lsquo;<samp><span class="samp">=</span></samp>&rsquo; in &lsquo;<samp><span class="samp">=f</span></samp>&rsquo; indicates that the operand is an output; all
output operands' constraints must use &lsquo;<samp><span class="samp">=</span></samp>&rsquo;. The constraints use the
same language used in the machine description (see <a href="Constraints.html#Constraints">Constraints</a>).
<p>Each operand is described by an operand-constraint string followed by
the C expression in parentheses. A colon separates the assembler
template from the first output operand and another separates the last
output operand from the first input, if any. Commas separate the
operands within each group. The total number of operands is currently
limited to 30; this limitation may be lifted in some future version of
GCC.
<p>If there are no output operands but there are input operands, you must
place two consecutive colons surrounding the place where the output
operands would go.
<p>As of GCC version 3.1, it is also possible to specify input and output
operands using symbolic names which can be referenced within the
assembler code. These names are specified inside square brackets
preceding the constraint string, and can be referenced inside the
assembler code using <code>%[</code><var>name</var><code>]</code> instead of a percentage sign
followed by the operand number. Using named operands the above example
could look like:
<pre class="smallexample"> asm ("fsinx %[angle],%[output]"
: [output] "=f" (result)
: [angle] "f" (angle));
</pre>
<p class="noindent">Note that the symbolic operand names have no relation whatsoever to
other C identifiers. You may use any name you like, even those of
existing C symbols, but you must ensure that no two operands within the same
assembler construct use the same symbolic name.
<p>Output operand expressions must be lvalues; the compiler can check this.
The input operands need not be lvalues. The compiler cannot check
whether the operands have data types that are reasonable for the
instruction being executed. It does not parse the assembler instruction
template and does not know what it means or even whether it is valid
assembler input. The extended <code>asm</code> feature is most often used for
machine instructions the compiler itself does not know exist. If
the output expression cannot be directly addressed (for example, it is a
bit-field), your constraint must allow a register. In that case, GCC
uses the register as the output of the <code>asm</code>, and then stores
that register into the output.
<p>The ordinary output operands must be write-only; GCC assumes that
the values in these operands before the instruction are dead and need
not be generated. Extended asm supports input-output or read-write
operands. Use the constraint character &lsquo;<samp><span class="samp">+</span></samp>&rsquo; to indicate such an
operand and list it with the output operands.
<p>You may, as an alternative, logically split its function into two
separate operands, one input operand and one write-only output
operand. The connection between them is expressed by constraints
that say they need to be in the same location when the instruction
executes. You can use the same C expression for both operands, or
different expressions. For example, here we write the (fictitious)
&lsquo;<samp><span class="samp">combine</span></samp>&rsquo; instruction with <code>bar</code> as its read-only source
operand and <code>foo</code> as its read-write destination:
<pre class="smallexample"> asm ("combine %2,%0" : "=r" (foo) : "0" (foo), "g" (bar));
</pre>
<p class="noindent">The constraint &lsquo;<samp><span class="samp">"0"</span></samp>&rsquo; for operand 1 says that it must occupy the
same location as operand 0. A number in constraint is allowed only in
an input operand and it must refer to an output operand.
<p>Only a number in the constraint can guarantee that one operand is in
the same place as another. The mere fact that <code>foo</code> is the value
of both operands is not enough to guarantee that they are in the
same place in the generated assembler code. The following does not
work reliably:
<pre class="smallexample"> asm ("combine %2,%0" : "=r" (foo) : "r" (foo), "g" (bar));
</pre>
<p>Various optimizations or reloading could cause operands 0 and 1 to be in
different registers; GCC knows no reason not to do so. For example, the
compiler might find a copy of the value of <code>foo</code> in one register and
use it for operand 1, but generate the output operand 0 in a different
register (copying it afterward to <code>foo</code>'s own address). Of course,
since the register for operand 1 is not even mentioned in the assembler
code, the result will not work, but GCC can't tell that.
<p>As of GCC version 3.1, one may write <code>[</code><var>name</var><code>]</code> instead of
the operand number for a matching constraint. For example:
<pre class="smallexample"> asm ("cmoveq %1,%2,%[result]"
: [result] "=r"(result)
: "r" (test), "r"(new), "[result]"(old));
</pre>
<p>Sometimes you need to make an <code>asm</code> operand be a specific register,
but there's no matching constraint letter for that register <em>by
itself</em>. To force the operand into that register, use a local variable
for the operand and specify the register in the variable declaration.
See <a href="Explicit-Reg-Vars.html#Explicit-Reg-Vars">Explicit Reg Vars</a>. Then for the <code>asm</code> operand, use any
register constraint letter that matches the register:
<pre class="smallexample"> register int *p1 asm ("r0") = ...;
register int *p2 asm ("r1") = ...;
register int *result asm ("r0");
asm ("sysint" : "=r" (result) : "0" (p1), "r" (p2));
</pre>
<p><a name="Example-of-asm-with-clobbered-asm-reg"></a>In the above example, beware that a register that is call-clobbered by
the target ABI will be overwritten by any function call in the
assignment, including library calls for arithmetic operators.
Also a register may be clobbered when generating some operations,
like variable shift, memory copy or memory move on x86.
Assuming it is a call-clobbered register, this may happen to <code>r0</code>
above by the assignment to <code>p2</code>. If you have to use such a
register, use temporary variables for expressions between the register
assignment and use:
<pre class="smallexample"> int t1 = ...;
register int *p1 asm ("r0") = ...;
register int *p2 asm ("r1") = t1;
register int *result asm ("r0");
asm ("sysint" : "=r" (result) : "0" (p1), "r" (p2));
</pre>
<p>Some instructions clobber specific hard registers. To describe this,
write a third colon after the input operands, followed by the names of
the clobbered hard registers (given as strings). Here is a realistic
example for the VAX:
<pre class="smallexample"> asm volatile ("movc3 %0,%1,%2"
: /* <span class="roman">no outputs</span> */
: "g" (from), "g" (to), "g" (count)
: "r0", "r1", "r2", "r3", "r4", "r5");
</pre>
<p>You may not write a clobber description in a way that overlaps with an
input or output operand. For example, you may not have an operand
describing a register class with one member if you mention that register
in the clobber list. Variables declared to live in specific registers
(see <a href="Explicit-Reg-Vars.html#Explicit-Reg-Vars">Explicit Reg Vars</a>), and used as asm input or output operands must
have no part mentioned in the clobber description.
There is no way for you to specify that an input
operand is modified without also specifying it as an output
operand. Note that if all the output operands you specify are for this
purpose (and hence unused), you then also need to specify
<code>volatile</code> for the <code>asm</code> construct, as described below, to
prevent GCC from deleting the <code>asm</code> statement as unused.
<p>If you refer to a particular hardware register from the assembler code,
you probably have to list the register after the third colon to
tell the compiler the register's value is modified. In some assemblers,
the register names begin with &lsquo;<samp><span class="samp">%</span></samp>&rsquo;; to produce one &lsquo;<samp><span class="samp">%</span></samp>&rsquo; in the
assembler code, you must write &lsquo;<samp><span class="samp">%%</span></samp>&rsquo; in the input.
<p>If your assembler instruction can alter the condition code register, add
&lsquo;<samp><span class="samp">cc</span></samp>&rsquo; to the list of clobbered registers. GCC on some machines
represents the condition codes as a specific hardware register;
&lsquo;<samp><span class="samp">cc</span></samp>&rsquo; serves to name this register. On other machines, the
condition code is handled differently, and specifying &lsquo;<samp><span class="samp">cc</span></samp>&rsquo; has no
effect. But it is valid no matter what the machine.
<p>If your assembler instructions access memory in an unpredictable
fashion, add &lsquo;<samp><span class="samp">memory</span></samp>&rsquo; to the list of clobbered registers. This
causes GCC to not keep memory values cached in registers across the
assembler instruction and not optimize stores or loads to that memory.
You also should add the <code>volatile</code> keyword if the memory
affected is not listed in the inputs or outputs of the <code>asm</code>, as
the &lsquo;<samp><span class="samp">memory</span></samp>&rsquo; clobber does not count as a side-effect of the
<code>asm</code>. If you know how large the accessed memory is, you can add
it as input or output but if this is not known, you should add
&lsquo;<samp><span class="samp">memory</span></samp>&rsquo;. As an example, if you access ten bytes of a string, you
can use a memory input like:
<pre class="smallexample"> {"m"( ({ struct { char x[10]; } *p = (void *)ptr ; *p; }) )}.
</pre>
<p>Note that in the following example the memory input is necessary,
otherwise GCC might optimize the store to <code>x</code> away:
<pre class="smallexample"> int foo ()
{
int x = 42;
int *y = &amp;x;
int result;
asm ("magic stuff accessing an 'int' pointed to by '%1'"
: "=&amp;d" (r) : "a" (y), "m" (*y));
return result;
}
</pre>
<p>You can put multiple assembler instructions together in a single
<code>asm</code> template, separated by the characters normally used in assembly
code for the system. A combination that works in most places is a newline
to break the line, plus a tab character to move to the instruction field
(written as &lsquo;<samp><span class="samp">\n\t</span></samp>&rsquo;). Sometimes semicolons can be used, if the
assembler allows semicolons as a line-breaking character. Note that some
assembler dialects use semicolons to start a comment.
The input operands are guaranteed not to use any of the clobbered
registers, and neither do the output operands' addresses, so you can
read and write the clobbered registers as many times as you like. Here
is an example of multiple instructions in a template; it assumes the
subroutine <code>_foo</code> accepts arguments in registers 9 and 10:
<pre class="smallexample"> asm ("movl %0,r9\n\tmovl %1,r10\n\tcall _foo"
: /* no outputs */
: "g" (from), "g" (to)
: "r9", "r10");
</pre>
<p>Unless an output operand has the &lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo; constraint modifier, GCC
may allocate it in the same register as an unrelated input operand, on
the assumption the inputs are consumed before the outputs are produced.
This assumption may be false if the assembler code actually consists of
more than one instruction. In such a case, use &lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo; for each output
operand that may not overlap an input. See <a href="Modifiers.html#Modifiers">Modifiers</a>.
<p>If you want to test the condition code produced by an assembler
instruction, you must include a branch and a label in the <code>asm</code>
construct, as follows:
<pre class="smallexample"> asm ("clr %0\n\tfrob %1\n\tbeq 0f\n\tmov #1,%0\n0:"
: "g" (result)
: "g" (input));
</pre>
<p class="noindent">This assumes your assembler supports local labels, as the GNU assembler
and most Unix assemblers do.
<p>Speaking of labels, jumps from one <code>asm</code> to another are not
supported. The compiler's optimizers do not know about these jumps, and
therefore they cannot take account of them when deciding how to
optimize. See <a href="Extended-asm-with-goto.html#Extended-asm-with-goto">Extended asm with goto</a>.
<p><a name="index-macros-containing-_0040code_007basm_007d-2814"></a>Usually the most convenient way to use these <code>asm</code> instructions is to
encapsulate them in macros that look like functions. For example,
<pre class="smallexample"> #define sin(x) \
({ double __value, __arg = (x); \
asm ("fsinx %1,%0": "=f" (__value): "f" (__arg)); \
__value; })
</pre>
<p class="noindent">Here the variable <code>__arg</code> is used to make sure that the instruction
operates on a proper <code>double</code> value, and to accept only those
arguments <code>x</code> that can convert automatically to a <code>double</code>.
<p>Another way to make sure the instruction operates on the correct data
type is to use a cast in the <code>asm</code>. This is different from using a
variable <code>__arg</code> in that it converts more different types. For
example, if the desired type is <code>int</code>, casting the argument to
<code>int</code> accepts a pointer with no complaint, while assigning the
argument to an <code>int</code> variable named <code>__arg</code> warns about
using a pointer unless the caller explicitly casts it.
<p>If an <code>asm</code> has output operands, GCC assumes for optimization
purposes the instruction has no side effects except to change the output
operands. This does not mean instructions with a side effect cannot be
used, but you must be careful, because the compiler may eliminate them
if the output operands aren't used, or move them out of loops, or
replace two with one if they constitute a common subexpression. Also,
if your instruction does have a side effect on a variable that otherwise
appears not to change, the old value of the variable may be reused later
if it happens to be found in a register.
<p>You can prevent an <code>asm</code> instruction from being deleted
by writing the keyword <code>volatile</code> after
the <code>asm</code>. For example:
<pre class="smallexample"> #define get_and_set_priority(new) \
({ int __old; \
asm volatile ("get_and_set_priority %0, %1" \
: "=g" (__old) : "g" (new)); \
__old; })
</pre>
<p class="noindent">The <code>volatile</code> keyword indicates that the instruction has
important side-effects. GCC does not delete a volatile <code>asm</code> if
it is reachable. (The instruction can still be deleted if GCC can
prove that control flow never reaches the location of the
instruction.) Note that even a volatile <code>asm</code> instruction
can be moved relative to other code, including across jump
instructions. For example, on many targets there is a system
register that can be set to control the rounding mode of
floating-point operations. You might try
setting it with a volatile <code>asm</code>, like this PowerPC example:
<pre class="smallexample"> asm volatile("mtfsf 255,%0" : : "f" (fpenv));
sum = x + y;
</pre>
<p class="noindent">This does not work reliably, as the compiler may move the addition back
before the volatile <code>asm</code>. To make it work you need to add an
artificial dependency to the <code>asm</code> referencing a variable in the code
you don't want moved, for example:
<pre class="smallexample"> asm volatile ("mtfsf 255,%1" : "=X"(sum): "f"(fpenv));
sum = x + y;
</pre>
<p>Similarly, you can't expect a
sequence of volatile <code>asm</code> instructions to remain perfectly
consecutive. If you want consecutive output, use a single <code>asm</code>.
Also, GCC performs some optimizations across a volatile <code>asm</code>
instruction; GCC does not &ldquo;forget everything&rdquo; when it encounters
a volatile <code>asm</code> instruction the way some other compilers do.
<p>An <code>asm</code> instruction without any output operands is treated
identically to a volatile <code>asm</code> instruction.
<p>It is a natural idea to look for a way to give access to the condition
code left by the assembler instruction. However, when we attempted to
implement this, we found no way to make it work reliably. The problem
is that output operands might need reloading, which result in
additional following &ldquo;store&rdquo; instructions. On most machines, these
instructions alter the condition code before there is time to
test it. This problem doesn't arise for ordinary &ldquo;test&rdquo; and
&ldquo;compare&rdquo; instructions because they don't have any output operands.
<p>For reasons similar to those described above, it is not possible to give
an assembler instruction access to the condition code left by previous
instructions.
<p><a name="Extended-asm-with-goto"></a>As of GCC version 4.5, <code>asm goto</code> may be used to have the assembly
jump to one or more C labels. In this form, a fifth section after the
clobber list contains a list of all C labels to which the assembly may jump.
Each label operand is implicitly self-named. The <code>asm</code> is also assumed
to fall through to the next statement.
<p>This form of <code>asm</code> is restricted to not have outputs. This is due
to a internal restriction in the compiler that control transfer instructions
cannot have outputs. This restriction on <code>asm goto</code> may be lifted
in some future version of the compiler. In the meantime, <code>asm goto</code>
may include a memory clobber, and so leave outputs in memory.
<pre class="smallexample"> int frob(int x)
{
int y;
asm goto ("frob %%r5, %1; jc %l[error]; mov (%2), %%r5"
: : "r"(x), "r"(&amp;y) : "r5", "memory" : error);
return y;
error:
return -1;
}
</pre>
<p class="noindent">In this (inefficient) example, the <code>frob</code> instruction sets the
carry bit to indicate an error. The <code>jc</code> instruction detects
this and branches to the <code>error</code> label. Finally, the output
of the <code>frob</code> instruction (<code>%r5</code>) is stored into the memory
for variable <code>y</code>, which is later read by the <code>return</code> statement.
<pre class="smallexample"> void doit(void)
{
int i = 0;
asm goto ("mfsr %%r1, 123; jmp %%r1;"
".pushsection doit_table;"
".long %l0, %l1, %l2, %l3;"
".popsection"
: : : "r1" : label1, label2, label3, label4);
__builtin_unreachable ();
label1:
f1();
return;
label2:
f2();
return;
label3:
i = 1;
label4:
f3(i);
}
</pre>
<p class="noindent">In this (also inefficient) example, the <code>mfsr</code> instruction reads
an address from some out-of-band machine register, and the following
<code>jmp</code> instruction branches to that address. The address read by
the <code>mfsr</code> instruction is assumed to have been previously set via
some application-specific mechanism to be one of the four values stored
in the <code>doit_table</code> section. Finally, the <code>asm</code> is followed
by a call to <code>__builtin_unreachable</code> to indicate that the <code>asm</code>
does not in fact fall through.
<pre class="smallexample"> #define TRACE1(NUM) \
do { \
asm goto ("0: nop;" \
".pushsection trace_table;" \
".long 0b, %l0;" \
".popsection" \
: : : : trace#NUM); \
if (0) { trace#NUM: trace(); } \
} while (0)
#define TRACE TRACE1(__COUNTER__)
</pre>
<p class="noindent">In this example (which in fact inspired the <code>asm goto</code> feature)
we want on rare occasions to call the <code>trace</code> function; on other
occasions we'd like to keep the overhead to the absolute minimum.
The normal code path consists of a single <code>nop</code> instruction.
However, we record the address of this <code>nop</code> together with the
address of a label that calls the <code>trace</code> function. This allows
the <code>nop</code> instruction to be patched at run time to be an
unconditional branch to the stored label. It is assumed that an
optimizing compiler moves the labeled block out of line, to
optimize the fall through path from the <code>asm</code>.
<p>If you are writing a header file that should be includable in ISO C
programs, write <code>__asm__</code> instead of <code>asm</code>. See <a href="Alternate-Keywords.html#Alternate-Keywords">Alternate Keywords</a>.
<h4 class="subsection">6.41.1 Size of an <code>asm</code></h4>
<p>Some targets require that GCC track the size of each instruction used in
order to generate correct code. Because the final length of an
<code>asm</code> is only known by the assembler, GCC must make an estimate as
to how big it will be. The estimate is formed by counting the number of
statements in the pattern of the <code>asm</code> and multiplying that by the
length of the longest instruction on that processor. Statements in the
<code>asm</code> are identified by newline characters and whatever statement
separator characters are supported by the assembler; on most processors
this is the &lsquo;<samp><span class="samp">;</span></samp>&rsquo; character.
<p>Normally, GCC's estimate is perfectly adequate to ensure that correct
code is generated, but it is possible to confuse the compiler if you use
pseudo instructions or assembler macros that expand into multiple real
instructions or if you use assembler directives that expand to more
space in the object file than is needed for a single instruction.
If this happens then the assembler produces a diagnostic saying that
a label is unreachable.
<h4 class="subsection">6.41.2 i386 floating-point asm operands</h4>
<p>On i386 targets, there are several rules on the usage of stack-like registers
in the operands of an <code>asm</code>. These rules apply only to the operands
that are stack-like registers:
<ol type=1 start=1>
<li>Given a set of input registers that die in an <code>asm</code>, it is
necessary to know which are implicitly popped by the <code>asm</code>, and
which must be explicitly popped by GCC.
<p>An input register that is implicitly popped by the <code>asm</code> must be
explicitly clobbered, unless it is constrained to match an
output operand.
<li>For any input register that is implicitly popped by an <code>asm</code>, it is
necessary to know how to adjust the stack to compensate for the pop.
If any non-popped input is closer to the top of the reg-stack than
the implicitly popped register, it would not be possible to know what the
stack looked like&mdash;it's not clear how the rest of the stack &ldquo;slides
up&rdquo;.
<p>All implicitly popped input registers must be closer to the top of
the reg-stack than any input that is not implicitly popped.
<p>It is possible that if an input dies in an <code>asm</code>, the compiler might
use the input register for an output reload. Consider this example:
<pre class="smallexample"> asm ("foo" : "=t" (a) : "f" (b));
</pre>
<p class="noindent">This code says that input <code>b</code> is not popped by the <code>asm</code>, and that
the <code>asm</code> pushes a result onto the reg-stack, i.e., the stack is one
deeper after the <code>asm</code> than it was before. But, it is possible that
reload may think that it can use the same register for both the input and
the output.
<p>To prevent this from happening,
if any input operand uses the <code>f</code> constraint, all output register
constraints must use the <code>&amp;</code> early-clobber modifier.
<p>The example above would be correctly written as:
<pre class="smallexample"> asm ("foo" : "=&amp;t" (a) : "f" (b));
</pre>
<li>Some operands need to be in particular places on the stack. All
output operands fall in this category&mdash;GCC has no other way to
know which registers the outputs appear in unless you indicate
this in the constraints.
<p>Output operands must specifically indicate which register an output
appears in after an <code>asm</code>. <code>=f</code> is not allowed: the operand
constraints must select a class with a single register.
<li>Output operands may not be &ldquo;inserted&rdquo; between existing stack registers.
Since no 387 opcode uses a read/write operand, all output operands
are dead before the <code>asm</code>, and are pushed by the <code>asm</code>.
It makes no sense to push anywhere but the top of the reg-stack.
<p>Output operands must start at the top of the reg-stack: output
operands may not &ldquo;skip&rdquo; a register.
<li>Some <code>asm</code> statements may need extra stack space for internal
calculations. This can be guaranteed by clobbering stack registers
unrelated to the inputs and outputs.
</ol>
<p>Here are a couple of reasonable <code>asm</code>s to want to write. This
<code>asm</code>
takes one input, which is internally popped, and produces two outputs.
<pre class="smallexample"> asm ("fsincos" : "=t" (cos), "=u" (sin) : "0" (inp));
</pre>
<p class="noindent">This <code>asm</code> takes two inputs, which are popped by the <code>fyl2xp1</code> opcode,
and replaces them with one output. The <code>st(1)</code> clobber is necessary
for the compiler to know that <code>fyl2xp1</code> pops both inputs.
<pre class="smallexample"> asm ("fyl2xp1" : "=t" (result) : "0" (x), "u" (y) : "st(1)");
</pre>
<!-- Copyright (C) 1988-2013 Free Software Foundation, Inc. -->
<!-- This is part of the GCC manual. -->
<!-- For copying conditions, see the file gcc.texi. -->
<!-- Most of this node appears by itself (in a different place) even -->
<!-- when the INTERNALS flag is clear. Passages that require the internals -->
<!-- manual's context are conditionalized to appear only in the internals manual. -->
</body></html>

View file

@ -0,0 +1 @@
<meta http-equiv="refresh" content="0; url=Extended-Asm.html#Extended%20asm%20with%20goto">

View file

@ -0,0 +1,72 @@
<html lang="en">
<head>
<title>FR30 Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="DEC-Alpha-Options.html#DEC-Alpha-Options" title="DEC Alpha Options">
<link rel="next" href="FRV-Options.html#FRV-Options" title="FRV Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="FR30-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="FRV-Options.html#FRV-Options">FRV Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="DEC-Alpha-Options.html#DEC-Alpha-Options">DEC Alpha Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.11 FR30 Options</h4>
<p><a name="index-FR30-Options-1348"></a>
These options are defined specifically for the FR30 port.
<dl>
<dt><code>-msmall-model</code><dd><a name="index-msmall_002dmodel-1349"></a>Use the small address space model. This can produce smaller code, but
it does assume that all symbolic values and addresses fit into a
20-bit range.
<br><dt><code>-mno-lsim</code><dd><a name="index-mno_002dlsim-1350"></a>Assume that runtime support has been provided and so there is no need
to include the simulator library (<samp><span class="file">libsim.a</span></samp>) on the linker
command line.
</dl>
</body></html>

View file

@ -0,0 +1,273 @@
<html lang="en">
<head>
<title>FRV Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="FR30-Options.html#FR30-Options" title="FR30 Options">
<link rel="next" href="GNU_002fLinux-Options.html#GNU_002fLinux-Options" title="GNU/Linux Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="FRV-Options"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="GNU_002fLinux-Options.html#GNU_002fLinux-Options">GNU/Linux Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="FR30-Options.html#FR30-Options">FR30 Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.12 FRV Options</h4>
<p><a name="index-FRV-Options-1351"></a>
<dl>
<dt><code>-mgpr-32</code><dd><a name="index-mgpr_002d32-1352"></a>
Only use the first 32 general-purpose registers.
<br><dt><code>-mgpr-64</code><dd><a name="index-mgpr_002d64-1353"></a>
Use all 64 general-purpose registers.
<br><dt><code>-mfpr-32</code><dd><a name="index-mfpr_002d32-1354"></a>
Use only the first 32 floating-point registers.
<br><dt><code>-mfpr-64</code><dd><a name="index-mfpr_002d64-1355"></a>
Use all 64 floating-point registers.
<br><dt><code>-mhard-float</code><dd><a name="index-mhard_002dfloat-1356"></a>
Use hardware instructions for floating-point operations.
<br><dt><code>-msoft-float</code><dd><a name="index-msoft_002dfloat-1357"></a>
Use library routines for floating-point operations.
<br><dt><code>-malloc-cc</code><dd><a name="index-malloc_002dcc-1358"></a>
Dynamically allocate condition code registers.
<br><dt><code>-mfixed-cc</code><dd><a name="index-mfixed_002dcc-1359"></a>
Do not try to dynamically allocate condition code registers, only
use <code>icc0</code> and <code>fcc0</code>.
<br><dt><code>-mdword</code><dd><a name="index-mdword-1360"></a>
Change ABI to use double word insns.
<br><dt><code>-mno-dword</code><dd><a name="index-mno_002ddword-1361"></a>
Do not use double word instructions.
<br><dt><code>-mdouble</code><dd><a name="index-mdouble-1362"></a>
Use floating-point double instructions.
<br><dt><code>-mno-double</code><dd><a name="index-mno_002ddouble-1363"></a>
Do not use floating-point double instructions.
<br><dt><code>-mmedia</code><dd><a name="index-mmedia-1364"></a>
Use media instructions.
<br><dt><code>-mno-media</code><dd><a name="index-mno_002dmedia-1365"></a>
Do not use media instructions.
<br><dt><code>-mmuladd</code><dd><a name="index-mmuladd-1366"></a>
Use multiply and add/subtract instructions.
<br><dt><code>-mno-muladd</code><dd><a name="index-mno_002dmuladd-1367"></a>
Do not use multiply and add/subtract instructions.
<br><dt><code>-mfdpic</code><dd><a name="index-mfdpic-1368"></a>
Select the FDPIC ABI, which uses function descriptors to represent
pointers to functions. Without any PIC/PIE-related options, it
implies <samp><span class="option">-fPIE</span></samp>. With <samp><span class="option">-fpic</span></samp> or <samp><span class="option">-fpie</span></samp>, it
assumes GOT entries and small data are within a 12-bit range from the
GOT base address; with <samp><span class="option">-fPIC</span></samp> or <samp><span class="option">-fPIE</span></samp>, GOT offsets
are computed with 32 bits.
With a &lsquo;<samp><span class="samp">bfin-elf</span></samp>&rsquo; target, this option implies <samp><span class="option">-msim</span></samp>.
<br><dt><code>-minline-plt</code><dd><a name="index-minline_002dplt-1369"></a>
Enable inlining of PLT entries in function calls to functions that are
not known to bind locally. It has no effect without <samp><span class="option">-mfdpic</span></samp>.
It's enabled by default if optimizing for speed and compiling for
shared libraries (i.e., <samp><span class="option">-fPIC</span></samp> or <samp><span class="option">-fpic</span></samp>), or when an
optimization option such as <samp><span class="option">-O3</span></samp> or above is present in the
command line.
<br><dt><code>-mTLS</code><dd><a name="index-mTLS-1370"></a>
Assume a large TLS segment when generating thread-local code.
<br><dt><code>-mtls</code><dd><a name="index-mtls-1371"></a>
Do not assume a large TLS segment when generating thread-local code.
<br><dt><code>-mgprel-ro</code><dd><a name="index-mgprel_002dro-1372"></a>
Enable the use of <code>GPREL</code> relocations in the FDPIC ABI for data
that is known to be in read-only sections. It's enabled by default,
except for <samp><span class="option">-fpic</span></samp> or <samp><span class="option">-fpie</span></samp>: even though it may help
make the global offset table smaller, it trades 1 instruction for 4.
With <samp><span class="option">-fPIC</span></samp> or <samp><span class="option">-fPIE</span></samp>, it trades 3 instructions for 4,
one of which may be shared by multiple symbols, and it avoids the need
for a GOT entry for the referenced symbol, so it's more likely to be a
win. If it is not, <samp><span class="option">-mno-gprel-ro</span></samp> can be used to disable it.
<br><dt><code>-multilib-library-pic</code><dd><a name="index-multilib_002dlibrary_002dpic-1373"></a>
Link with the (library, not FD) pic libraries. It's implied by
<samp><span class="option">-mlibrary-pic</span></samp>, as well as by <samp><span class="option">-fPIC</span></samp> and
<samp><span class="option">-fpic</span></samp> without <samp><span class="option">-mfdpic</span></samp>. You should never have to use
it explicitly.
<br><dt><code>-mlinked-fp</code><dd><a name="index-mlinked_002dfp-1374"></a>
Follow the EABI requirement of always creating a frame pointer whenever
a stack frame is allocated. This option is enabled by default and can
be disabled with <samp><span class="option">-mno-linked-fp</span></samp>.
<br><dt><code>-mlong-calls</code><dd><a name="index-mlong_002dcalls-1375"></a>
Use indirect addressing to call functions outside the current
compilation unit. This allows the functions to be placed anywhere
within the 32-bit address space.
<br><dt><code>-malign-labels</code><dd><a name="index-malign_002dlabels-1376"></a>
Try to align labels to an 8-byte boundary by inserting NOPs into the
previous packet. This option only has an effect when VLIW packing
is enabled. It doesn't create new packets; it merely adds NOPs to
existing ones.
<br><dt><code>-mlibrary-pic</code><dd><a name="index-mlibrary_002dpic-1377"></a>
Generate position-independent EABI code.
<br><dt><code>-macc-4</code><dd><a name="index-macc_002d4-1378"></a>
Use only the first four media accumulator registers.
<br><dt><code>-macc-8</code><dd><a name="index-macc_002d8-1379"></a>
Use all eight media accumulator registers.
<br><dt><code>-mpack</code><dd><a name="index-mpack-1380"></a>
Pack VLIW instructions.
<br><dt><code>-mno-pack</code><dd><a name="index-mno_002dpack-1381"></a>
Do not pack VLIW instructions.
<br><dt><code>-mno-eflags</code><dd><a name="index-mno_002deflags-1382"></a>
Do not mark ABI switches in e_flags.
<br><dt><code>-mcond-move</code><dd><a name="index-mcond_002dmove-1383"></a>
Enable the use of conditional-move instructions (default).
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mno-cond-move</code><dd><a name="index-mno_002dcond_002dmove-1384"></a>
Disable the use of conditional-move instructions.
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mscc</code><dd><a name="index-mscc-1385"></a>
Enable the use of conditional set instructions (default).
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mno-scc</code><dd><a name="index-mno_002dscc-1386"></a>
Disable the use of conditional set instructions.
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mcond-exec</code><dd><a name="index-mcond_002dexec-1387"></a>
Enable the use of conditional execution (default).
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mno-cond-exec</code><dd><a name="index-mno_002dcond_002dexec-1388"></a>
Disable the use of conditional execution.
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mvliw-branch</code><dd><a name="index-mvliw_002dbranch-1389"></a>
Run a pass to pack branches into VLIW instructions (default).
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mno-vliw-branch</code><dd><a name="index-mno_002dvliw_002dbranch-1390"></a>
Do not run a pass to pack branches into VLIW instructions.
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mmulti-cond-exec</code><dd><a name="index-mmulti_002dcond_002dexec-1391"></a>
Enable optimization of <code>&amp;&amp;</code> and <code>||</code> in conditional execution
(default).
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mno-multi-cond-exec</code><dd><a name="index-mno_002dmulti_002dcond_002dexec-1392"></a>
Disable optimization of <code>&amp;&amp;</code> and <code>||</code> in conditional execution.
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mnested-cond-exec</code><dd><a name="index-mnested_002dcond_002dexec-1393"></a>
Enable nested conditional execution optimizations (default).
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-mno-nested-cond-exec</code><dd><a name="index-mno_002dnested_002dcond_002dexec-1394"></a>
Disable nested conditional execution optimizations.
<p>This switch is mainly for debugging the compiler and will likely be removed
in a future version.
<br><dt><code>-moptimize-membar</code><dd><a name="index-moptimize_002dmembar-1395"></a>
This switch removes redundant <code>membar</code> instructions from the
compiler-generated code. It is enabled by default.
<br><dt><code>-mno-optimize-membar</code><dd><a name="index-mno_002doptimize_002dmembar-1396"></a>
This switch disables the automatic removal of redundant <code>membar</code>
instructions from the generated code.
<br><dt><code>-mtomcat-stats</code><dd><a name="index-mtomcat_002dstats-1397"></a>
Cause gas to print out tomcat statistics.
<br><dt><code>-mcpu=</code><var>cpu</var><dd><a name="index-mcpu-1398"></a>
Select the processor type for which to generate code. Possible values are
&lsquo;<samp><span class="samp">frv</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fr550</span></samp>&rsquo;, &lsquo;<samp><span class="samp">tomcat</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fr500</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fr450</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">fr405</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fr400</span></samp>&rsquo;, &lsquo;<samp><span class="samp">fr300</span></samp>&rsquo; and &lsquo;<samp><span class="samp">simple</span></samp>&rsquo;.
</dl>
</body></html>

View file

@ -0,0 +1,78 @@
<html lang="en">
<head>
<title>FR-V Built-in Functions - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Target-Builtins.html#Target-Builtins" title="Target Builtins">
<link rel="prev" href="Blackfin-Built_002din-Functions.html#Blackfin-Built_002din-Functions" title="Blackfin Built-in Functions">
<link rel="next" href="X86-Built_002din-Functions.html#X86-Built_002din-Functions" title="X86 Built-in Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="FR-V-Built-in-Functions"></a>
<a name="FR_002dV-Built_002din-Functions"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="X86-Built_002din-Functions.html#X86-Built_002din-Functions">X86 Built-in Functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Blackfin-Built_002din-Functions.html#Blackfin-Built_002din-Functions">Blackfin Built-in Functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Target-Builtins.html#Target-Builtins">Target Builtins</a>
<hr>
</div>
<h4 class="subsection">6.56.6 FR-V Built-in Functions</h4>
<p>GCC provides many FR-V-specific built-in functions. In general,
these functions are intended to be compatible with those described
by <cite>FR-V Family, Softune C/C++ Compiler Manual (V6), Fujitsu
Semiconductor</cite>. The two exceptions are <code>__MDUNPACKH</code> and
<code>__MBTOHE</code>, the GCC forms of which pass 128-bit values by
pointer rather than by value.
<p>Most of the functions are named after specific FR-V instructions.
Such functions are said to be &ldquo;directly mapped&rdquo; and are summarized
here in tabular form.
<ul class="menu">
<li><a accesskey="1" href="Argument-Types.html#Argument-Types">Argument Types</a>
<li><a accesskey="2" href="Directly_002dmapped-Integer-Functions.html#Directly_002dmapped-Integer-Functions">Directly-mapped Integer Functions</a>
<li><a accesskey="3" href="Directly_002dmapped-Media-Functions.html#Directly_002dmapped-Media-Functions">Directly-mapped Media Functions</a>
<li><a accesskey="4" href="Raw-read_002fwrite-Functions.html#Raw-read_002fwrite-Functions">Raw read/write Functions</a>
<li><a accesskey="5" href="Other-Built_002din-Functions.html#Other-Built_002din-Functions">Other Built-in Functions</a>
</ul>
</body></html>

View file

@ -0,0 +1,109 @@
<html lang="en">
<head>
<title>Fast enumeration details - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Fast-enumeration.html#Fast-enumeration" title="Fast enumeration">
<link rel="prev" href="c99_002dlike-fast-enumeration-syntax.html#c99_002dlike-fast-enumeration-syntax" title="c99-like fast enumeration syntax">
<link rel="next" href="Fast-enumeration-protocol.html#Fast-enumeration-protocol" title="Fast enumeration protocol">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Fast-enumeration-details"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Fast-enumeration-protocol.html#Fast-enumeration-protocol">Fast enumeration protocol</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="c99_002dlike-fast-enumeration-syntax.html#c99_002dlike-fast-enumeration-syntax">c99-like fast enumeration syntax</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Fast-enumeration.html#Fast-enumeration">Fast enumeration</a>
<hr>
</div>
<h4 class="subsection">8.9.3 Fast enumeration details</h4>
<p>Here is a more technical description with the gory details. Consider the code
<pre class="smallexample"> for (<var>object expression</var> in <var>collection expression</var>)
{
<var>statements</var>
}
</pre>
<p>here is what happens when you run it:
<ul>
<li><var>collection expression</var> is evaluated exactly once and the
result is used as the collection object to iterate over. This means
it is safe to write code such as <code>for (object in [NSDictionary
keyEnumerator]) ...</code>.
<li>the iteration is implemented by the compiler by repeatedly getting
batches of objects from the collection object using the fast
enumeration protocol (see below), then iterating over all objects in
the batch. This is faster than a normal enumeration where objects are
retrieved one by one (hence the name &ldquo;fast enumeration&rdquo;).
<li>if there are no objects in the collection, then
<var>object expression</var> is set to <code>nil</code> and the loop
immediately terminates.
<li>if there are objects in the collection, then for each object in the
collection (in the order they are returned) <var>object expression</var>
is set to the object, then <var>statements</var> are executed.
<li><var>statements</var> can contain <code>break</code> and <code>continue</code>
commands, which will abort the iteration or skip to the next loop
iteration as expected.
<li>when the iteration ends because there are no more objects to iterate
over, <var>object expression</var> is set to <code>nil</code>. This allows
you to determine whether the iteration finished because a <code>break</code>
command was used (in which case <var>object expression</var> will remain
set to the last object that was iterated over) or because it iterated
over all the objects (in which case <var>object expression</var> will be
set to <code>nil</code>).
<li><var>statements</var> must not make any changes to the collection
object; if they do, it is a hard error and the fast enumeration
terminates by invoking <code>objc_enumerationMutation</code>, a runtime
function that normally aborts the program but which can be customized
by Foundation libraries via <code>objc_set_mutation_handler</code> to do
something different, such as raising an exception.
</ul>
<!-- ================================ -->
</body></html>

View file

@ -0,0 +1,119 @@
<html lang="en">
<head>
<title>Fast enumeration protocol - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Fast-enumeration.html#Fast-enumeration" title="Fast enumeration">
<link rel="prev" href="Fast-enumeration-details.html#Fast-enumeration-details" title="Fast enumeration details">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Fast-enumeration-protocol"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Fast-enumeration-details.html#Fast-enumeration-details">Fast enumeration details</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Fast-enumeration.html#Fast-enumeration">Fast enumeration</a>
<hr>
</div>
<h4 class="subsection">8.9.4 Fast enumeration protocol</h4>
<p>If you want your own collection object to be usable with fast
enumeration, you need to have it implement the method
<pre class="smallexample"> - (unsigned long) countByEnumeratingWithState: (NSFastEnumerationState *)state
objects: (id *)objects
count: (unsigned long)len;
</pre>
<p>where <code>NSFastEnumerationState</code> must be defined in your code as follows:
<pre class="smallexample"> typedef struct
{
unsigned long state;
id *itemsPtr;
unsigned long *mutationsPtr;
unsigned long extra[5];
} NSFastEnumerationState;
</pre>
<p>If no <code>NSFastEnumerationState</code> is defined in your code, the
compiler will automatically replace <code>NSFastEnumerationState *</code>
with <code>struct __objcFastEnumerationState *</code>, where that type is
silently defined by the compiler in an identical way. This can be
confusing and we recommend that you define
<code>NSFastEnumerationState</code> (as shown above) instead.
<p>The method is called repeatedly during a fast enumeration to retrieve
batches of objects. Each invocation of the method should retrieve the
next batch of objects.
<p>The return value of the method is the number of objects in the current
batch; this should not exceed <code>len</code>, which is the maximum size of
a batch as requested by the caller. The batch itself is returned in
the <code>itemsPtr</code> field of the <code>NSFastEnumerationState</code> struct.
<p>To help with returning the objects, the <code>objects</code> array is a C
array preallocated by the caller (on the stack) of size <code>len</code>.
In many cases you can put the objects you want to return in that
<code>objects</code> array, then do <code>itemsPtr = objects</code>. But you
don't have to; if your collection already has the objects to return in
some form of C array, it could return them from there instead.
<p>The <code>state</code> and <code>extra</code> fields of the
<code>NSFastEnumerationState</code> structure allows your collection object
to keep track of the state of the enumeration. In a simple array
implementation, <code>state</code> may keep track of the index of the last
object that was returned, and <code>extra</code> may be unused.
<p>The <code>mutationsPtr</code> field of the <code>NSFastEnumerationState</code> is
used to keep track of mutations. It should point to a number; before
working on each object, the fast enumeration loop will check that this
number has not changed. If it has, a mutation has happened and the
fast enumeration will abort. So, <code>mutationsPtr</code> could be set to
point to some sort of version number of your collection, which is
increased by one every time there is a change (for example when an
object is added or removed). Or, if you are content with less strict
mutation checks, it could point to the number of objects in your
collection or some other value that can be checked to perform an
approximate check that the collection has not been mutated.
<p>Finally, note how we declared the <code>len</code> argument and the return
value to be of type <code>unsigned long</code>. They could also be declared
to be of type <code>unsigned int</code> and everything would still work.
<!-- ========================================================================= -->
</body></html>

View file

@ -0,0 +1,66 @@
<html lang="en">
<head>
<title>Fast enumeration - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Objective_002dC.html#Objective_002dC" title="Objective-C">
<link rel="prev" href="Synchronization.html#Synchronization" title="Synchronization">
<link rel="next" href="Messaging-with-the-GNU-Objective_002dC-runtime.html#Messaging-with-the-GNU-Objective_002dC-runtime" title="Messaging with the GNU Objective-C runtime">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Fast-enumeration"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Messaging-with-the-GNU-Objective_002dC-runtime.html#Messaging-with-the-GNU-Objective_002dC-runtime">Messaging with the GNU Objective-C runtime</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Synchronization.html#Synchronization">Synchronization</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Objective_002dC.html#Objective_002dC">Objective-C</a>
<hr>
</div>
<h3 class="section">8.9 Fast enumeration</h3>
<ul class="menu">
<li><a accesskey="1" href="Using-fast-enumeration.html#Using-fast-enumeration">Using fast enumeration</a>
<li><a accesskey="2" href="c99_002dlike-fast-enumeration-syntax.html#c99_002dlike-fast-enumeration-syntax">c99-like fast enumeration syntax</a>
<li><a accesskey="3" href="Fast-enumeration-details.html#Fast-enumeration-details">Fast enumeration details</a>
<li><a accesskey="4" href="Fast-enumeration-protocol.html#Fast-enumeration-protocol">Fast enumeration protocol</a>
</ul>
<!-- ================================ -->
</body></html>

View file

@ -0,0 +1,90 @@
<html lang="en">
<head>
<title>Fixed Headers - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Trouble.html#Trouble" title="Trouble">
<link rel="prev" href="Incompatibilities.html#Incompatibilities" title="Incompatibilities">
<link rel="next" href="Standard-Libraries.html#Standard-Libraries" title="Standard Libraries">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Fixed-Headers"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Standard-Libraries.html#Standard-Libraries">Standard Libraries</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Incompatibilities.html#Incompatibilities">Incompatibilities</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Trouble.html#Trouble">Trouble</a>
<hr>
</div>
<h3 class="section">11.4 Fixed Header Files</h3>
<p>GCC needs to install corrected versions of some system header files.
This is because most target systems have some header files that won't
work with GCC unless they are changed. Some have bugs, some are
incompatible with ISO C, and some depend on special features of other
compilers.
<p>Installing GCC automatically creates and installs the fixed header
files, by running a program called <code>fixincludes</code>. Normally, you
don't need to pay attention to this. But there are cases where it
doesn't do the right thing automatically.
<ul>
<li>If you update the system's header files, such as by installing a new
system version, the fixed header files of GCC are not automatically
updated. They can be updated using the <samp><span class="command">mkheaders</span></samp> script
installed in
<samp><var>libexecdir</var><span class="file">/gcc/</span><var>target</var><span class="file">/</span><var>version</var><span class="file">/install-tools/</span></samp>.
<li>On some systems, header file directories contain
machine-specific symbolic links in certain places. This makes it
possible to share most of the header files among hosts running the
same version of the system on different machine models.
<p>The programs that fix the header files do not understand this special
way of using symbolic links; therefore, the directory of fixed header
files is good only for the machine model used to build it.
<p>It is possible to make separate sets of fixed header files for the
different machine models, and arrange a structure of symbolic links so
as to use the proper set, but you'll have to do this by hand.
</ul>
</body></html>

View file

@ -0,0 +1,159 @@
<html lang="en">
<head>
<title>Fixed-Point - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Hex-Floats.html#Hex-Floats" title="Hex Floats">
<link rel="next" href="Named-Address-Spaces.html#Named-Address-Spaces" title="Named Address Spaces">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Fixed-Point"></a>
<a name="Fixed_002dPoint"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Named-Address-Spaces.html#Named-Address-Spaces">Named Address Spaces</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Hex-Floats.html#Hex-Floats">Hex Floats</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.15 Fixed-Point Types</h3>
<p><a name="index-fixed_002dpoint-types-2474"></a><a name="index-g_t_0040code_007b_005fFract_007d-data-type-2475"></a><a name="index-g_t_0040code_007b_005fAccum_007d-data-type-2476"></a><a name="index-g_t_0040code_007b_005fSat_007d-data-type-2477"></a><a name="index-g_t_0040code_007bhr_007d-fixed_002dsuffix-2478"></a><a name="index-g_t_0040code_007br_007d-fixed_002dsuffix-2479"></a><a name="index-g_t_0040code_007blr_007d-fixed_002dsuffix-2480"></a><a name="index-g_t_0040code_007bllr_007d-fixed_002dsuffix-2481"></a><a name="index-g_t_0040code_007buhr_007d-fixed_002dsuffix-2482"></a><a name="index-g_t_0040code_007bur_007d-fixed_002dsuffix-2483"></a><a name="index-g_t_0040code_007bulr_007d-fixed_002dsuffix-2484"></a><a name="index-g_t_0040code_007bullr_007d-fixed_002dsuffix-2485"></a><a name="index-g_t_0040code_007bhk_007d-fixed_002dsuffix-2486"></a><a name="index-g_t_0040code_007bk_007d-fixed_002dsuffix-2487"></a><a name="index-g_t_0040code_007blk_007d-fixed_002dsuffix-2488"></a><a name="index-g_t_0040code_007bllk_007d-fixed_002dsuffix-2489"></a><a name="index-g_t_0040code_007buhk_007d-fixed_002dsuffix-2490"></a><a name="index-g_t_0040code_007buk_007d-fixed_002dsuffix-2491"></a><a name="index-g_t_0040code_007bulk_007d-fixed_002dsuffix-2492"></a><a name="index-g_t_0040code_007bullk_007d-fixed_002dsuffix-2493"></a><a name="index-g_t_0040code_007bHR_007d-fixed_002dsuffix-2494"></a><a name="index-g_t_0040code_007bR_007d-fixed_002dsuffix-2495"></a><a name="index-g_t_0040code_007bLR_007d-fixed_002dsuffix-2496"></a><a name="index-g_t_0040code_007bLLR_007d-fixed_002dsuffix-2497"></a><a name="index-g_t_0040code_007bUHR_007d-fixed_002dsuffix-2498"></a><a name="index-g_t_0040code_007bUR_007d-fixed_002dsuffix-2499"></a><a name="index-g_t_0040code_007bULR_007d-fixed_002dsuffix-2500"></a><a name="index-g_t_0040code_007bULLR_007d-fixed_002dsuffix-2501"></a><a name="index-g_t_0040code_007bHK_007d-fixed_002dsuffix-2502"></a><a name="index-g_t_0040code_007bK_007d-fixed_002dsuffix-2503"></a><a name="index-g_t_0040code_007bLK_007d-fixed_002dsuffix-2504"></a><a name="index-g_t_0040code_007bLLK_007d-fixed_002dsuffix-2505"></a><a name="index-g_t_0040code_007bUHK_007d-fixed_002dsuffix-2506"></a><a name="index-g_t_0040code_007bUK_007d-fixed_002dsuffix-2507"></a><a name="index-g_t_0040code_007bULK_007d-fixed_002dsuffix-2508"></a><a name="index-g_t_0040code_007bULLK_007d-fixed_002dsuffix-2509"></a>
As an extension, GNU C supports fixed-point types as
defined in the N1169 draft of ISO/IEC DTR 18037. Support for fixed-point
types in GCC will evolve as the draft technical report changes.
Calling conventions for any target might also change. Not all targets
support fixed-point types.
<p>The fixed-point types are
<code>short _Fract</code>,
<code>_Fract</code>,
<code>long _Fract</code>,
<code>long long _Fract</code>,
<code>unsigned short _Fract</code>,
<code>unsigned _Fract</code>,
<code>unsigned long _Fract</code>,
<code>unsigned long long _Fract</code>,
<code>_Sat short _Fract</code>,
<code>_Sat _Fract</code>,
<code>_Sat long _Fract</code>,
<code>_Sat long long _Fract</code>,
<code>_Sat unsigned short _Fract</code>,
<code>_Sat unsigned _Fract</code>,
<code>_Sat unsigned long _Fract</code>,
<code>_Sat unsigned long long _Fract</code>,
<code>short _Accum</code>,
<code>_Accum</code>,
<code>long _Accum</code>,
<code>long long _Accum</code>,
<code>unsigned short _Accum</code>,
<code>unsigned _Accum</code>,
<code>unsigned long _Accum</code>,
<code>unsigned long long _Accum</code>,
<code>_Sat short _Accum</code>,
<code>_Sat _Accum</code>,
<code>_Sat long _Accum</code>,
<code>_Sat long long _Accum</code>,
<code>_Sat unsigned short _Accum</code>,
<code>_Sat unsigned _Accum</code>,
<code>_Sat unsigned long _Accum</code>,
<code>_Sat unsigned long long _Accum</code>.
<p>Fixed-point data values contain fractional and optional integral parts.
The format of fixed-point data varies and depends on the target machine.
<p>Support for fixed-point types includes:
<ul>
<li>prefix and postfix increment and decrement operators (<code>++</code>, <code>--</code>)
<li>unary arithmetic operators (<code>+</code>, <code>-</code>, <code>!</code>)
<li>binary arithmetic operators (<code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>)
<li>binary shift operators (<code>&lt;&lt;</code>, <code>&gt;&gt;</code>)
<li>relational operators (<code>&lt;</code>, <code>&lt;=</code>, <code>&gt;=</code>, <code>&gt;</code>)
<li>equality operators (<code>==</code>, <code>!=</code>)
<li>assignment operators (<code>+=</code>, <code>-=</code>, <code>*=</code>, <code>/=</code>,
<code>&lt;&lt;=</code>, <code>&gt;&gt;=</code>)
<li>conversions to and from integer, floating-point, or fixed-point types
</ul>
<p>Use a suffix in a fixed-point literal constant:
<ul>
<li>&lsquo;<samp><span class="samp">hr</span></samp>&rsquo; or &lsquo;<samp><span class="samp">HR</span></samp>&rsquo; for <code>short _Fract</code> and
<code>_Sat short _Fract</code>
<li>&lsquo;<samp><span class="samp">r</span></samp>&rsquo; or &lsquo;<samp><span class="samp">R</span></samp>&rsquo; for <code>_Fract</code> and <code>_Sat _Fract</code>
<li>&lsquo;<samp><span class="samp">lr</span></samp>&rsquo; or &lsquo;<samp><span class="samp">LR</span></samp>&rsquo; for <code>long _Fract</code> and
<code>_Sat long _Fract</code>
<li>&lsquo;<samp><span class="samp">llr</span></samp>&rsquo; or &lsquo;<samp><span class="samp">LLR</span></samp>&rsquo; for <code>long long _Fract</code> and
<code>_Sat long long _Fract</code>
<li>&lsquo;<samp><span class="samp">uhr</span></samp>&rsquo; or &lsquo;<samp><span class="samp">UHR</span></samp>&rsquo; for <code>unsigned short _Fract</code> and
<code>_Sat unsigned short _Fract</code>
<li>&lsquo;<samp><span class="samp">ur</span></samp>&rsquo; or &lsquo;<samp><span class="samp">UR</span></samp>&rsquo; for <code>unsigned _Fract</code> and
<code>_Sat unsigned _Fract</code>
<li>&lsquo;<samp><span class="samp">ulr</span></samp>&rsquo; or &lsquo;<samp><span class="samp">ULR</span></samp>&rsquo; for <code>unsigned long _Fract</code> and
<code>_Sat unsigned long _Fract</code>
<li>&lsquo;<samp><span class="samp">ullr</span></samp>&rsquo; or &lsquo;<samp><span class="samp">ULLR</span></samp>&rsquo; for <code>unsigned long long _Fract</code>
and <code>_Sat unsigned long long _Fract</code>
<li>&lsquo;<samp><span class="samp">hk</span></samp>&rsquo; or &lsquo;<samp><span class="samp">HK</span></samp>&rsquo; for <code>short _Accum</code> and
<code>_Sat short _Accum</code>
<li>&lsquo;<samp><span class="samp">k</span></samp>&rsquo; or &lsquo;<samp><span class="samp">K</span></samp>&rsquo; for <code>_Accum</code> and <code>_Sat _Accum</code>
<li>&lsquo;<samp><span class="samp">lk</span></samp>&rsquo; or &lsquo;<samp><span class="samp">LK</span></samp>&rsquo; for <code>long _Accum</code> and
<code>_Sat long _Accum</code>
<li>&lsquo;<samp><span class="samp">llk</span></samp>&rsquo; or &lsquo;<samp><span class="samp">LLK</span></samp>&rsquo; for <code>long long _Accum</code> and
<code>_Sat long long _Accum</code>
<li>&lsquo;<samp><span class="samp">uhk</span></samp>&rsquo; or &lsquo;<samp><span class="samp">UHK</span></samp>&rsquo; for <code>unsigned short _Accum</code> and
<code>_Sat unsigned short _Accum</code>
<li>&lsquo;<samp><span class="samp">uk</span></samp>&rsquo; or &lsquo;<samp><span class="samp">UK</span></samp>&rsquo; for <code>unsigned _Accum</code> and
<code>_Sat unsigned _Accum</code>
<li>&lsquo;<samp><span class="samp">ulk</span></samp>&rsquo; or &lsquo;<samp><span class="samp">ULK</span></samp>&rsquo; for <code>unsigned long _Accum</code> and
<code>_Sat unsigned long _Accum</code>
<li>&lsquo;<samp><span class="samp">ullk</span></samp>&rsquo; or &lsquo;<samp><span class="samp">ULLK</span></samp>&rsquo; for <code>unsigned long long _Accum</code>
and <code>_Sat unsigned long long _Accum</code>
</ul>
<p>GCC support of fixed-point types as specified by the draft technical report
is incomplete:
<ul>
<li>Pragmas to control overflow and rounding behaviors are not implemented.
</ul>
<p>Fixed-point types are supported by the DWARF 2 debug information format.
</body></html>

View file

@ -0,0 +1,78 @@
<html lang="en">
<head>
<title>Floating Types - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Complex.html#Complex" title="Complex">
<link rel="next" href="Half_002dPrecision.html#Half_002dPrecision" title="Half-Precision">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Floating-Types"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Half_002dPrecision.html#Half_002dPrecision">Half-Precision</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Complex.html#Complex">Complex</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Extensions.html#C-Extensions">C Extensions</a>
<hr>
</div>
<h3 class="section">6.11 Additional Floating Types</h3>
<p><a name="index-additional-floating-types-2454"></a><a name="index-g_t_0040code_007b_005f_005ffloat80_007d-data-type-2455"></a><a name="index-g_t_0040code_007b_005f_005ffloat128_007d-data-type-2456"></a><a name="index-g_t_0040code_007bw_007d-floating-point-suffix-2457"></a><a name="index-g_t_0040code_007bq_007d-floating-point-suffix-2458"></a><a name="index-g_t_0040code_007bW_007d-floating-point-suffix-2459"></a><a name="index-g_t_0040code_007bQ_007d-floating-point-suffix-2460"></a>
As an extension, GNU C supports additional floating
types, <code>__float80</code> and <code>__float128</code> to support 80-bit
(<code>XFmode</code>) and 128-bit (<code>TFmode</code>) floating types.
Support for additional types includes the arithmetic operators:
add, subtract, multiply, divide; unary arithmetic operators;
relational operators; equality operators; and conversions to and from
integer and other floating types. Use a suffix &lsquo;<samp><span class="samp">w</span></samp>&rsquo; or &lsquo;<samp><span class="samp">W</span></samp>&rsquo;
in a literal constant of type <code>__float80</code> and &lsquo;<samp><span class="samp">q</span></samp>&rsquo; or &lsquo;<samp><span class="samp">Q</span></samp>&rsquo;
for <code>_float128</code>. You can declare complex types using the
corresponding internal complex type, <code>XCmode</code> for <code>__float80</code>
type and <code>TCmode</code> for <code>__float128</code> type:
<pre class="smallexample"> typedef _Complex float __attribute__((mode(TC))) _Complex128;
typedef _Complex float __attribute__((mode(XC))) _Complex80;
</pre>
<p>Not all targets support additional floating-point types. <code>__float80</code>
and <code>__float128</code> types are supported on i386, x86_64 and IA-64 targets.
The <code>__float128</code> type is supported on hppa HP-UX targets.
</body></html>

View file

@ -0,0 +1,135 @@
<html lang="en">
<head>
<title>Floating point implementation - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Implementation.html#C-Implementation" title="C Implementation">
<link rel="prev" href="Integers-implementation.html#Integers-implementation" title="Integers implementation">
<link rel="next" href="Arrays-and-pointers-implementation.html#Arrays-and-pointers-implementation" title="Arrays and pointers implementation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Floating-point-implementation"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Arrays-and-pointers-implementation.html#Arrays-and-pointers-implementation">Arrays and pointers implementation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Integers-implementation.html#Integers-implementation">Integers implementation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C-Implementation.html#C-Implementation">C Implementation</a>
<hr>
</div>
<h3 class="section">4.6 Floating point</h3>
<ul>
<li><cite>The accuracy of the floating-point operations and of the library
functions in </cite><code>&lt;math.h&gt;</code><cite> and </cite><code>&lt;complex.h&gt;</code><cite> that return floating-point
results (C90 and C99 5.2.4.2.2).</cite>
<p>The accuracy is unknown.
<li><cite>The rounding behaviors characterized by non-standard values
of </cite><code>FLT_ROUNDS</code><cite>
(C90 and C99 5.2.4.2.2).</cite>
<p>GCC does not use such values.
<li><cite>The evaluation methods characterized by non-standard negative
values of </cite><code>FLT_EVAL_METHOD</code><cite> (C99 5.2.4.2.2).</cite>
<p>GCC does not use such values.
<li><cite>The direction of rounding when an integer is converted to a
floating-point number that cannot exactly represent the original
value (C90 6.2.1.3, C99 6.3.1.4).</cite>
<p>C99 Annex F is followed.
<li><cite>The direction of rounding when a floating-point number is
converted to a narrower floating-point number (C90 6.2.1.4, C99
6.3.1.5).</cite>
<p>C99 Annex F is followed.
<li><cite>How the nearest representable value or the larger or smaller
representable value immediately adjacent to the nearest representable
value is chosen for certain floating constants (C90 6.1.3.1, C99
6.4.4.2).</cite>
<p>C99 Annex F is followed.
<li><cite>Whether and how floating expressions are contracted when not
disallowed by the </cite><code>FP_CONTRACT</code><cite> pragma (C99 6.5).</cite>
<p>Expressions are currently only contracted if
<samp><span class="option">-funsafe-math-optimizations</span></samp> or <samp><span class="option">-ffast-math</span></samp> are used.
This is subject to change.
<li><cite>The default state for the </cite><code>FENV_ACCESS</code><cite> pragma (C99 7.6.1).</cite>
<p>This pragma is not implemented, but the default is to &ldquo;off&rdquo; unless
<samp><span class="option">-frounding-math</span></samp> is used in which case it is &ldquo;on&rdquo;.
<li><cite>Additional floating-point exceptions, rounding modes, environments,
and classifications, and their macro names (C99 7.6, C99 7.12).</cite>
<p>This is dependent on the implementation of the C library, and is not
defined by GCC itself.
<li><cite>The default state for the </cite><code>FP_CONTRACT</code><cite> pragma (C99 7.12.2).</cite>
<p>This pragma is not implemented. Expressions are currently only
contracted if <samp><span class="option">-funsafe-math-optimizations</span></samp> or
<samp><span class="option">-ffast-math</span></samp> are used. This is subject to change.
<li><cite>Whether the &ldquo;inexact&rdquo; floating-point exception can be raised
when the rounded result actually does equal the mathematical result
in an IEC 60559 conformant implementation (C99 F.9).</cite>
<p>This is dependent on the implementation of the C library, and is not
defined by GCC itself.
<li><cite>Whether the &ldquo;underflow&rdquo; (and &ldquo;inexact&rdquo;) floating-point
exception can be raised when a result is tiny but not inexact in an
IEC 60559 conformant implementation (C99 F.9).</cite>
<p>This is dependent on the implementation of the C library, and is not
defined by GCC itself.
</ul>
</body></html>

View file

@ -0,0 +1,113 @@
<html lang="en">
<head>
<title>Forwarding hook - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Messaging-with-the-GNU-Objective_002dC-runtime.html#Messaging-with-the-GNU-Objective_002dC-runtime" title="Messaging with the GNU Objective-C runtime">
<link rel="prev" href="Dynamically-registering-methods.html#Dynamically-registering-methods" title="Dynamically registering methods">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Forwarding-hook"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Dynamically-registering-methods.html#Dynamically-registering-methods">Dynamically registering methods</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Messaging-with-the-GNU-Objective_002dC-runtime.html#Messaging-with-the-GNU-Objective_002dC-runtime">Messaging with the GNU Objective-C runtime</a>
<hr>
</div>
<h4 class="subsection">8.10.2 Forwarding hook</h4>
<p>The GNU Objective-C runtime provides a hook, called
<code>__objc_msg_forward2</code>, which is called by
<code>objc_msg_lookup()</code> when it can't find a method implementation in
the runtime tables and after calling <code>+resolveInstanceMethod:</code>
and <code>+resolveClassMethod:</code> has been attempted and did not succeed
in dynamically registering the method.
<p>To configure the hook, you set the global variable
<code>__objc_msg_forward2</code> to a function with the same argument and
return types of <code>objc_msg_lookup()</code>. When
<code>objc_msg_lookup()</code> can not find a method implementation, it
invokes the hook function you provided to get a method implementation
to return. So, in practice <code>__objc_msg_forward2</code> allows you to
extend <code>objc_msg_lookup()</code> by adding some custom code that is
called to do a further lookup when no standard method implementation
can be found using the normal lookup.
<p>This hook is generally reserved for &ldquo;Foundation&rdquo; libraries such as
GNUstep Base, which use it to implement their high-level method
forwarding API, typically based around the <code>forwardInvocation:</code>
method. So, unless you are implementing your own &ldquo;Foundation&rdquo;
library, you should not set this hook.
<p>In a typical forwarding implementation, the <code>__objc_msg_forward2</code>
hook function determines the argument and return type of the method
that is being looked up, and then creates a function that takes these
arguments and has that return type, and returns it to the caller.
Creating this function is non-trivial and is typically performed using
a dedicated library such as <code>libffi</code>.
<p>The forwarding method implementation thus created is returned by
<code>objc_msg_lookup()</code> and is executed as if it was a normal method
implementation. When the forwarding method implementation is called,
it is usually expected to pack all arguments into some sort of object
(typically, an <code>NSInvocation</code> in a &ldquo;Foundation&rdquo; library), and
hand it over to the programmer (<code>forwardInvocation:</code>) who is then
allowed to manipulate the method invocation using a high-level API
provided by the &ldquo;Foundation&rdquo; library. For example, the programmer
may want to examine the method invocation arguments and name and
potentially change them before forwarding the method invocation to one
or more local objects (<code>performInvocation:</code>) or even to remote
objects (by using Distributed Objects or some other mechanism). When
all this completes, the return value is passed back and must be
returned correctly to the original caller.
<p>Note that the GNU Objective-C runtime currently provides no support
for method forwarding or method invocations other than the
<code>__objc_msg_forward2</code> hook.
<p>If the forwarding hook does not exist or returns <code>NULL</code>, the
runtime currently attempts forwarding using an older, deprecated API,
and if that fails, it aborts the program. In future versions of the
GNU Objective-C runtime, the runtime will immediately abort.
<!-- Copyright (C) 2002-2013 Free Software Foundation, Inc. -->
<!-- This is part of the GCC manual. -->
<!-- For copying conditions, see the file gcc.texi. -->
</body></html>

Some files were not shown because too many files have changed in this diff Show more