From patchwork Tue Feb 7 19:51:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sebor X-Patchwork-Id: 725299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vHw2S4FS0z9s3s for ; Wed, 8 Feb 2017 06:51:27 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="wT9xBbzx"; dkim-atps=neutral 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=i3CQlpXmpoNk0ReGyCsY4Ktrg6uTDAd7xa9S4R4O9wAjnf7EuN sdSK629p6Rb/dEWm5/e+Cl6tCQCDFSVrYnR11M++R5UBeM0VqEjs4fsT56jjqnsj jF+EYGXS0g1vcc5dglatOjjgMy9xj+EFw9S04IzVLGBQVbs+9ZbHJn/dY= 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=cDohJLfEG+iEuiKoB98at9GNY70=; b=wT9xBbzxkpcQo/tAZtxz 9zcHFO9M2dWFlXin2VPhqOrE4BQ57Kc9L6gW9Ey1LECkqUSWTFdj8xxfs/ga1UdA Y2uJ/PdJ0gy6IXd13wHkV762s9e+qwoTZAHXf85umG564Jwyvwc0Mz8katY83FE3 inRa//GOjPdPiV8JXWjHjZM= Received: (qmail 56669 invoked by alias); 7 Feb 2017 19:51:20 -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 56655 invoked by uid 89); 7 Feb 2017 19:51:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=cpp, @file, interpreted, Hx-languages-length:1667 X-HELO: mail-qt0-f195.google.com Received: from mail-qt0-f195.google.com (HELO mail-qt0-f195.google.com) (209.85.216.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Feb 2017 19:51:18 +0000 Received: by mail-qt0-f195.google.com with SMTP id w20so20312544qtb.1 for ; Tue, 07 Feb 2017 11:51:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=90eNbi2NNzr48A6ifbLV2ofTTDzn+pHsFMxj0CojO04=; b=Zcj0iVCHa1pyrYc2GB4zG8hY5XNbbEZrz8WqoSnZFqj9tJMYUMyT7OvTQKolfBykJq g6npRK9IKELT/T6dSMnYQ08rSA3D9/o3dJEXqUp+cl8OVoIoQ1Vrceg0itdJtekeel/j WCLDCz3M3bhUB2+kLyvCTKaNGo6dIc3TAV02AAb3VGKwcpuYKRWKh1pDB0GhPXYRz0xm vRjpphHDm2mNcqjKq+DzPPcVNnCsZ/MH3ak1ZPKJ67lHQmFACzadz5XJAjLunHgyag51 5vsOuZWCw8dVAqkggkqISCcPg61sGHpqDcGyeafSZP6XQJppyZUID1CYKyJqi3M+4RVp fE8Q== X-Gm-Message-State: AMke39lCYnFdW7IQGN9QvXb5ONWRqYJa8JCp4lEI1dXX2LaHyOVwF/5H/GthdTLVk/+IUg== X-Received: by 10.237.37.58 with SMTP id v55mr17148426qtc.15.1486497076282; Tue, 07 Feb 2017 11:51:16 -0800 (PST) Received: from [192.168.0.3] (97-118-107-34.hlrn.qwest.net. [97.118.107.34]) by smtp.gmail.com with ESMTPSA id o7sm4178895qte.30.2017.02.07.11.51.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 11:51:15 -0800 (PST) To: Gcc Patch List From: Martin Sebor Subject: [PATCH doc] update -dM to mention excluded macros (PR 41540) Message-ID: Date: Tue, 7 Feb 2017 12:51:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 X-IsSubscribed: yes The attached documentation-only patch clarifies the description of the -dM option to mention that __FILE__ (and other predefined macros) do no appear on the list generated by the option. Martin PR preprocessor/41540 - -dM -E doesn't #define __FILE__ gcc/ChangeLog: PR preprocessor/41540 * doc/cppopts.texi (-dM): Update. diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi index 0497712..bc76809 100644 --- a/gcc/doc/cppopts.texi +++ b/gcc/doc/cppopts.texi @@ -481,10 +481,10 @@ conflicts, the result is undefined. @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 -preprocessor, including predefined macros. This gives you a way of -finding out what is predefined in your version of the preprocessor. -Assuming you have no file @file{foo.h}, the command +directives for macros defined during the execution of the preprocessor, +including most predefined macros. This gives you a way of finding out +what is predefined in your version of the preprocessor. Assuming you +have no file @file{foo.h}, the command @smallexample touch foo.h; cpp -dM foo.h @@ -493,6 +493,10 @@ touch foo.h; cpp -dM foo.h @noindent shows all the predefined macros. +The predefined macros @code{__FILE__}, @code{__LINE__}, @code{__DATE__}, +and @code{__TIME__} are excluded from this list because their replacements +may change from one line of output to the next. + @ifclear cppmanual If you use @option{-dM} without the @option{-E} option, @option{-dM} is interpreted as a synonym for @option{-fdump-rtl-mach}.