OSDN Git Service

(lookup_compiler): Fix special code for `-' suffix.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jan 1993 15:10:30 +0000 (15:10 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jan 1993 15:10:30 +0000 (15:10 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3174 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/gcc.c

index 2f21fcb..ff13c10 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3664,12 +3664,13 @@ lookup_compiler (name, length, language)
   /* Look for a suffix.  */
   for (cp = compilers + n_compilers - 1; cp >= compilers; cp--)
     {
-      if (strlen (cp->suffix) < length
-              /* See if the suffix matches the end of NAME.  */
-              && !strcmp (cp->suffix,
-                          name + length - strlen (cp->suffix))
-              /* The suffix `-' matches only the file name `-'.  */
-              && !(!strcmp (cp->suffix, "-") && length != 1))
+      if (/* The suffix `-' matches only the file name `-'.  */
+         (!strcmp (cp->suffix, "-") && !strcmp (name, "-"))
+         ||
+         (strlen (cp->suffix) < length
+          /* See if the suffix matches the end of NAME.  */
+          && !strcmp (cp->suffix,
+                      name + length - strlen (cp->suffix))))
        {
          if (cp->spec[0][0] == '@')
            {