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

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

Advertisement

Chapter 12. Invocation
-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 includes
mandatory diagnostics that GCC issues without
-M
Instead of outputting the result of preprocessing, output a rule suitable for
the 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
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.
-MF
file
When used with
given the preprocessor sends the rules to the same place it would have sent preprocessed output.
When used with the driver options
file.
-MG
When used with
they live in the same directory as the source file. It suppresses preprocessed output, as a missing
header file is ordinarily an error.
This feature is used in automatic updating of makefiles.
-MP
This option instructs CPP to add a phony target for each dependency other than the main file,
causing each to depend on nothing. These dummy rules work around errors
remove header files without updating the
This is typical output:
test.o: test.c test.h
test.h:
or
-include
-imacros
-MT
.
-E
or
, specifies a file to write the dependencies to. If no
-M
-MM
-MD
or
,
says to treat missing header files as generated files and assume
-M
-MM
-MG
-pedantic
command line options.
or
), the object file name consists of the basename of
-MQ
-newline. The rule has no commands.
\
DEPENDENCIES_OUTPUT
-MM
or
,
overrides the default dependency output
-MMD
-MF
to match.
Makefile
but treats as warnings.
make
rule containing the
make
. To avoid mixing such
-dM
. Debug output will still
#include
dependency output. This is a slight
make
59
describing
directive does
switch is
-MF
gives if you

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents