gcc.c (do_spec_1): Revert 2003-02-24 patch.
authorRoger Sayle <roger@eyesopen.com>
Sun, 9 Mar 2003 21:44:49 +0000 (21:44 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sun, 9 Mar 2003 21:44:49 +0000 (21:44 +0000)
* gcc.c (do_spec_1) ['{']: Revert 2003-02-24 patch.  Don't handle
pending argument upon return from handle_braces here.
(do_spec_2): Instead handle it upon return from do_spec_1 here.

Co-Authored-By: Joern Rennecke <joern.rennecke@superh.com>
From-SVN: r64047

gcc/ChangeLog
gcc/gcc.c

index 8184d83968ae5f429a87430aea4ba1be87756a5d..40c5770305c7843c904e8309a935037295820ef6 100644 (file)
@@ -1,3 +1,10 @@
+2003-03-09  Roger Sayle  <roger@eyesopen.com>
+           Joern Rennecke <joern.rennecke@superh.com>
+
+       * gcc.c (do_spec_1) ['{']: Revert 2003-02-24 patch.  Don't handle
+       pending argument upon return from handle_braces here.
+       (do_spec_2): Instead handle it upon return from do_spec_1 here.
+
 2003-03-09  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
 
        * varasm.c (make_decl_one_only): Use declare_weak().
index a73985a3e6de56661c6a48079a5bea45cdb1bbac..301abfc6212f9fb32d1ec427c1ccc07e01a7a8ae 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4248,6 +4248,9 @@ static int
 do_spec_2 (spec)
      const char *spec;
 {
+  const char *string;
+  int result;
+
   clear_args ();
   arg_going = 0;
   delete_this_arg = 0;
@@ -4256,7 +4259,22 @@ do_spec_2 (spec)
   input_from_pipe = 0;
   suffix_subst = NULL;
 
-  return do_spec_1 (spec, 0, NULL);
+  result = do_spec_1 (spec, 0, NULL);
+
+  /* End any pending argument.  */
+  if (arg_going)
+    {
+      obstack_1grow (&obstack, 0);
+      string = obstack_finish (&obstack);
+      if (this_is_library_file)
+       string = find_file (string);
+      store_arg (string, delete_this_arg, this_is_output_file);
+      if (this_is_output_file)
+       outfiles[input_file_number] = string;
+      arg_going = 0;
+    }
+
+  return result;
 }
 
 
@@ -5159,18 +5177,6 @@ do_spec_1 (spec, inswitch, soft_matched_part)
            p = handle_braces (p);
            if (p == 0)
              return -1;
-           /* End any pending argument.  */
-           if (arg_going)
-             {
-               obstack_1grow (&obstack, 0);
-               string = obstack_finish (&obstack);
-               if (this_is_library_file)
-                 string = find_file (string);
-               store_arg (string, delete_this_arg, this_is_output_file);
-               if (this_is_output_file)
-                 outfiles[input_file_number] = string;
-               arg_going = 0;
-             }
            break;
 
          case ':':