Chapter 6. Extensions to the C Language Family
void *
__builtin_apply
tion invokes
function
The value of
arguments
specifies the size of the stack argument data, in bytes.
size
This function returns a pointer to data describing how to return whatever value was returned by
. The data is saved in a block of memory allocated on the stack.
function
It is not always simple to compute the proper value for
to compute the amount of data that should be pushed on the stack and copied from the incoming
argument area.
void
__builtin_return
from the containing function. You should specify, for
result
.
__builtin_apply
6.6. Referring to a Type with
Another way to refer to the type of an expression is with
looks like
, but the construct acts semantically like a type name defined with
sizeof
There are two ways of writing the argument to
example with an expression:
typeof (x[0](1))
This assumes that
is an array of pointers to functions; the type described is that of the values of the
x
functions.
Here is an example with a typename as the argument:
typeof (int *)
Here the type described is that of pointers to
If you are writing a header file that must work when included in ISO C programs, write
instead of
. Section 6.39 Alternate Keywords.
typeof
A
-construct can be used anywhere a typedef name could be used. For example, you can use
typeof
it in a declaration, in a cast, or inside of
is often useful in conjunction with the statements-within-expressions feature. Here is how the
typeof
two together can be used to define a safe "maximum" macro that operates on any arithmetic type and
evaluates each of its arguments exactly once:
#define max(a,b) \
({ typeof (a) _a = (a); \
typeof (b) _b = (b); \
_a
_b ? _a : _b; })
The reason for using names that start with underscores for the local variables is to avoid conflicts with
variable names that occur within the expressions that are substituted for
to design a new form of declaration syntax that allows you to declare variables whose scopes start
only after their initializers; this will be a more reliable way to prevent such conflicts.
(void (*
function
with a copy of the parameters described by
should be the value returned by
(void *
) This built-in function returns the value described by
result
typeof
sizeof
)(), void *
arguments
__builtin_apply_args
. The value is used by
size
. The syntax of using of this keyword
typeof
: with an expression or with a type. Here is an
typeof
.
int
or
.
typeof
, size_t
) This built-in func-
size
and
arguments
size
. The argument
__builtin_apply
, a value returned by
result
typedef
__typeof__
and
. Eventually we hope
a
b
137
.
.
Need help?
Do you have a question about the ENTERPRISE LINUX 4 and is the answer not in the manual?