This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ordering of evaluation of -D and -U?
- To: gcc at gcc dot gnu dot org
- Subject: ordering of evaluation of -D and -U?
- From: Steven King <sxking at uswest dot net>
- Date: Tue, 3 Oct 2000 09:49:39 -0700
- Organization: is the root of all evil
- Reply-To: sxking at uswest dot net
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