aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1992-08-25 17:40:04 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1992-08-25 17:40:04 +0000
commit4401b31c0e44bc154c075096b61d2c345fbdd0f3 (patch)
tree10e7f80835a4a3a6d75c334206706b3ae13d914b
parentab78d4a88118834f4c46a3b96801a8575ae40735 (diff)
downloadgcc-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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index ef5abb8..11f5d9c 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -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;