From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26982 invoked by alias); 9 Jan 2012 20:55:04 -0000 Received: (qmail 26971 invoked by uid 22791); 9 Jan 2012 20:55:03 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_KP,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.digium.com (HELO mail.digium.com) (216.207.245.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Jan 2012 20:54:49 +0000 Received: from [10.24.55.203] (helo=zimbra.hsv.digium.com) by mail.digium.com with esmtp (Exim 4.69) (envelope-from ) id 1RkMEz-0003Uv-0h for gcc-help@gcc.gnu.org; Mon, 09 Jan 2012 14:54:49 -0600 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.hsv.digium.com (Postfix) with ESMTP id 07DC91A2006 for ; Mon, 9 Jan 2012 14:54:49 -0600 (CST) Received: from zimbra.hsv.digium.com ([127.0.0.1]) by localhost (zimbra.hsv.digium.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F8b1OkfAQUDh for ; Mon, 9 Jan 2012 14:54:48 -0600 (CST) Received: from [10.24.250.46] (unknown [10.24.250.46]) by zimbra.hsv.digium.com (Postfix) with ESMTPSA id 5DDE91A2001 for ; Mon, 9 Jan 2012 14:54:48 -0600 (CST) Message-ID: <4F0B5417.3040206@digium.com> Date: Tue, 10 Jan 2012 17:01:00 -0000 From: "Kevin P. Fleming" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: Keeping blank lines in C++ preproccessor output References: <20120107025653.ZEMRI.117778.root@cdptpa-web06-z02> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg00057.txt.bz2 On 01/07/2012 01:05 PM, Ian Lance Taylor wrote: > writes: > >> I'm using the C++ preprocessor (g++ -E) to partially preprocess a C++ header file. The preprocessor output documentation (http://gcc.gnu.org/onlinedocs/gcc-4.6.2/cpp/Preprocessor-Output.html#Preprocessor-Output) states: >> >> Long runs of blank lines are discarded. >> >> Rather than have long runs of blank lines discarded, I would prefer that runs of two or more blank lines be replaced by single blank line or be left as is. Does anyone know of a way to accomplish either of these? > > As far as I know there is no way to do this (other than modifying the > preprocessor code). It would not be too hard to write a postprocessor > which looked at the #line statements and recreated the blank lines. You could also use MCPP if you wish to roll your own preprocessing tool with more control over the output. -- Kevin P. Fleming Digium, Inc. | Director of Software Technologies Jabber: kfleming@digium.com | SIP: kpfleming@digium.com | Skype: kpfleming 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at www.digium.com & www.asterisk.org