From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29046 invoked by alias); 17 Sep 2008 02:26:51 -0000 Received: (qmail 28196 invoked by uid 48); 17 Sep 2008 02:25:30 -0000 Date: Wed, 17 Sep 2008 02:26:00 -0000 Subject: [Bug preprocessor/37549] New: gcc -E -dD prints predefined macros, contrary to docs X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "martinrb at google dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-09/txt/msg01967.txt.bz2 The docs for preprocessor -dD flag states `D' Like `M' except in two respects: it does _not_ include the predefined macros 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 "" > # 1 "" > # 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