Red Hat ENTERPRISE LINUX 3 - USING GCC Using Instructions page 72

Using the gnu compiler collection (gcc)
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING GCC:
Table of Contents

Advertisement

66
-Wendif-labels
Warn whenever an
the form
#if FOO
...
#else FOO
...
#endif FOO
The second and third
warning is on by default.
-Werror
Make all warnings into hard errors. Source code which triggers warnings will be rejected.
-Wsystem-headers
Issue warnings for code in system headers. These are normally unhelpful in finding bugs in your
own code, therefore suppressed. If you are responsible for the system library, you may want to
see them.
-w
Suppress all warnings, including those which GNU CPP issues by default.
-pedantic
Issue all the mandatory diagnostics listed in the C standard. Some of them are left out by default,
since they trigger frequently on harmless code.
-pedantic-errors
Issue all the mandatory diagnostics, and make all mandatory diagnostics into errors. This in-
cludes mandatory diagnostics that GCC issues without
-M
Instead of outputting the result of preprocessing, output a rule suitable for
dependencies of the main source file. The preprocessor outputs one
object file name for that source file, a colon, and the names of all the included files, including
those coming from
Unless specified explicitly (with
the source file with any suffix replaced with object file suffix. If there are many included files
then the rule is split into several lines using
This option does not suppress the preprocessor's debug output, such as
debug output with the dependency rules you should explicitly specify the dependency output file
with
, or use an environment variable like
-MF
Environment Variables Affecting GCC). Debug output will still be sent to the regular output
stream as normal.
Passing
to the driver implies
-M
-MM
Like
but do not mention header files that are found in system header directories, nor header
-M
files that are included, directly or indirectly, from such a header.
This implies that the choice of angle brackets or double quotes in an
not in itself determine whether that header will appear in
change in semantics from GCC versions 3.0 and earlier.
or an
#else
#endif
should be in comments, but often are not in older programs. This
FOO
or
-include
-imacros
or
-MT
, and suppresses warnings with an implicit
-E
Chapter 4. GCC Command Options
are followed by text. This usually happens in code of
-pedantic
command line options.
), the object file name consists of the basename of
-MQ
-newline. The rule has no commands.
\
DEPENDENCIES_OUTPUT
dependency output. This is a slight
-MM
but treats as warnings.
describing the
make
rule containing the
make
. To avoid mixing such
-dM
(refer to Section 4.19
.
-w
directive does
#include

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