This is the mail archive of the gcc@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]

ordering of evaluation of -D and -U?


The manual says:

"-Dmacro=defn 
	Define macro macro as defn. All instances of `-D' on the command line are processed before any `-U' options. 
-Umacro 
	Undefine macro macro. `-U' options are evaluated after all `-D' options, but before any `-include' and `-imacros' options. "

but the code (yesterdays CVS) says (cppinit.c:cpp_start_reader):

 /* Do -U's, -D's and -A's in the order they were seen.  */  

and indeed this appears to be what it does (or rather, in reverse of the order
they were seen).  2.95.2 does the same thing, while egcs-1.1.2 behaves
something closer to the manual.  What is the desired behavior here?

-- 
Steven King
sxking@uswest.net

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