other/823: gcc -U does not undef a macro
Richard Earnshaw
rearnsha@arm.com
Fri Nov 17 01:44:00 GMT 2000
neilb@earthling.net said:
> It does actually undefine it, but it gets processed before -D :-(
>
> This is a gcc.c specs issue; I don't think fixing it is entirely
> trivial. We need gcc.c to pass all -D and -U options in the order
> they appear, and not to group them like it currently does.
I've just tried an older version of gcc. It also rearranges the options.
However, it does it the other way (-U options are put after -D options).
I don't think either way is "right", but I think we should stick with the
way previous versions did it if it can't be fixed properly; my reasoning
being that it will avoid breaking existing bodies of code that rely on
this.
If it can't be fixed properly, then it ought to be documented behaviour in
invoke.texi.
R.
More information about the Gcc-bugs
mailing list