From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 0BC923858C5E for ; Thu, 27 Oct 2022 22:29:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0BC923858C5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 29RMSSoF018346; Thu, 27 Oct 2022 17:28:28 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 29RMSSIP018345; Thu, 27 Oct 2022 17:28:28 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 27 Oct 2022 17:28:28 -0500 From: Segher Boessenkool To: Tom Kacvinsky Cc: gcc-help Subject: Re: Difference in -E output Message-ID: <20221027222827.GD25951@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Oct 27, 2022 at 04:22:11PM -0400, Tom Kacvinsky via Gcc-help wrote: > I am working on an issue that involves our tool depending on the > preprocessed output from gcc -E. > # 4 "test.c" 3 4 > > 0 > > # 4 "test.c" > > ; > > } > > > Notice how when the macro EXIT_SUCCESS is expanded, we get several lines > around the 0? I don't get any of the blank lines you have though? > This is happening for us with GCC 8.3. But using something as early as > 4.8.5 (yeah, I know, > > bad idea), we get this: > > > int main() { > > return 0; > > } > > > I am pretty sure this is an intentional change. What I'd like to know is > if there is a way of > > reverting back to the former behavior? I looked at -P will do what you want (as a side effect though). -traditional also works (and that one is more intentional). Neither of those does *only* this, but either may be usable for your purposes. Have fun, Segher