Red Hat ENTERPRISE LINUX 4 Manual page 42

Hide thumbs Also See for ENTERPRISE LINUX 4:
Table of Contents

Advertisement

34
and some BSD and GNU extensions. Other library implementations may not support all these
features; GCC does not support warning about features that go beyond a particular library's
limitations. However, if
features not in the selected standard version (but not for
any version of the C standard). Section 4.4 Options Controlling C Dialect.
Since
-Wformat
implies
-Wnonnull
is included in
-Wformat
the options
-Wformat-y2k
-Wformat-nonliteral
included in
-Wall
-Wformat-y2k
If
is specified, also warn about
-Wformat
year.
-Wno-format-extra-args
If
is specified, do not warn about excess arguments to a
-Wformat
function. The C standard specifies that such arguments are ignored.
Where the unused arguments lie between used arguments that are specified with
ber specifications, normally warnings are still given, since the implementation could not know
what type to pass to
mats, this option will suppress the warning if the unused arguments are all pointers, since the
Single Unix Specification says that such unused arguments are allowed.
-Wno-format-zero-length
If
is specified, do not warn about zero-length formats. The C standard specifies that
-Wformat
zero-length formats are allowed.
-Wformat-nonliteral
If
is specified, also warn if the format string is not a string literal and so cannot be
-Wformat
checked, unless the format function takes its format arguments as a
-Wformat-security
If
is specified, also warn about uses of format functions that represent possible se-
-Wformat
curity problems. At present, this warns about calls to
format string is not a string literal and there are no format arguments, as in
This may be a security hole if the format string came from untrusted input and contains
is currently a subset of what
be added to
-Wformat-security
-Wformat=2
Enable
-Wformat
-Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k
-Wnonnull
Warn about passing a null pointer for arguments marked as requiring a non-null value by the
function attribute.
nonnull
is included in
-Wnonnull
option.
is used with
-pedantic
also checks for null format arguments for several functions,
.
. For more control over some aspects of format checking,
-Wall
,
-Wno-format-extra-args
,
-Wformat-security
.
to skip the unused arguments. However, in the case of
va_arg
-Wformat-nonliteral
that are not included in
plus format checks not included in
and
-Wall
Chapter 4. GCC Command Options
, warnings will be given about format
-Wformat
strfmon
, and
-Wformat=2
formats which may yield only a two-digit
strftime
printf
warns about, but in future warnings may
-Wformat-nonliteral
-Wformat
. It can be disabled with the
-Wformat
formats, since those are not in
-Wformat
,
-Wno-format-zero-length
are available, but are not
or
printf
scanf
operand num-
$
.
va_list
and
functions where the
scanf
printf (foo);
. Currently equivalent to
.
-Wno-nonnull
also
,
format
for-
scanf
.
. (This
%n
.)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 4 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents