From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13645 invoked by alias); 5 Aug 2009 08:54:41 -0000 Received: (qmail 13630 invoked by uid 22791); 5 Aug 2009 08:54:40 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ey-out-1920.google.com (HELO ey-out-1920.google.com) (74.125.78.148) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Aug 2009 08:54:34 +0000 Received: by ey-out-1920.google.com with SMTP id 13so103634eye.14 for ; Wed, 05 Aug 2009 01:54:31 -0700 (PDT) Received: by 10.210.52.6 with SMTP id z6mr5520046ebz.76.1249462471546; Wed, 05 Aug 2009 01:54:31 -0700 (PDT) Received: from ?192.168.2.99? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id 28sm782360eye.44.2009.08.05.01.54.30 (version=SSLv3 cipher=RC4-MD5); Wed, 05 Aug 2009 01:54:30 -0700 (PDT) Message-ID: <4A794BE5.5030205@gmail.com> Date: Wed, 05 Aug 2009 09:17:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: gcc@gcc.gnu.org Subject: Re: order of -D and -U is significant References: <20090804160330.GA19998@synopsys.com> <90EDB998-87F5-41C4-846E-E5999AB8AB53@ihug.co.nz> <20090804224404.GC19998@synopsys.com> <20090805005805.GJ1239@prunille.vinc17.org> In-Reply-To: <20090805005805.GJ1239@prunille.vinc17.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg00083.txt.bz2 Vincent Lefevre wrote: > On 2009-08-04 15:44:05 -0700, Joe Buck wrote: >> But AFAIK neither Posix nor the C89 standard nor the C99 standard >> say anything about -D and -U flags. It's the Single UNIX specification >> that is the issue, and it refers to a command that is spelled "c89", >> or (in later versions) "c99", not "gcc". > > c99 with the mentioned -D and -U flags is specified by: GCC does not install an executable called "c99". Or one called "c89". So what any standard requires of them is irrelevant to us, except that we would want to make it possible to support that mode of operation. And we do; with our predictable behaviour, all "c89" has to do is sort the command-line options so all the -Ds come first and all the -Us come last, and then invoke "gcc". I'm sure nobody will raise any objection to adding a command-line flag if you want to integrate this behaviour into the driver. Perhaps we could even do the old behave-differently-according-to-argv[0] trick, although I'm not sure if that isn't slightly discouraged these days. cheers, DaveK