From patchwork Sun Jan 8 01:49:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 90296 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp301838qgi; Sat, 7 Jan 2017 17:50:15 -0800 (PST) X-Received: by 10.84.211.3 with SMTP id b3mr160107574pli.119.1483840215471; Sat, 07 Jan 2017 17:50:15 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 1si84488104plw.75.2017.01.07.17.50.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2017 17:50:15 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445627-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-445627-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445627-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=yd9bndzHFsb77tzk674XimYOlN3YHfzwVJ7dPdbJE8yWp46Q/2 XIZWY8nQzw+izExisrHquRmxhNjF9iM7QMkFLhdZz+Mk0iuU0XXLF6AP2ITKhSo8 lMFhL2yeFvTMuz5p7AnAJXuERK2rxt9ns28CDVadxKln9Bb+4KcHWRiHQ= 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=4P/kS7Ok88wW6rn6pE/dMqUdK0Q=; b=SzmjuLgrlKuxtfEonZHX oqv6LY/L3aDwU8DukEBjC5jIAs0Tx0S3bpfcn2lNv1DOcaDfhob6YKNula0eBlwP YJ+0VOBbl4lsD7EIMiXolpJ8iUmNv0scbFJ99GjeeSImgjH8AUyv3TjzoM3W5DFC aRe3oYhgvxHXLnM6DNvvfZI= Received: (qmail 64957 invoked by alias); 8 Jan 2017 01:50:00 -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 64882 invoked by uid 89); 8 Jan 2017 01:49:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=no version=3.3.2 spammy=delayed, aft, Says, D*var 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; Sun, 08 Jan 2017 01:49:49 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cQ2cE-0003Pp-H6 from Sandra_Loosemore@mentor.com for gcc-patches@gcc.gnu.org; Sat, 07 Jan 2017 17:49:46 -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; Sat, 7 Jan 2017 17:49:43 -0800 To: "gcc-patches@gcc.gnu.org" From: Sandra Loosemore Subject: [doc, committed] fix preprocessor -d option table formatting Message-ID: <58719AB6.9060901@codesourcery.com> Date: Sat, 7 Jan 2017 18:49:42 -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-01.mgc.mentorg.com (147.34.90.201) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) PR 54124 complains that the documentation for preprocessor options like -dM is hard to find because the string "-dM" doesn't appear explicitly in the table. Instead, it's documented as @samp{M} in a subtable under the -dCHARS option. The corresponding documentation of the more general compiler dump options, in another section, does list the full name of the options in the subtable. I've fixed the preprocessor -d option documentation to be consistent with that format, and added cross-references back and forth too. -Sandra Index: gcc/doc/cppopts.texi =================================================================== --- gcc/doc/cppopts.texi (revision 244200) +++ gcc/doc/cppopts.texi (working copy) @@ -458,15 +458,20 @@ activities. Each name is indented to sh printed, even if they are found to be invalid; an invalid precompiled header file is printed with @samp{...x} and a valid one with @samp{...!} . -@item -dCHARS -@var{CHARS} is a sequence of one or more of the following characters, -and must not be preceded by a space. Other characters are interpreted +@item -d@var{letters} +@opindex d +Says to make debugging dumps during compilation as specified by +@var{letters}. The flags documented here are those relevant to the +preprocessor. Other @var{letters} are interpreted by the compiler proper, or reserved for future versions of GCC, and so -are silently ignored. If you specify characters whose behavior +are silently ignored. If you specify @var{letters} whose behavior conflicts, the result is undefined. +@ifclear cppmanual +@xref{Developer Options}, for more information. +@end ifclear -@table @samp -@item M +@table @gcctabopt +@item -dM @opindex dM Instead of the normal output, generate a list of @samp{#define} directives for all the macros defined during the execution of the @@ -487,25 +492,25 @@ interpreted as a synonym for @option{-fd @xref{Developer Options, , ,gcc}. @end ifclear -@item D +@item -dD @opindex dD -Like @samp{M} except in two respects: it does @emph{not} include the +Like @option{-dM} except in two respects: it does @emph{not} include the predefined macros, and it outputs @emph{both} the @samp{#define} directives and the result of preprocessing. Both kinds of output go to the standard output file. -@item N +@item -dN @opindex dN -Like @samp{D}, but emit only the macro names, not their expansions. +Like @option{-dD}, but emit only the macro names, not their expansions. -@item I +@item -dI @opindex dI Output @samp{#include} directives in addition to the result of preprocessing. -@item U +@item -dU @opindex dU -Like @samp{D} except that only macros that are expanded, or whose +Like @option{-dD} except that only macros that are expanded, or whose definedness is tested in preprocessor directives, are output; the output is delayed until the use or test of the macro; and @samp{#undef} directives are also output for macros tested but Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 244200) +++ gcc/doc/invoke.texi (working copy) @@ -12541,8 +12541,11 @@ passes that are otherwise registered aft numbered higher than a pass named "final", even if they are executed earlier. @var{dumpname} is generated from the name of the output file if explicitly specified and not an executable, otherwise it is -the basename of the source file. These switches may have different -effects when @option{-E} is used for preprocessing. +the basename of the source file. + +Some @option{-d@var{letters}} switches have different meaning when +@option{-E} is used for preprocessing. @xref{Preprocessor Options}, +for information about preprocessor-specific dump options. Debug dumps can be enabled with a @option{-fdump-rtl} switch or some @option{-d} option @var{letters}. Here are the possible