OSDN Git Service

* gcc.c (do_spec_1): Accept numeric characters in file name
authormacro <macro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Oct 2005 15:02:52 +0000 (15:02 +0000)
committermacro <macro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Oct 2005 15:02:52 +0000 (15:02 +0000)
suffixes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105178 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gcc.c

index 2ea7396..f75b7a3 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-10  Maciej W. Rozycki  <macro@linux-mips.org>
+
+       * gcc.c (do_spec_1): Accept numeric characters in file name
+       suffixes.
+
 2005-10-10  Nick Clifton  <nickc@redhat.com>
 
        * config/arm/arm.c: Remove extraneous whitespace.  Remove comment
index 9522611..bb6d5a1 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -380,7 +380,7 @@ or with constant text in a single argument.
        chosen in a way that is hard to predict even when previously
        chosen file names are known.  For example, `%g.s ... %g.o ... %g.s'
        might turn into `ccUVUUAU.s ccXYAXZ12.o ccUVUUAU.s'.  SUFFIX matches
-       the regexp "[.A-Za-z]*%O"; "%O" is treated exactly as if it
+       the regexp "[.0-9A-Za-z]*%O"; "%O" is treated exactly as if it
        had been pre-processed.  Previously, %g was simply substituted
        with a file name chosen once per compilation, without regard
        to any appended suffix (which was therefore treated just like
@@ -4705,7 +4705,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
                arg_going = 1;
 
                /* consume suffix */
-               while (*p == '.' || ISALPHA ((unsigned char) *p))
+               while (*p == '.' || ISALNUM ((unsigned char) *p))
                  p++;
                if (p[0] == '%' && p[1] == 'O')
                  p += 2;
@@ -4717,7 +4717,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
            if (use_pipes)
              {
                /* consume suffix */
-               while (*p == '.' || ISALPHA ((unsigned char) *p))
+               while (*p == '.' || ISALNUM ((unsigned char) *p))
                  p++;
                if (p[0] == '%' && p[1] == 'O')
                  p += 2;
@@ -4735,14 +4735,14 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
                const char *suffix = p;
                char *saved_suffix = NULL;
 
-               while (*p == '.' || ISALPHA ((unsigned char) *p))
+               while (*p == '.' || ISALNUM ((unsigned char) *p))
                  p++;
                suffix_length = p - suffix;
                if (p[0] == '%' && p[1] == 'O')
                  {
                    p += 2;
                    /* We don't support extra suffix characters after %O.  */
-                   if (*p == '.' || ISALPHA ((unsigned char) *p))
+                   if (*p == '.' || ISALNUM ((unsigned char) *p))
                      fatal ("spec '%s' has invalid '%%0%c'", spec, *p);
                    if (suffix_length == 0)
                      suffix = TARGET_OBJECT_SUFFIX;