Alternate Keywords; Incomplete Enum Types; Function Names As Strings - Red Hat ENTERPRISE LINUX 3 - USING GCC Using Instructions

Using the gnu compiler collection (gcc)
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING GCC:
Table of Contents

Advertisement

176
Defining such a register variable does not reserve the register; it remains available for other uses in
places where flow control determines the variable's value is not live. However, these registers are
made 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 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
assume it will always refer to this variable.
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.

6.41. Alternate Keywords

and the various
-ansi
to use GNU C extensions, or a general-purpose header file that should be usable by all programs,
including ISO C programs. The keywords
compiled with
-ansi
The ISO C99 keyword
default) or
-std=c99
The way to solve these problems is to put
For example, use
__asm__
Other C compilers won't accept these alternative keywords; if you want to compile with another com-
piler, you can define the alternate keywords as macros to replace them with the customary keywords.
It looks like this:
#ifndef __GNUC__
#define __asm__ asm
#endif
and other options cause warnings for many GNU C extensions. You can prevent such
-pedantic
warnings within one expression by writing
has no effect aside from this.
6.42. Incomplete
You can define an
enum
much like what you get if you write
which does specify the possible values completes the type.
You can't allocate variables or storage using the type while it is incomplete. However, you can work
with pointers to that type.
This extension may not be very useful, but it makes the handling of
way
and
struct
union
This extension is not supported by GNU C++.

6.43. Function Names as Strings

GCC predefines two magic identifiers to hold the name of the current function. The identifier
holds the name of the function as it appears in the source. The identifier
__FUNCTION__
__PRETTY_FUNCTION__
fashion.
options disable certain keywords. This causes trouble when you want
-std
or
(although
-std
inline
is only available when
restrict
(or the equivalent
-std=iso9899:1999
__
instead of
, and
asm
Types
enum
tag without specifying its possible values. This results in an incomplete type,
struct foo
are handled.
holds the name of the function pretty printed in a language specific
Chapter 6. Extensions to the C Language Family
,
and
asm
typeof
inline
can be used in a program compiled with
-std=gnu99
at the beginning and end of each problematical keyword.
instead of
__inline__
before the expression.
__extension__
without describing the elements. A later declaration
asm
are not available in programs
(which will eventually be the
) is used.
.
inline
__extension__
more consistent with the
enum
statement and
).
-std=c99

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 3 - USING GCC and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Enterprise linux 3

Table of Contents