Fix to %g/%u/%O spec parsing

Nick Clifton nickc@cygnus.com
Thu Jul 16 14:50:00 GMT 1998


I would like to submit the enclosed patch for approval.  It prevents a
spec string of "...%g ..." (ie one without a following suffix), from
passing the entire rest of the spec string as the suffix.

Nick


Thu Jul 16 14:48:04 1998  Nick Clifton  <nickc@cygnus.com>

	* gcc.c (do_spec_1): Cope with %g/%u/%U options which do not have
	a suffix.


Index: gcc.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gcc.c,v
retrieving revision 1.48
diff -p -w -r1.48 gcc.c
*** gcc.c	1998/07/14 14:18:54	1.48
--- gcc.c	1998/07/16 21:41:07
*************** do_spec_1 (spec, inswitch, soft_matched_
*** 3653,3659 ****
  			t->length = p - suffix;
  			t->suffix = save_string (suffix, p - suffix);
  			t->unique = (c != 'g');
! 			temp_filename = make_temp_file (suffix);
  		      }
  		    temp_filename_length = strlen (temp_filename);
  		    t->filename = temp_filename;
--- 3654,3660 ----
  			t->length = p - suffix;
  			t->suffix = save_string (suffix, p - suffix);
  			t->unique = (c != 'g');
! 			temp_filename = make_temp_file (t->suffix);
  		      }
  		    temp_filename_length = strlen (temp_filename);
  		    t->filename = temp_filename;



More information about the Gcc-patches mailing list