Red Hat ENTERPRISE LINUX 4 Manual page 41

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

Advertisement

Chapter 4. GCC Command Options
-pedantic
Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use
forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO
C, follows the version of the ISO C standard specified by any
Valid ISO C and ISO C++ programs should compile properly with or without this option (though
a rare few will require
ever, without this option, certain GNU extensions and traditional C and C++ features are sup-
ported as well. With this option, they are rejected.
does not cause warning messages for use of the alternate keywords whose names
-pedantic
begin and end with
__extension__
application programs should avoid them. Section 6.39 Alternate Keywords.
Some users try to use
find that it does not do quite what they want: it finds some non-ISO practices, but not all--only
those for which ISO C requires a diagnostic, and some others for which diagnostics have been
added.
A feature to report any failure to conform to ISO C might be useful in some instances, but would
require considerable additional work and would be quite different from
have plans to support such a feature in the near future.
Where the standard specified with
or
, there is a corresponding base standard, the version of ISO C on which the GNU
gnu99
extended dialect is based. Warnings from
base standard. (It would not make sense for such warnings to be given only for features not in
the specified GNU C dialect, since by definition the GNU dialects of C include all features the
compiler supports with the given option, and there would be nothing to warn about.)
-pedantic-errors
Like
-pedantic
-w
Inhibit all warning messages.
-Wno-import
Inhibit warning messages about the use of
-Wchar-subscripts
Warn if an array subscript has type
forget that this type is signed on some machines.
-Wcomment
Warn whenever a comment-start sequence
Backslash-Newline appears in a
-Wformat
Check calls to
printf
appropriate to the format string specified, and that the conversions specified in the format string
make sense. This includes standard functions, and others specified by format attributes (Section
6.25 Declaring Attributes of Functions), in the
X/Open extension, not in the C standard) families.
The formats are checked against the format features supported by GNU libc version 2.2. These
include all ISO C90 and C99 features, as well as features from the Single Unix Specification
or a
-ansi
-std
. Pedantic warnings are also disabled in the expression that follows
__
. However, only system header files should use these escape routes;
to check programs for strict ISO C conformance. They soon
-pedantic
-std
, except that errors are produced rather than warnings.
char
comment.
//
and
, etc., to make sure that the arguments supplied have types
scanf
option specifying the required version of ISO C). How-
represents a GNU extended dialect of C, such as
are given where they are required by the
-pedantic
.
#import
. This is a common cause of error, as programmers often
appears in a
/*
,
printf
scanf
option used.
-std
-pedantic
comment, or whenever a
/*
,
and
strftime
33
. We don't
gnu89
(an
strfmon

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?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents