diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1992-08-25 17:40:04 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1992-08-25 17:40:04 +0000 |
commit | 4401b31c0e44bc154c075096b61d2c345fbdd0f3 (patch) | |
tree | 10e7f80835a4a3a6d75c334206706b3ae13d914b | |
parent | ab78d4a88118834f4c46a3b96801a8575ae40735 (diff) | |
download | gcc-4401b31c0e44bc154c075096b61d2c345fbdd0f3.zip gcc-4401b31c0e44bc154c075096b61d2c345fbdd0f3.tar.gz gcc-4401b31c0e44bc154c075096b61d2c345fbdd0f3.tar.bz2 |
Add %U to give last %u name.
From-SVN: r1942
-rw-r--r-- | gcc/gcc.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -205,6 +205,7 @@ or with constant text in a single argument. concatenation of constant strings on the end, as in `%g.s'. %g also has the same effect of %d. %u like %g, but make the temporary file name unique. + %U returns the last file name generated with %u. %d marks the argument containing or following the %d as a temporary file name, so that that file will be deleted if CC exits successfully. Unlike %g, this contributes no text to the argument. @@ -2494,16 +2495,19 @@ do_spec_1 (spec, inswitch, soft_matched_part) case 'g': case 'u': + case 'U': if (save_temps_flag) obstack_grow (&obstack, input_basename, basename_length); else { obstack_grow (&obstack, temp_filename, temp_filename_length); - if (c == 'u') + if (c == 'u' || c == 'U') { static int unique; char buff[9]; - sprintf (buff, "%d", ++unique); + if (c == 'u') + unique++; + sprintf (buff, "%d", unique); obstack_grow (&obstack, buff, strlen (buff)); } delete_this_arg = 1; |