(main): Do -D's and -A's and -U's in order specified.
authorRichard Stallman <rms@gnu.org>
Tue, 24 Nov 1992 05:19:01 +0000 (05:19 +0000)
committerRichard Stallman <rms@gnu.org>
Tue, 24 Nov 1992 05:19:01 +0000 (05:19 +0000)
From-SVN: r2788

gcc/cccp.c

index 3c8882087d2b06243cda6810d9746bd8c8892b15..4f2ab7b7a06daee77b1989b20f4345d45ec172f9 100644 (file)
@@ -1451,26 +1451,21 @@ main (argc, argv)
 
   /* Now handle the command line options.  */
 
-  /* Do undefines specified with -U.  */
-  for (i = 1; i < argc; i++)
+  /* Do -U's, -D's and -A's in the order they were seen.  */
+  for (i = 1; i < argc; i++) {
     if (pend_undefs[i]) {
       if (debug_output)
         output_line_command (fp, &outbuf, 0, same_file);
       make_undef (pend_undefs[i], &outbuf);
     }
-
-  /* Do assertions specified with -A.  */
-  for (i = 1; i < argc; i++)
-    if (pend_assertions[i])
-      make_assertion (pend_assertion_options[i], pend_assertions[i]);
-
-  /* Do defines specified with -D.  */
-  for (i = 1; i < argc; i++)
     if (pend_defs[i]) {
       if (debug_output)
         output_line_command (fp, &outbuf, 0, same_file);
       make_definition (pend_defs[i], &outbuf);
     }
+    if (pend_assertions[i])
+      make_assertion (pend_assertion_options[i], pend_assertions[i]);
+  }
 
   done_initializing = 1;