public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/37549] gcc -E -dD prints predefined macros, contrary to docs
Date: Wed, 17 Sep 2008 03:15:00 -0000	[thread overview]
Message-ID: <20080917031340.22642.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37549-16725@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from pinskia at gmail dot com  2008-09-17 03:13 -------
Subject: Re:   New: gcc -E -dD prints predefined macros, contrary to docs



Sent from my iPhone

On Sep 16, 2008, at 7:25 PM, "martinrb at google dot com"
<gcc-bugzilla@gcc.gnu.org 
 > wrote:

> The docs for preprocessor -dD flag states
>
>    `D'
>          Like `M' except in two respects: it does _not_ include the
>          predefined macros

I think what it means by predefines are the ones included on the  
command line that are defined by the user via -D.

>
>
> So one would expect -dD and -dM to differ substantially.
> But....
>
> (martinrb@spraggett) ~ $ gcc -E -dM -x c /dev/null | sort >/tmp/t1
> (martinrb@spraggett) ~ $ gcc -E -dD -x c /dev/null | sort >/tmp/t2
> (martinrb@spraggett) ~ $ diff /tmp/t[12]
> 0a1,4
>> # 1 "<built-in>"
>> # 1 "<command-line>"
>> # 1 "/dev/null"
>> # 1 "/dev/null"
> (martinrb@spraggett) ~ $ wc /tmp/t[12]
> 111  340 3482 /tmp/t1
> 115  352 3552 /tmp/t2
> 226  692 7034 total
> (martinrb@spraggett) ~ $ gcc --version
> gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
>
>
> -- 
>           Summary: gcc -E -dD prints predefined macros, contrary to  
> docs
>           Product: gcc
>           Version: 4.2.3
>            Status: UNCONFIRMED
>          Severity: normal
>          Priority: P3
>         Component: preprocessor
>        AssignedTo: unassigned at gcc dot gnu dot org
>        ReportedBy: martinrb at google dot com
>  GCC host triplet: x86_64-linux-gnu
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37549
>


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37549


  parent reply	other threads:[~2008-09-17  3:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-17  2:26 [Bug preprocessor/37549] New: " martinrb at google dot com
2008-09-17  3:13 ` Andrew Thomas Pinski
2008-09-17  3:15 ` pinskia at gmail dot com [this message]
2008-09-17  4:28 ` [Bug preprocessor/37549] " martinrb at google dot com
2009-03-30  0:40 ` jsm28 at gcc dot gnu dot org
2009-03-30 23:22 ` tromey at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080917031340.22642.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).