From 6544fbcb2ae41e065b956179bbc6cf7176c8901e Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Sun, 9 Mar 2003 21:44:49 +0000 Subject: [PATCH] gcc.c (do_spec_1): Revert 2003-02-24 patch. * 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 From-SVN: r64047 --- gcc/ChangeLog | 7 +++++++ gcc/gcc.c | 32 +++++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8184d83968a..40c5770305c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-03-09 Roger Sayle + Joern Rennecke + + * 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 * varasm.c (make_decl_one_only): Use declare_weak(). diff --git a/gcc/gcc.c b/gcc/gcc.c index a73985a3e6d..301abfc6212 100644 --- 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 ':': -- 2.30.2