From patchwork Wed Dec 28 02:54:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 89144 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp5269739qgi; Tue, 27 Dec 2016 18:55:26 -0800 (PST) X-Received: by 10.99.227.81 with SMTP id o17mr63884821pgj.69.1482893726030; Tue, 27 Dec 2016 18:55:26 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id e22si48383857pli.289.2016.12.27.18.55.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 18:55:26 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445085-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-445085-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445085-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=odukrtTblny7WMTsxRDRtDc2SC+5VP8nYnO+mzCPlmkOpCNP7D yzMZ9+J75Ommqzm+d1fItIN3SqCqEK64z/aOocpfEdnVQVR12naN5bwMWJa5LlQV s4muxas6KY6lXvzbWqkzIiMWdlgDZLDwHVMw1stBhU/8nO/Evr91gWTB4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=ctv2sj5O3X2I8wEoN6EoQlsFHGg=; b=duo8C6p5vtCqwK7zuxqs 189BHXQ2IpHt9ZNpBbu4pBk4OcLK6jhS4ZtYLAfyCG4CgmR5jxPti38DRV8rfCSL +hFYullHDWoXF/kbpYgxVVCzHM9tgKV6KNNIEP14BRJpYjBth+SZRDxEvK8nUdvY mMmtQAFUS0vwpUAPpQxSH94= Received: (qmail 23027 invoked by alias); 28 Dec 2016 02:55:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 22999 invoked by uid 89); 28 Dec 2016 02:55:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL, BAYES_50, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=no version=3.3.2 spammy=Preprocessor, xref, @xref, ifclear X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Dec 2016 02:54:56 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cM4OD-0005fF-JB from Sandra_Loosemore@mentor.com for gcc-patches@gcc.gnu.org; Tue, 27 Dec 2016 18:54:53 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 27 Dec 2016 18:54:50 -0800 To: "gcc-patches@gcc.gnu.org" From: Sandra Loosemore Subject: [doc, committed] split up cppopts.texi Message-ID: <58632979.7050204@codesourcery.com> Date: Tue, 27 Dec 2016 19:54:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) This patch splits up cppopts.texi into 3 pieces. Moving the include path options and warning options into separate files allows those parts to be included in more appropriate places in the GCC manual. Previously, for instance, some of the include path options were listed as preprocessor options, some were listed as directory options (and only in the GCC manual), and some were listed in both places; now they all appear as directory options in the GCC manual, and all appear in the CPP manual too. I've corrected the option summary lists to add many missing options, and sorted the list of preprocessor options. This is the last piece of reorganization/refactoring I've been planning in this series, although as I've been working on moving things around I've realized that the descriptive text for several of the options needs cleanup and correction as well. So there will be more installments coming. -Sandra Index: gcc/doc/cppdiropts.texi =================================================================== --- gcc/doc/cppdiropts.texi (nonexistent) +++ gcc/doc/cppdiropts.texi (working copy) @@ -0,0 +1,135 @@ +@c Copyright (C) 1999-2016 Free Software Foundation, Inc. +@c This is part of the CPP and GCC manuals. +@c For copying conditions, see the file gcc.texi. + +@c --------------------------------------------------------------------- +@c Options affecting include directory search in the preprocessor +@c --------------------------------------------------------------------- + +@c If this file is included with the flag ``cppmanual'' set, it is +@c formatted for inclusion in the CPP manual; otherwise the main GCC manual. + +@item -I @var{dir} +@opindex I +Add the directory @var{dir} to the list of directories to be searched +for header files. +@ifset cppmanual +@xref{Search Path}. +@end ifset +If you use more than +one @option{-I} option, the directories are scanned in left-to-right +order; the standard system directories come after. + +This can be used to override a system header +file, substituting your own version, since these directories are +searched before the system header file directories. However, you should +not use this option to add directories that contain vendor-supplied +system header files (use @option{-isystem} for that). + +If a standard system include directory, or a directory specified with +@option{-isystem}, is also specified with @option{-I}, the @option{-I} +option is ignored. The directory is still searched but as a +system directory at its normal position in the system include chain. +This is to ensure that GCC's procedure to fix buggy system headers and +the ordering for the @code{include_next} directive are not inadvertently changed. +If you really need to change the search order for system directories, +use the @option{-nostdinc} and/or @option{-isystem} options. +@ifset cppmanual +@xref{System Headers}. +@end ifset + +If @var{dir} begins with @code{=}, then the @code{=} is replaced +by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. + +@item -iquote @var{dir} +@opindex iquote +Search @var{dir} only for header files requested with +@code{@w{#include "@var{file}"}}; they are not searched for +@code{@w{#include <@var{file}>}}, before all directories specified by +@option{-I} and before the standard system directories. +@ifset cppmanual +@xref{Search Path}. +@end ifset +If @var{dir} begins with @code{=}, then the @code{=} is replaced +by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. + +@item -isystem @var{dir} +@opindex isystem +Search @var{dir} for header files, after all directories specified by +@option{-I} but before the standard system directories. Mark it +as a system directory, so that it gets the same special treatment as +is applied to the standard system directories. +@ifset cppmanual +@xref{System Headers}. +@end ifset +If @var{dir} begins with @code{=}, then the @code{=} is replaced +by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. + +@item -I- +@opindex I- +Split the include path. +This option has been deprecated. Please use @option{-iquote} instead for +@option{-I} directories before the @option{-I-} and remove the @option{-I-} +option. + +Any directories specified with @option{-I} +options before @option{-I-} are searched only for headers requested with +@code{@w{#include "@var{file}"}}; they are not searched for +@code{@w{#include <@var{file}>}}. If additional directories are +specified with @option{-I} options after the @option{-I-}, those +directories are searched for all @samp{#include} directives. + +In addition, @option{-I-} inhibits the use of the directory of the current +file directory as the first search directory for @code{@w{#include +"@var{file}"}}. There is no way to override this effect of @option{-I-}. +@ifset cppmanual +@xref{Search Path}. +@end ifset + +@item -idirafter @var{dir} +@opindex idirafter +Search @var{dir} for header files, but do it @emph{after} all +directories specified with @option{-I} and the standard system directories +have been exhausted. @var{dir} is treated as a system include directory. +If @var{dir} begins with @code{=}, then the @code{=} will be replaced +by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. + +@item -iprefix @var{prefix} +@opindex iprefix +Specify @var{prefix} as the prefix for subsequent @option{-iwithprefix} +options. If the prefix represents a directory, you should include the +final @samp{/}. + +@item -iwithprefix @var{dir} +@itemx -iwithprefixbefore @var{dir} +@opindex iwithprefix +@opindex iwithprefixbefore +Append @var{dir} to the prefix specified previously with +@option{-iprefix}, and add the resulting directory to the include search +path. @option{-iwithprefixbefore} puts it in the same place @option{-I} +would; @option{-iwithprefix} puts it where @option{-idirafter} would. + +@item -isysroot @var{dir} +@opindex isysroot +This option is like the @option{--sysroot} option, but applies only to +header files (except for Darwin targets, where it applies to both header +files and libraries). See the @option{--sysroot} option for more +information. + +@item -imultilib @var{dir} +@opindex imultilib +Use @var{dir} as a subdirectory of the directory containing +target-specific C++ headers. + +@item -nostdinc +@opindex nostdinc +Do not search the standard system directories for header files. +Only the directories you have specified with @option{-I} options +(and the directory of the current file, if appropriate) are searched. + +@item -nostdinc++ +@opindex nostdinc++ +Do not search for header files in the C++-specific standard directories, +but do still search the other standard directories. (This option is +used when building the C++ library.) + Index: gcc/doc/cppwarnopts.texi =================================================================== --- gcc/doc/cppwarnopts.texi (nonexistent) +++ gcc/doc/cppwarnopts.texi (working copy) @@ -0,0 +1,83 @@ +@c Copyright (C) 1999-2016 Free Software Foundation, Inc. +@c This is part of the CPP and GCC manuals. +@c For copying conditions, see the file gcc.texi. + +@c --------------------------------------------------------------------- +@c Options affecting preprocessor warnings +@c --------------------------------------------------------------------- + +@c If this file is included with the flag ``cppmanual'' set, it is +@c formatted for inclusion in the CPP manual; otherwise the main GCC manual. + +@item -Wcomment +@itemx -Wcomments +@opindex Wcomment +@opindex Wcomments +Warn whenever a comment-start sequence @samp{/*} appears in a @samp{/*} +comment, or whenever a backslash-newline appears in a @samp{//} comment. +This warning is enabled by @option{-Wall}. + +@item -Wtrigraphs +@opindex Wtrigraphs +@anchor{Wtrigraphs} +Warn if any trigraphs are encountered that might change the meaning of +the program. Trigraphs within comments are not warned about, +except those that would form escaped newlines. + +This option is implied by @option{-Wall}. If @option{-Wall} is not +given, this option is still enabled unless trigraphs are enabled. To +get trigraph conversion without warnings, but get the other +@option{-Wall} warnings, use @samp{-trigraphs -Wall -Wno-trigraphs}. + +@item -Wundef +@opindex Wundef +@opindex Wno-undef +Warn if an undefined identifier is evaluated in an @code{#if} directive. +Such identifiers are replaced with zero. + +@item -Wexpansion-to-defined +@opindex Wexpansion-to-defined +Warn whenever @samp{defined} is encountered in the expansion of a macro +(including the case where the macro is expanded by an @samp{#if} directive). +Such usage is not portable. +This warning is also enabled by @option{-Wpedantic} and @option{-Wextra}. + +@item -Wunused-macros +@opindex Wunused-macros +Warn about macros defined in the main file that are unused. A macro +is @dfn{used} if it is expanded or tested for existence at least once. +The preprocessor will also warn if the macro has not been used at the +time it is redefined or undefined. + +Built-in macros, macros defined on the command line, and macros +defined in include files are not warned about. + +@emph{Note:} If a macro is actually used, but only used in skipped +conditional blocks, then CPP will report it as unused. To avoid the +warning in such a case, you might improve the scope of the macro's +definition by, for example, moving it into the first skipped block. +Alternatively, you could provide a dummy use with something like: + +@smallexample +#if defined the_macro_causing_the_warning +#endif +@end smallexample + +@item -Wno-endif-labels +@opindex Wno-endif-labels +@opindex Wendif-labels +Do not warn whenever an @code{#else} or an @code{#endif} are followed by text. +This usually happens in code of the form + +@smallexample +#if FOO +@dots{} +#else FOO +@dots{} +#endif FOO +@end smallexample + +@noindent +The second and third @code{FOO} should be in comments, but often are not +in older programs. This warning is on by default. + Index: gcc/doc/cppopts.texi =================================================================== --- gcc/doc/cppopts.texi (revision 243944) +++ gcc/doc/cppopts.texi (working copy) @@ -47,97 +47,6 @@ standard predefined macros remain define @xref{Standard Predefined Macros}. @end ifset -@item -I @var{dir} -@opindex I -Add the directory @var{dir} to the list of directories to be searched -for header files. -@ifset cppmanual -@xref{Search Path}. -@end ifset -Directories named by @option{-I} are searched before the standard -system include directories. If the directory @var{dir} is a standard -system include directory, the option is ignored to ensure that the -default search order for system directories and the special treatment -of system headers are not defeated -@ifset cppmanual -(@pxref{System Headers}) -@end ifset -. -If @var{dir} begins with @code{=}, then the @code{=} will be replaced -by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. - -@item -Wcomment -@itemx -Wcomments -@opindex Wcomment -@opindex Wcomments -Warn whenever a comment-start sequence @samp{/*} appears in a @samp{/*} -comment, or whenever a backslash-newline appears in a @samp{//} comment. -This warning is enabled by @option{-Wall}. - -@item -Wtrigraphs -@opindex Wtrigraphs -@anchor{Wtrigraphs} -Warn if any trigraphs are encountered that might change the meaning of -the program. Trigraphs within comments are not warned about, -except those that would form escaped newlines. - -This option is implied by @option{-Wall}. If @option{-Wall} is not -given, this option is still enabled unless trigraphs are enabled. To -get trigraph conversion without warnings, but get the other -@option{-Wall} warnings, use @samp{-trigraphs -Wall -Wno-trigraphs}. - -@item -Wundef -@opindex Wundef -@opindex Wno-undef -Warn if an undefined identifier is evaluated in an @code{#if} directive. -Such identifiers are replaced with zero. - -@item -Wexpansion-to-defined -@opindex Wexpansion-to-defined -Warn whenever @samp{defined} is encountered in the expansion of a macro -(including the case where the macro is expanded by an @samp{#if} directive). -Such usage is not portable. -This warning is also enabled by @option{-Wpedantic} and @option{-Wextra}. - -@item -Wunused-macros -@opindex Wunused-macros -Warn about macros defined in the main file that are unused. A macro -is @dfn{used} if it is expanded or tested for existence at least once. -The preprocessor will also warn if the macro has not been used at the -time it is redefined or undefined. - -Built-in macros, macros defined on the command line, and macros -defined in include files are not warned about. - -@emph{Note:} If a macro is actually used, but only used in skipped -conditional blocks, then CPP will report it as unused. To avoid the -warning in such a case, you might improve the scope of the macro's -definition by, for example, moving it into the first skipped block. -Alternatively, you could provide a dummy use with something like: - -@smallexample -#if defined the_macro_causing_the_warning -#endif -@end smallexample - -@item -Wno-endif-labels -@opindex Wno-endif-labels -@opindex Wendif-labels -Do not warn whenever an @code{#else} or an @code{#endif} are followed by text. -This usually happens in code of the form - -@smallexample -#if FOO -@dots{} -#else FOO -@dots{} -#endif FOO -@end smallexample - -@noindent -The second and third @code{FOO} should be in comments, but often are not -in older programs. This warning is on by default. - @item -M @opindex M @cindex @command{make} @@ -295,36 +204,7 @@ You should not write this @code{#pragma} safe to edit the filename if the PCH file is available in a different location. The filename may be absolute or it may be relative to GCC's current directory. - @end ifclear -@item -I- -@opindex I- -Split the include path. Any directories specified with @option{-I} -options before @option{-I-} are searched only for headers requested with -@code{@w{#include "@var{file}"}}; they are not searched for -@code{@w{#include <@var{file}>}}. If additional directories are -specified with @option{-I} options after the @option{-I-}, those -directories are searched for all @samp{#include} directives. - -In addition, @option{-I-} inhibits the use of the directory of the current -file directory as the first search directory for @code{@w{#include -"@var{file}"}}. -@ifset cppmanual -@xref{Search Path}. -@end ifset -This option has been deprecated. - -@item -nostdinc -@opindex nostdinc -Do not search the standard system directories for header files. -Only the directories you have specified with @option{-I} options -(and the directory of the current file, if appropriate) are searched. - -@item -nostdinc++ -@opindex nostdinc++ -Do not search for header files in the C++-specific standard directories, -but do still search the other standard directories. (This option is -used when building the C++ library.) @item -include @var{file} @opindex include @@ -348,65 +228,6 @@ processing its declarations. All files specified by @option{-imacros} are processed before all files specified by @option{-include}. -@item -idirafter @var{dir} -@opindex idirafter -Search @var{dir} for header files, but do it @emph{after} all -directories specified with @option{-I} and the standard system directories -have been exhausted. @var{dir} is treated as a system include directory. -If @var{dir} begins with @code{=}, then the @code{=} will be replaced -by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. - -@item -iprefix @var{prefix} -@opindex iprefix -Specify @var{prefix} as the prefix for subsequent @option{-iwithprefix} -options. If the prefix represents a directory, you should include the -final @samp{/}. - -@item -iwithprefix @var{dir} -@itemx -iwithprefixbefore @var{dir} -@opindex iwithprefix -@opindex iwithprefixbefore -Append @var{dir} to the prefix specified previously with -@option{-iprefix}, and add the resulting directory to the include search -path. @option{-iwithprefixbefore} puts it in the same place @option{-I} -would; @option{-iwithprefix} puts it where @option{-idirafter} would. - -@item -isysroot @var{dir} -@opindex isysroot -This option is like the @option{--sysroot} option, but applies only to -header files (except for Darwin targets, where it applies to both header -files and libraries). See the @option{--sysroot} option for more -information. - -@item -imultilib @var{dir} -@opindex imultilib -Use @var{dir} as a subdirectory of the directory containing -target-specific C++ headers. - -@item -isystem @var{dir} -@opindex isystem -Search @var{dir} for header files, after all directories specified by -@option{-I} but before the standard system directories. Mark it -as a system directory, so that it gets the same special treatment as -is applied to the standard system directories. -@ifset cppmanual -@xref{System Headers}. -@end ifset -If @var{dir} begins with @code{=}, then the @code{=} will be replaced -by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. - -@item -iquote @var{dir} -@opindex iquote -Search @var{dir} only for header files requested with -@code{@w{#include "@var{file}"}}; they are not searched for -@code{@w{#include <@var{file}>}}, before all directories specified by -@option{-I} and before the standard system directories. -@ifset cppmanual -@xref{Search Path}. -@end ifset -If @var{dir} begins with @code{=}, then the @code{=} will be replaced -by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. - @item -fdirectives-only @opindex fdirectives-only When preprocessing, handle directives, but do not expand macros. Index: gcc/doc/cpp.texi =================================================================== --- gcc/doc/cpp.texi (revision 243943) +++ gcc/doc/cpp.texi (working copy) @@ -4349,6 +4349,8 @@ options may @emph{not} be grouped: @opti @table @gcctabopt @include cppopts.texi +@include cppdiropts.texi +@include cppwarnopts.texi @end table @c man end Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 243944) +++ gcc/doc/invoke.texi (working copy) @@ -272,7 +272,7 @@ Objective-C and Objective-C++ Dialects}. -Wdisabled-optimization @gol -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol -Wno-div-by-zero -Wdouble-promotion -Wduplicated-cond @gol --Wempty-body -Wenum-compare -Wno-endif-labels @gol +-Wempty-body -Wenum-compare -Wno-endif-labels -Wexpansion-to-defined @gol -Werror -Werror=* -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol -Wno-format-contains-nul -Wno-format-extra-args -Wformat-length=@var{n} @gol -Wformat-nonliteral @gol @@ -316,8 +316,9 @@ Objective-C and Objective-C++ Dialects}. -Wtype-limits -Wundef @gol -Wuninitialized -Wunknown-pragmas -Wunsafe-loop-optimizations @gol -Wunsuffixed-float-constants -Wunused -Wunused-function @gol --Wunused-label -Wunused-local-typedefs -Wunused-parameter @gol --Wno-unused-result -Wunused-value @gol -Wunused-variable @gol +-Wunused-label -Wunused-local-typedefs -Wunused-macros @gol +-Wunused-parameter -Wno-unused-result @gol +-Wunused-value -Wunused-variable @gol -Wunused-const-variable -Wunused-const-variable=@var{n} @gol -Wunused-but-set-parameter -Wunused-but-set-variable @gol -Wuseless-cast -Wvariadic-macros -Wvector-operation-performance @gol @@ -463,20 +464,22 @@ Objective-C and Objective-C++ Dialects}. @xref{Preprocessor Options,,Options Controlling the Preprocessor}. @gccoptlist{-A@var{question}=@var{answer} @gol -A-@var{question}@r{[}=@var{answer}@r{]} @gol --C -dD -dI -dM -dN @gol --D@var{macro}@r{[}=@var{defn}@r{]} -E -H @gol --idirafter @var{dir} @gol --include @var{file} -imacros @var{file} @gol --iprefix @var{file} -iwithprefix @var{dir} @gol --iwithprefixbefore @var{dir} -isystem @var{dir} @gol --imultilib @var{dir} -isysroot @var{dir} @gol --M -MM -MF -MG -MP -MQ -MT -nostdinc @gol --P -fdebug-cpp -ftrack-macro-expansion -fworking-directory @gol --remap -traditional -traditional-cpp -trigraphs @gol --undef -U@var{macro} @gol --Wp,@var{option} -Xpreprocessor @var{option} -no-integrated-cpp} +-C -CC -D@var{macro}@r{[}=@var{defn}@r{]} @gol +-dD -dI -dM -dN -dU @gol +-fdebug-cpp -fdirectives-only -fdollars-in-identifiers @gol +-fexec-charset=@var{charset} -fextended-identifiers @gol +-finput-charset=@var{charset} -fno-canonical-system-headers @gol +-fpch-deps -fpch-preprocess -fpreprocessed @gol +-ftabstop=@var{width} -ftrack-macro-expansion @gol +-fwide-exec-charset=@var{charset} -fworking-directory @gol +-H -imacros @var{file} -include @var{file} @gol +-M -MD -MF -MG -MM -MMD -MP -MQ -MT @gol +-no-integrated-cpp -P -remap @gol +-traditional -traditional-cpp -trigraphs @gol +-U@var{macro} -undef @gol +-Wp,@var{option} -Xpreprocessor @var{option}} -@item Assembler Option +@item Assembler Options @xref{Assembler Options,,Passing Options to the Assembler}. @gccoptlist{-Wa,@var{option} -Xassembler @var{option}} @@ -493,9 +496,14 @@ Objective-C and Objective-C++ Dialects}. @item Directory Options @xref{Directory Options,,Options for Directory Search}. -@gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol --iquote@var{dir} -L@var{dir} -no-canonical-prefixes -I- @gol ---sysroot=@var{dir} --no-sysroot-suffix} +@gccoptlist{-B@var{prefix} -I@var{dir} -I- @gol +-idirafter @var{dir} @gol +-imacros @var{file} -imultilib @var{dir} @gol +-iplugindir=@var{dir} -iprefix @var{file} @gol +-iquote @var{dir} -isysroot @var{dir} -isystem @var{dir} @gol +-iwithprefix @var{dir} -iwithprefixbefore @var{dir} @gol +-L@var{dir} -no-canonical-prefixes --no-sysroot-suffix @gol +-nostdinc -nostdinc++ --sysroot=@var{dir}} @item Code Generation Options @xref{Code Gen Options,,Options for Code Generation Conventions}. @@ -5638,6 +5646,8 @@ example, warn if an unsigned variable is @code{<} or @code{>=}. This warning is also enabled by @option{-Wextra}. +@include cppwarnopts.texi + @item -Wbad-function-cast @r{(C and Objective-C only)} @opindex Wbad-function-cast @opindex Wno-bad-function-cast @@ -11305,7 +11315,15 @@ Some of these options make sense only to they cause the preprocessor output to be unsuitable for actual compilation. +In addition to the options listed here, there are a number of options +to control search paths for include files documented in +@ref{Directory Options}. +Options to control preprocessor diagnostics are listed in +@ref{Warning Options}. + @table @gcctabopt +@include cppopts.texi + @item -Wp,@var{option} @opindex Wp You can use @option{-Wp,@var{option}} to bypass the compiler driver @@ -11342,7 +11360,6 @@ This option may be useful in conjunction perform additional processing of the program source between normal preprocessing and compilation. -@include cppopts.texi @end table @node Assembler Options @@ -11712,25 +11729,7 @@ These options specify directories to sea libraries and for parts of the compiler: @table @gcctabopt -@item -I@var{dir} -@opindex I -Add the directory @var{dir} to the head of the list of directories to be -searched for header files. This can be used to override a system header -file, substituting your own version, since these directories are -searched before the system header file directories. However, you should -not use this option to add directories that contain vendor-supplied -system header files (use @option{-isystem} for that). If you use more than -one @option{-I} option, the directories are scanned in left-to-right -order; the standard system directories come after. - -If a standard system include directory, or a directory specified with -@option{-isystem}, is also specified with @option{-I}, the @option{-I} -option is ignored. The directory is still searched but as a -system directory at its normal position in the system include chain. -This is to ensure that GCC's procedure to fix buggy system headers and -the ordering for the @code{include_next} directive are not inadvertently changed. -If you really need to change the search order for system directories, -use the @option{-nostdinc} and/or @option{-isystem} options. +@include cppdiropts.texi @item -iplugindir=@var{dir} @opindex iplugindir= @@ -11739,13 +11738,6 @@ by @option{-fplugin=@var{name}} instead @option{-fplugin=@var{path}/@var{name}.so}. This option is not meant to be used by the user, but only passed by the driver. -@item -iquote@var{dir} -@opindex iquote -Add the directory @var{dir} to the head of the list of directories to -be searched for header files only for the case of @code{#include -"@var{file}"}; they are not searched for @code{#include <@var{file}>}, -otherwise just like @option{-I}. - @item -L@var{dir} @opindex L Add directory @var{dir} to the list of directories to be searched @@ -11826,31 +11818,6 @@ headers may for example be found in @file{@var{dir}/usr/include}. This option disables the addition of such a suffix. -@item -I- -@opindex I- -This option has been deprecated. Please use @option{-iquote} instead for -@option{-I} directories before the @option{-I-} and remove the @option{-I-} -option. -Any directories you specify with @option{-I} options before the @option{-I-} -option are searched only for the case of @code{#include "@var{file}"}; -they are not searched for @code{#include <@var{file}>}. - -If additional directories are specified with @option{-I} options after -the @option{-I-} option, these directories are searched for all @code{#include} -directives. (Ordinarily @emph{all} @option{-I} directories are used -this way.) - -In addition, the @option{-I-} option inhibits the use of the current -directory (where the current input file came from) as the first search -directory for @code{#include "@var{file}"}. There is no way to -override this effect of @option{-I-}. With @option{-I.} you can specify -searching the directory that is current when the compiler is -invoked. That is not exactly the same as what the preprocessor does -by default, but it is often satisfactory. - -@option{-I-} does not inhibit the use of the standard system directories -for header files. Thus, @option{-I-} and @option{-nostdinc} are -independent. @end table @node Code Gen Options