aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi104
1 files changed, 52 insertions, 52 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index f96341d..8ad1f51 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -9,10 +9,10 @@
@opindex pedantic
GNU C provides several language features not found in ISO standard C.
-(The @option{-pedantic} option directs GNU CC to print a warning message if
+(The @option{-pedantic} 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__}, which is always defined under GNU CC.
+@code{__GNUC__}, which is always defined under GCC.
These extensions are available in C and Objective-C. Most of them are
also available in C++. @xref{C++ Extensions,,Extensions to the
@@ -427,7 +427,7 @@ but it's not wise to take the risk. If, however, the nested function
does not refer to anything that has gone out of scope, you should be
safe.
-GNU CC implements taking the address of a nested function using a
+GCC implements taking the address of a nested function using a
technique called @dfn{trampolines}. A paper describing them is
available as @uref{http://people.debian.org/~karlheg/Usenix88-lexic.pdf}.
@@ -803,7 +803,7 @@ are open-coded on all types of machines. Multiplication is open-coded
if the machine supports fullword-to-doubleword a widening multiply
instruction. Division and shifts are open-coded only on machines that
provide special support. The operations that are not open-coded use
-special library routines that come with GNU CC.
+special library routines that come with GCC.
There may be pitfalls when you use @code{long long} types for function
arguments, unless you declare function prototypes. If a function
@@ -859,11 +859,11 @@ floating type, you should use the ISO C99 functions @code{conjf},
@code{conj} and @code{conjl}, declared in @code{<complex.h>} and also
provided as built-in functions by GCC.
-GNU CC can allocate complex automatic variables in a noncontiguous
+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). None of the
supported debugging info formats has a way to represent noncontiguous
-allocation like this, so GNU CC describes a noncontiguous complex
+allocation like this, so 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}, the two fictitious
variables are named @code{foo$real} and @code{foo$imag}. You can
@@ -1574,7 +1574,7 @@ attributes.
@cindex @code{noreturn} function attribute
@item noreturn
A few standard library functions, such as @code{abort} and @code{exit},
-cannot return. GNU CC knows this automatically. Some programs define
+cannot return. GCC knows this automatically. Some programs define
their own functions that never return. You can declare them
@code{noreturn} to tell the compiler this fact. For example,
@@ -1601,7 +1601,7 @@ restored before calling the @code{noreturn} function.
It does not make sense for a @code{noreturn} function to have a return
type other than @code{void}.
-The attribute @code{noreturn} is not implemented in GNU C versions
+The attribute @code{noreturn} is not implemented in GCC versions
earlier than 2.5. An alternative way to declare that a function does
not return, which works in the current version and in some older
versions, is as follows:
@@ -1634,7 +1634,7 @@ Interesting non-pure functions are functions with infinite loops or those
depending on volatile memory or other system resource, that may change between
two consecutive calls (such as @code{feof} in a multithreading environment).
-The attribute @code{pure} is not implemented in GNU C versions earlier
+The attribute @code{pure} is not implemented in GCC versions earlier
than 2.96.
@cindex @code{const} function attribute
@item const
@@ -1650,7 +1650,7 @@ function that calls a non-@code{const} function usually must not be
@code{const}. It does not make sense for a @code{const} function to
return @code{void}.
-The attribute @code{const} is not implemented in GNU C versions earlier
+The attribute @code{const} is not implemented in GCC versions earlier
than 2.5. An alternative way to declare that a function has no side
effects, which works in the current version and in some older versions,
is as follows:
@@ -1703,7 +1703,7 @@ attribute are 2 and 3.
@opindex ffreestanding
The @code{format} attribute allows you to identify your own functions
-which take format strings as arguments, so that GNU CC can check the
+which take format strings as arguments, so that GCC can check the
calls to these functions for errors. The compiler always (unless
@option{-ffreestanding} is used) checks formats
for the standard library functions @code{printf}, @code{fprintf},
@@ -1749,7 +1749,7 @@ The parameter @var{string-index} specifies which argument is the format
string argument (starting from 1).
The @code{format-arg} attribute allows you to identify your own
-functions which modify format strings, so that GNU CC can check the
+functions which modify format strings, so that GCC can check the
calls to @code{printf}, @code{scanf}, @code{strftime} or @code{strfmon}
type function whose operands are a call to one of your own function.
The compiler always treats @code{gettext}, @code{dgettext}, and
@@ -1801,7 +1801,7 @@ These attributes are not currently implemented for Objective-C.
@item unused
This attribute, attached to a function, means that the function is meant
-to be possibly unused. GNU CC will not produce a warning for this
+to be possibly unused. GCC will not produce a warning for this
function. GNU C++ does not currently support this attribute as
definitions without parameters are valid in C++.
@@ -1839,14 +1839,14 @@ Not all target machines support this attribute.
@item no_check_memory_usage
@cindex @code{no_check_memory_usage} function attribute
@opindex fcheck-memory-usage
-The @code{no_check_memory_usage} attribute causes GNU CC to omit checks
+The @code{no_check_memory_usage} attribute causes GCC to omit checks
of memory references when it generates code for that function. Normally
if you specify @option{-fcheck-memory-usage} (see @pxref{Code Gen
-Options}), GNU CC generates calls to support routines before most memory
+Options}), GCC generates calls to support routines before most memory
accesses to permit support code to record usage and detect uses of
-uninitialized or unallocated storage. Since GNU CC cannot handle
+uninitialized or unallocated storage. Since GCC cannot handle
@code{asm} statements properly they are not allowed in such functions.
-If you declare a function with this attribute, GNU CC will not generate
+If you declare a function with this attribute, GCC will not generate
memory checking code for that function, permitting the use of @code{asm}
statements without having to compile that function with different
options. This also allows you to write support routines of your own if
@@ -2482,9 +2482,9 @@ or @samp{__pointer__} for the mode used to represent pointers.
@item nocommon
@cindex @code{nocommon} attribute
@opindex fno-common
-This attribute specifies requests GNU CC not to place a variable
+This attribute specifies requests GCC not to place a variable
``common'' but instead to allocate space for it directly. If you
-specify the @option{-fno-common} flag, GNU CC will do this for all
+specify the @option{-fno-common} flag, GCC will do this for all
variables.
Specifying the @code{nocommon} attribute for a variable provides an
@@ -2540,7 +2540,7 @@ main()
@noindent
Use the @code{section} attribute with an @emph{initialized} definition
-of a @emph{global} variable, as shown in the example. GNU CC issues
+of a @emph{global} variable, as shown in the example. GCC issues
a warning and otherwise ignores the @code{section} attribute in
uninitialized variable declarations.
@@ -2594,7 +2594,7 @@ applies to all function parameters with that type.
@item unused
This attribute, attached to a variable, means that the variable is meant
-to be possibly unused. GNU CC will not produce a warning for this
+to be possibly unused. GCC will not produce a warning for this
variable.
@item weak
@@ -2807,7 +2807,7 @@ pid_t wait (wait_status_ptr_t p)
@item unused
When attached to a type (including a @code{union} or a @code{struct}),
this attribute means that variables of that type are meant to appear
-possibly unused. GNU CC will not produce a warning for any variables of
+possibly unused. GCC will not produce a warning for any variables of
that type, even if the variable appears to do nothing. This is often
the case with lock or thread classes, which are usually defined and then
not referenced, but contain constructors and destructors that have
@@ -2826,7 +2826,7 @@ packed))}.
@cindex open coding
@cindex macros, inline alternative
-By declaring a function @code{inline}, you can direct GNU CC to
+By declaring a function @code{inline}, you can direct GCC to
integrate that function's code into the code for its callers. This
makes execution faster by eliminating the function-call overhead; in
addition, if any of the actual argument values are constant, their known
@@ -2874,7 +2874,7 @@ does not affect the linkage of the function.
@cindex member fns, automatically @code{inline}
@cindex C++ member fns, automatically @code{inline}
@opindex fno-default-inline
-GNU CC automatically inlines member functions defined within the class
+GCC automatically inlines member functions defined within the class
body of C++ programs even if they are not explicitly declared
@code{inline}. (You can override this with @option{-fno-default-inline};
@pxref{C++ Dialect Options,,Options Controlling C++ Dialect}.)
@@ -2884,7 +2884,7 @@ body of C++ programs even if they are not explicitly declared
When a function is both inline and @code{static}, if all calls to the
function are integrated into the caller, and the function's address is
never used, then the function's own assembler code is never referenced.
-In this case, GNU CC does not actually output assembler code for the
+In this case, GCC does not actually output assembler code for the
function, unless you specify the option @option{-fkeep-inline-functions}.
Some calls cannot be integrated for various reasons (in particular,
calls that precede the function's definition cannot be integrated, and
@@ -2921,7 +2921,7 @@ existing semantics will remain available when @option{-std=gnu89} is
specified, but eventually the default will be @option{-std=gnu99} and
that will implement the C99 semantics, though it does not do so yet.)
-GNU C does not inline any functions when not optimizing. It is not
+GCC does not inline any functions when not optimizing. It is not
clear whether it is better to inline or not, in this case, but we found
that a correct implementation when not optimizing was difficult. So we
did the easy thing, and turned it off.
@@ -2976,11 +2976,11 @@ template and does not know what it means or even whether it is valid
assembler input. The extended @code{asm} 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, GNU CC
+bit-field), your constraint must allow a register. In that case, GCC
will use the register as the output of the @code{asm}, and then store
that register into the output.
-The ordinary output operands must be write-only; GNU CC will assume that
+The ordinary output operands must be write-only; GCC will assume 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 @samp{+} to indicate such an
@@ -3017,12 +3017,12 @@ asm ("combine %2,%0" : "=r" (foo) : "r" (foo), "g" (bar));
@end example
Various optimizations or reloading could cause operands 0 and 1 to be in
-different registers; GNU CC knows no reason not to do so. For example, the
+different registers; GCC knows no reason not to do so. For example, the
compiler might find a copy of the value of @code{foo} 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}'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 GNU CC can't tell that.
+code, the result will not work, but GCC can't tell that.
Some instructions clobber specific hard registers. To describe this,
write a third colon after the input operands, followed by the names of
@@ -3044,7 +3044,7 @@ 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 will then also need to specify
@code{volatile} for the @code{asm} construct, as described below, to
-prevent GNU CC from deleting the @code{asm} statement as unused.
+prevent GCC from deleting the @code{asm} statement as unused.
If you refer to a particular hardware register from the assembler code,
you will probably have to list the register after the third colon to
@@ -3053,7 +3053,7 @@ the register names begin with @samp{%}; to produce one @samp{%} in the
assembler code, you must write @samp{%%} in the input.
If your assembler instruction can alter the condition code register, add
-@samp{cc} to the list of clobbered registers. GNU CC on some machines
+@samp{cc} to the list of clobbered registers. GCC on some machines
represents the condition codes as a specific hardware register;
@samp{cc} serves to name this register. On other machines, the
condition code is handled differently, and specifying @samp{cc} has no
@@ -3061,7 +3061,7 @@ effect. But it is valid no matter what the machine.
If your assembler instruction modifies memory in an unpredictable
fashion, add @samp{memory} to the list of clobbered registers. This
-will cause GNU CC to not keep memory values cached in registers across
+will cause GCC to not keep memory values cached in registers across
the assembler instruction. You will also want to add the
@code{volatile} keyword if the memory affected is not listed in the
inputs or outputs of the @code{asm}, as the @samp{memory} clobber does
@@ -3087,7 +3087,7 @@ asm ("movl %0,r9\n\tmovl %1,r10\n\tcall _foo"
: "r9", "r10");
@end example
-Unless an output operand has the @samp{&} constraint modifier, GNU CC
+Unless an output operand has the @samp{&} 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
@@ -3137,7 +3137,7 @@ example, if the desired type were @code{int}, casting the argument to
argument to an @code{int} variable named @code{__arg} would warn about
using a pointer unless the caller explicitly casts it.
-If an @code{asm} has output operands, GNU CC assumes for optimization
+If an @code{asm} 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
@@ -3160,7 +3160,7 @@ the @code{asm}. For example:
@end example
@noindent
-If you write an @code{asm} instruction with no outputs, GNU CC will know
+If you write an @code{asm} instruction with no outputs, GCC will know
the instruction has side-effects and will not delete the instruction or
move it outside of loops.
@@ -3352,8 +3352,8 @@ func (x, y)
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. GNU
-CC does not as yet have the ability to store static variables in registers.
+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.
@node Explicit Reg Vars
@@ -3526,7 +3526,7 @@ unavailable for use in the reload pass; excessive use of this feature
leaves the compiler too few available registers to compile certain
functions.
-This option does not guarantee that GNU CC will generate code that has
+This option does not guarantee that GCC will generate code that has
this variable in the register you specify at all times. You may not
code an explicit reference to this register in an @code{asm} statement
and assume it will always refer to this variable.
@@ -3601,7 +3601,7 @@ This extension is not supported by GNU C++.
@cindex @code{__PRETTY_FUNCTION__} identifier
@cindex @code{__func__} identifier
-GNU CC predefines two magic identifiers to hold the name of the current
+GCC predefines two magic identifiers to hold the name of the current
function. The identifier @code{__FUNCTION__} holds the name of the function
as it appears in the source. The identifier @code{__PRETTY_FUNCTION__}
holds the name of the function pretty printed in a language specific
@@ -3655,7 +3655,7 @@ On the other hand, @samp{#ifdef __FUNCTION__} does not have any special
meaning inside a function, since the preprocessor does not do anything
special with the identifier @code{__FUNCTION__}.
-GNU CC also supports the magic word @code{__func__}, defined by the
+GCC also supports the magic word @code{__func__}, defined by the
ISO standard C99:
@display
@@ -3722,7 +3722,7 @@ function as well.
@end deftypefn
@node Other Builtins
-@section Other built-in functions provided by GNU CC
+@section Other built-in functions provided by GCC
@cindex built-in functions
@findex __builtin_isgreater
@findex __builtin_isgreaterequal
@@ -3785,7 +3785,7 @@ function as well.
@findex strspn
@findex strstr
-GNU CC provides a large number of built-in functions other than the ones
+GCC provides a large number of built-in functions other than the ones
mentioned above. Some of these are for internal use in the processing
of exceptions or variable-length argument lists and will not be
documented here because they may change from time to time; we do not
@@ -3794,7 +3794,7 @@ recommend general use of these functions.
The remaining functions are provided for optimization purposes.
@opindex fno-builtin
-GNU CC includes built-in versions of many of the functions in the
+GCC includes built-in versions of many of the functions in the
standard C library. The versions prefixed with @code{__builtin_} will
always be treated as having the same meaning as the C library function
even if you specify the @option{-fno-builtin} (@pxref{C Dialect Options})
@@ -3838,7 +3838,7 @@ of these functions have corresponding versions prefixed with
@code{__builtin_}, except that the version for @code{sqrt} is called
@code{__builtin_fsqrt}.
-GNU CC provides built-in versions of the ISO C99 floating point
+GCC provides built-in versions of the ISO C99 floating point
comparison macros (that avoid raising exceptions for unordered
operands): @code{__builtin_isgreater}, @code{__builtin_isgreaterequal},
@code{__builtin_isless}, @code{__builtin_islessequal},
@@ -3848,12 +3848,12 @@ operands): @code{__builtin_isgreater}, @code{__builtin_isgreaterequal},
@deftypefn {Built-in Function} int __builtin_constant_p (@var{exp})
You can use the built-in function @code{__builtin_constant_p} to
determine if a value is known to be constant at compile-time and hence
-that GNU CC can perform constant-folding on expressions involving that
+that GCC can perform constant-folding on expressions involving that
value. The argument of the function is the value to test. The function
returns the integer 1 if the argument is known to be a compile-time
constant and 0 if it is not known to be a compile-time constant. A
return of 0 does not indicate that the value is @emph{not} a constant,
-but merely that GNU CC cannot prove it is a constant with the specified
+but merely that GCC cannot prove it is a constant with the specified
value of the @option{-O} option.
You would typically use this function in an embedded application where
@@ -3869,7 +3869,7 @@ a function if it does not. For example:
You may use this built-in function in either a macro or an inline
function. However, if you use it in an inlined function and pass an
-argument of the function as the argument to the built-in, GNU CC will
+argument of the function as the argument to the built-in, GCC will
never return 1 when you call the inline function with a string constant
or compound literal (@pxref{Compound Literals}) and will not return 1
when you pass a constant numeric value to the inline function unless you
@@ -4031,16 +4031,16 @@ volatile int *src = @var{somevalue};
@end example
With C, such expressions are rvalues, and as rvalues cause a read of
-the object, gcc interprets this as a read of the volatile being pointed
+the object, GCC interprets this as a read of the volatile being pointed
to. 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 this lvalue to rvalue conversion which is responsible for
causing an access. However, 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
+because it would surprise most programmers, G++ treats dereferencing a
pointer to volatile object of complete type in a void context as a read
-of the object. When the object has incomplete type, g++ issues a
+of the object. When the object has incomplete type, G++ issues a
warning.
@example
@@ -4057,7 +4057,7 @@ causes a read of the object pointed to. If you wish to force an error on
the first case, you must force a conversion to rvalue with, for instance
a static cast, @code{static_cast<S>(*ptr1)}.
-When using a reference to volatile, g++ does not treat equivalent
+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