Constructing Function Calls; Typeof - 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

Chapter 6. Extensions to the C Language Family
/* ... */
for (i = 0; i
/* ... */ access (array, i) /* ... */
/* ... */
return 0;
/* Control comes here from
if it detects an error.
failure:
return -1;
}
A nested function always has internal linkage. Declaring one with
to declare the nested function before its definition, use
function declarations).
bar (int *array, int offset, int size)
{
__label__ failure;
auto int access (int *, int);
/* ... */
int access (int *array, int index)
{
if (index
goto failure;
return array[index + offset];
}
/* ... */
}

6.5. Constructing Function Calls

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.
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).
void *
__builtin_apply_args
perform a call with the same arguments as were passed to the current function.
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.
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
by
from the containing function. You should specify, for
result
.
__builtin_apply
size; i++)
access
*/
size)
() This built-in function returns a pointer to data describing how to
(void (*
function
with a copy of the parameters described by
should be the value returned by
(void *
)
result
(which is otherwise meaningless for
auto
)(), void *
arguments
__builtin_apply_args
. The value is used by
size
This built-in function returns the value described
is erroneous. If you need
extern
, size_t
) This built-in func-
size
and
arguments
size
. The argument
__builtin_apply
, a value returned by
result
125
.

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

This manual is also suitable for:

Enterprise linux 3

Table of Contents