This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: other/823: gcc -U does not undef a macro
- To: Neil Booth <neilb at earthling dot net>
- Subject: Re: other/823: gcc -U does not undef a macro
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Fri, 17 Nov 2000 09:43:29 +0000
- Cc: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
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.