This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: other/823: gcc -U does not undef a macro



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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]