From patchwork Sun Mar 11 14:29:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 145983 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]) by ozlabs.org (Postfix) with SMTP id E357AB6FA4 for ; Mon, 12 Mar 2012 01:30:00 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1332081001; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC: Subject:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=u51lzAuCFug1PU+dVoFZKyhhSUE=; b=sWo8SJug854Uuu9 5ldQfnqNpPl3em13JRLw1PAlDQXBkwuOlm1o89CJOE7UxIY8wmVmUeAcIeBKjEay tnRg3OXjRE4MYQHi8ckgf63jE8dZGk+B7+pjC2spqJrOiarNKq/pNBJxgBDknSH3 Rn/b/qCnC9Zhmv5Q/zDOjjvQ32MY= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=jInXkxdzWwSak7naJOTth88GsPRV5dmhps4cnPacNT+QGmQ274q2SEc8PjvDqG xQxSY6mThIdQLyz7E1AVAKaNpnYGar6Pw9CtGco5UlnaNx66dwsf0mVRTHv9QttK hidfr+5zfRdIK6UC7cw0F7eq2MGJrF+3NJD6g35r+kEeA=; Received: (qmail 29918 invoked by alias); 11 Mar 2012 14:29:53 -0000 Received: (qmail 29898 invoked by uid 22791); 11 Mar 2012 14:29:50 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL, BAYES_20, FROM_12LTRDOM X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Mar 2012 14:29:36 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1S6jmA-00043H-Hk from Sandra_Loosemore@mentor.com ; Sun, 11 Mar 2012 07:29:34 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sun, 11 Mar 2012 07:29:33 -0700 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Sun, 11 Mar 2012 07:29:33 -0700 Message-ID: <4F5CB6C3.7010208@codesourcery.com> Date: Sun, 11 Mar 2012 08:29:23 -0600 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: CC: , "Joseph S. Myers" Subject: [patch, RFA] -no-integrated-cpp documentation 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 While I've been cleaning up invoke.texi I noticed that the blurb about -no-integrated-cpp needed some copy-editing and markup changes. Then I noticed that the description didn't make a whole lot of sense, and that it talked about what might happen in the hypothetical case that cc1/cc1plus/cc1obj are merged, which I think only further confused things. And, I further noticed that this option was documented with the C Dialect Options instead of the Preprocessor Options, which is where users might be most likely to look for it. I dug up the original discussion that led to this option being added back in 2003 -- it's here: http://gcc.gnu.org/ml/gcc/2002-12/msg01163.html Based on that and reading the code, I've tried to rewrite the documentation so it makes more sense. Did I get this right? If I'm understanding the intended purpose of this option correctly, it sounds like a really convoluted hack and maybe not what the manual ought to recommend. (If you really want to do stuff with the preprocessed code before compiling it, why not just write a makefile rule or a shell script to use as your $(CC)?) But, I think we have a gazillion other useless options too, and it's probably more trouble to remove than it's worth.... Anyway, I'd appreciate another pair of eyes looking at this, and suggestions on what better to do here if this rewrite isn't adequate. -Sandra 2012-03-11 Sandra Loosemore gcc/ * doc/invoke.texi (Option Summary): Move -no-integrated-cpp from C Language Options to Preprocessor Options. (C Dialect Options): Move -no-integrated-cpp documentation from here... (Preprocessor Options): ...to here. Rewrite the description so it makes more sense, and remove discussion of merging front ends. Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 185168) +++ gcc/doc/invoke.texi (working copy) @@ -174,7 +174,7 @@ in the following sections. -aux-info @var{filename} -fallow-parameterless-variadic-functions @gol -fno-asm -fno-builtin -fno-builtin-@var{function} @gol -fhosted -ffreestanding -fopenmp -fms-extensions -fplan9-extensions @gol --trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol +-trigraphs -traditional -traditional-cpp @gol -fallow-single-precision -fcond-mismatch -flax-vector-conversions @gol -fsigned-bitfields -fsigned-char @gol -funsigned-bitfields -funsigned-char} @@ -433,7 +433,7 @@ Objective-C and Objective-C++ Dialects}. -M -MM -MF -MG -MP -MQ -MT -nostdinc @gol -P -fdebug-cpp -ftrack-macro-expansion -fworking-directory @gol -remap -trigraphs -undef -U@var{macro} @gol --Wp,@var{option} -Xpreprocessor @var{option}} +-Wp,@var{option} -Xpreprocessor @var{option} -no-integrated-cpp} @item Assembler Option @xref{Assembler Options,,Passing Options to the Assembler}. @@ -1794,17 +1794,6 @@ supported for C, not C++. Support ISO C trigraphs. The @option{-ansi} option (and @option{-std} options for strict ISO C conformance) implies @option{-trigraphs}. -@item -no-integrated-cpp -@opindex no-integrated-cpp -Performs a compilation in two passes: preprocessing and compiling. This -option allows a user supplied "cc1", "cc1plus", or "cc1obj" via the -@option{-B} option. The user supplied compilation step can then add in -an additional preprocessing step after normal preprocessing but before -compiling. The default is to use the integrated cpp (internal cpp) - -The semantics of this option will change if "cc1", "cc1plus", and -"cc1obj" are merged. - @cindex traditional C language @cindex C language, traditional @item -traditional @@ -9300,6 +9289,21 @@ recognize. If you want to pass an option that takes an argument, you must use @option{-Xpreprocessor} twice, once for the option and once for the argument. + +@item -no-integrated-cpp +@opindex no-integrated-cpp +Perform preprocessing as a separate pass before compilation. +By default, GCC performs preprocessing as an integrated part of +input tokenization and parsing. +If this option is provided, the appropriate language front end +(@command{cc1}, @command{cc1plus}, or @command{cc1obj} for C, C++, +and Objective-C, respectively) is instead invoked twice, +once for preprocessing only and once for actual compilation +of the preprocessed input. +This option may be useful in conjunction with the @option{-B} or +@option{-wrapper} options to specify an alternate preprocessor or +perform additional processing of the program source between +normal preprocessing and compilation. @end table @include cppopts.texi