Re: order of -D and -U is significant

2009-08-05 Thread Joe Buck
On Tue, Aug 04, 2009 at 05:58:05PM -0700, 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

Re: order of -D and -U is significant

2009-08-05 Thread Joseph S. Myers
On Wed, 5 Aug 2009, Dave Korn wrote: > 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. The proper thing is to build a separate driver binary (opti

Re: order of -D and -U is significant

2009-08-05 Thread Dave Korn
Vincent Lefevre wrote: > On 2009-08-05 10:07:49 +0100, Dave Korn wrote: >> 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

Re: order of -D and -U is significant

2009-08-05 Thread Vincent Lefevre
On 2009-08-05 10:07:49 +0100, Dave Korn wrote: > 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

Re: order of -D and -U is significant

2009-08-05 Thread Dave Korn
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 la

Re: order of -D and -U is significant

2009-08-04 Thread Vincent Lefevre
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

Re: order of -D and -U is significant

2009-08-04 Thread Joe Buck
On Tue, Aug 04, 2009 at 11:42:51AM -0700, Ross Smith wrote: > > On 2009-08-05, at 04:03, Joe Buck wrote: > > > > Another alternative would be an extra flag that would turn on > > conformance > > to the spec. > > Traditionally spelled -posixly-correct in other GNU software. This would > presumably

Re: order of -D and -U is significant

2009-08-04 Thread Ross Smith
On 2009-08-05, at 04:03, Joe Buck wrote: Another alternative would be an extra flag that would turn on conformance to the spec. Traditionally spelled -posixly-correct in other GNU software. This would presumably also affect other options, such as making the default - std=c99 instead of g

Re: order of -D and -U is significant

2009-08-04 Thread Joe Buck
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

Re: order of -D and -U is significant

2009-08-04 Thread Tom Tromey
> "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): Erw

Re: order of -D and -U is significant

2009-08-04 Thread Vincent Lefevre
On 2009-08-04 08:23:52 +0200, Paolo Bonzini wrote: > User-specified CFLAGS are always passed last in the Makefiles (at > least for Automake, but it is a good practice in general) so that > the user can override options like -D, -U, -O, -g, -f, -m. > > The specified behavior would make this impossi

Re: order of -D and -U is significant

2009-08-04 Thread Vincent Lefevre
On 2009-08-03 15:52:37 +0200, Unruh, Erwin wrote: > In current gcc the order of options -D and -U is significant. The > Single Unix(r) Specification explicitly specifies that the order > should not matter for the c89 command. It reads (cited from > version 2, which is ten years old): [...] FYI, I

Re: order of -D and -U is significant

2009-08-03 Thread Paolo Bonzini
On 08/03/2009 03:52 PM, Unruh, Erwin wrote: 2) Is this a bug? I think it's a bug in the specification. User-specified CFLAGS are always passed last in the Makefiles (at least for Automake, but it is a good practice in general) so that the user can override options like -D, -U, -O, -g, -f, -m