This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: order of -D and -U is significant
On Tue, Aug 04, 2009 at 08:03:56AM -0700, Tom Tromey wrote:
> >>>>> "Erwin" == Unruh, Erwin <erwin.unruh@ts.fujitsu.com> 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.