Red Hat ENTERPRISE LINUX 3 - USING CPP Using Instructions page 54

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

Advertisement

50
warn about features of ISO C which you must use when you are using a conforming compiler, such
as the
and
operators.
#
##
Presently
-Wtraditional
Macro parameters that appear within string literals in the macro body. In traditional C macro re-
placement takes place within string literals, but does not in ISO C.
In traditional C, some preprocessor directives did not exist. Traditional preprocessors would
only consider a line to be a directive if the
-Wtraditional
the
does not appear as the first character on the line. It also suggests you hide directives like
#
not understood by traditional C by indenting them. Some traditional implementations
#pragma
would not recognize
A function-like macro that appears without an argument list. In traditional C this was an error. In
ISO C it merely means that the macro is not expanded.
The unary plus operator. This did not exist in traditional C.
The
and
integer constant suffixes, which were not available in traditional C. (Traditional C
U
LL
does support the
L
these suffixes in macros defined in system headers. For instance,
, but you will not be warned if you use
4294967295U
You can usually avoid the warning, and the related warning about constants which are so large that
they are unsigned, by writing the integer constant in question in hexadecimal, with no U suffix.
Take care, though, because this gives the wrong result in exotic cases.
warns about:
warns about directives that traditional C understands but would ignore because
, so it suggests avoiding it altogether.
#elif
suffix for simple long integer constants.) You are not warned about uses of
Chapter 10. Traditional Mode
appeared in column 1 on the line. Therefore
#
UINT_MAX
.
UINT_MAX
may well be defined as

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents