gcc.c (do_spec_1): Handle pending argument upon return from handle_braces in "%{...
authorRoger Sayle <roger@eyesopen.com>
Mon, 24 Feb 2003 14:52:42 +0000 (14:52 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 24 Feb 2003 14:52:42 +0000 (14:52 +0000)
* gcc.c (do_spec_1) ['{']:  Handle pending argument upon return
from handle_braces in "%{...}".

From-SVN: r63357

gcc/ChangeLog
gcc/gcc.c

index 2efa9116bd18c2fc5f2da6b952aeef093eb0d4a2..1cdc6428f671a720482833909ddd4097a00db008 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-24  Roger Sayle  <roger@eyesopen.com>
+
+       * gcc.c (do_spec_1) ['{']:  Handle pending argument upon return
+       from handle_braces in "%{...}".
+
 2003-02-24  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        * config/sh/sh.c (TARGET_HAVE_TLS): Conditionally define.
index 52ca42420213b626722d547d9e226b2dd1107328..937f47163f8c44ae92237d7100b9c90da385c79d 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1,6 +1,6 @@
 /* Compiler driver program that can handle many languages.
    Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -5154,6 +5154,18 @@ 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 ':':