From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32748 invoked by alias); 4 Aug 2009 16:03:49 -0000 Received: (qmail 32505 invoked by uid 22791); 4 Aug 2009 16:03:46 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from us01smtp2.synopsys.com (HELO kiruna.synopsys.com) (198.182.44.80) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Aug 2009 16:03:39 +0000 Received: from crone.synopsys.com (crone.synopsys.com [146.225.7.23]) by kiruna.synopsys.com (Postfix) with ESMTP id CCC6110428; Tue, 4 Aug 2009 09:03:37 -0700 (PDT) Received: from venkatar-opt-lnx.internal.synopsys.com (localhost [127.0.0.1]) by crone.synopsys.com (8.9.1/8.9.1) with ESMTP id JAA29869; Tue, 4 Aug 2009 09:03:37 -0700 (PDT) Received: from venkatar-opt-lnx.internal.synopsys.com (localhost.localdomain [127.0.0.1]) by venkatar-opt-lnx.internal.synopsys.com (8.13.1/8.12.3) with ESMTP id n74G3aJO020059; Tue, 4 Aug 2009 09:03:36 -0700 Received: (from jbuck@localhost) by venkatar-opt-lnx.internal.synopsys.com (8.13.1/8.13.1/Submit) id n74G3VH2020058; Tue, 4 Aug 2009 09:03:31 -0700 Date: Tue, 04 Aug 2009 16:12:00 -0000 From: Joe Buck To: Tom Tromey Cc: "Unruh, Erwin" , GCC mailing list Subject: Re: order of -D and -U is significant Message-ID: <20090804160330.GA19998@synopsys.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i 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/msg00072.txt.bz2 On Tue, Aug 04, 2009 at 08:03:56AM -0700, Tom Tromey wrote: > >>>>> "Erwin" == Unruh, Erwin writes: > > Erwin> In current gcc the order of options -D and -U is significant. The > Erwin> Single Unix(r) Specification explicitly specifies that the order > Erwin> should not matter for the c89 command. It reads (cited from > Erwin> version 2, which is ten years old): > > Erwin> I did not find a justification for the current gcc > Erwin> behavior. > > GCC's behavior is more useful. And, given its age, I think it would be > a mistake to change it. > > I think if you want the c89 behavior, a wrapper program of some kind > would be the way to go. Another alternative would be an extra flag that would turn on conformance to the spec. But gcc can't change its default behavior; this would cause massive breakage.