Obsolete Once-Only Headers - Red Hat ENTERPRISE LINUX 3 - USING CPP Using Instructions

Using cpp, the c preprocessor
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING CPP:
Table of Contents

Advertisement

Chapter 11. Implementation Details
An assertion looks like this:
#
(
predicate
answer
must be a single identifier.
predicate
significant except for leading and trailing whitespace, and differences in internal whitespace sequences
are ignored. (This is similar to the rules governing macro redefinition.) Thus,
from
but equivalent to
(x+y)
To test an assertion, you write it in an
has been asserted as an answer for
ns16000
#if #machine (vax) || #machine (ns16000)
You can test whether any answer is asserted for a predicate by omitting the answer in the conditional:
#if #machine
Assertions are made with the
the leading
that identifies assertions in conditionals.
#
#assert
predicate
You may make several assertions with the same predicate and different answers. Subsequent assertions
do not override previous ones for the same predicate. All the answers for any given predicate are
simultaneously true.
Assertions can be cancelled with the
form it cancels only the answer which was specified on the
predicate remain true. You can cancel an entire predicate by leaving out the answer:
#unassert
predicate
In either form, if no such assertion has been made,
You can also make or cancel assertions using command line options. Refer to Chapter 12 Invocation.

11.3.2. Obsolete once-only headers

GNU CPP supports two more ways of indicating that a header file should be read only once. Neither
one is as portable as a wrapper
In the Objective-C language, there is a variant of
does so at most once. If you use
inside the header file to prevent multiple inclusion of the contents. GCC permits the use of
in C and C++ as well as Objective-C. However, it is not in standard C or C++ and should therefore
not be used by portable programs.
)
answer
. Parentheses do not nest inside an answer.
( x + y )
#if
directive. Its sole argument is the assertion to make, without
#assert
(
)
answer
#unassert
, and we recommend you do not use them in new programs.
#ifndef
instead of
#import
can be any sequence of tokens; all characters are
. For example, this conditional succeeds if either
.
machine
directive. It has the same syntax as
#unassert
has no effect.
#unassert
called
#include
, then you don't need the conditionals
#include
(x + y)
#assert
line; other answers for that
which includes a file, but
#import
53
is different
or
vax
. In that
#import

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents