]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc.c (main): Set this_file_error if the appropriate compiler for a language has...
authorZack Weinberg <zack@codesourcery.com>
Wed, 3 Oct 2001 00:46:10 +0000 (00:46 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Wed, 3 Oct 2001 00:46:10 +0000 (00:46 +0000)
* gcc.c (main): Set this_file_error if the appropriate
compiler for a language has not been installed.

From-SVN: r45984

gcc/ChangeLog
gcc/gcc.c

index 77bedc4945b086dd59d1d0025018856cb8e0c2bb..4a7a86b9837010640aa053061c8d24c8aa05e42b 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-02  Zack Weinberg  <zack@codesourcery.com>
+
+       * gcc.c (main): Set this_file_error if the appropriate
+       compiler for a language has not been installed.
+
 2001-09-17  Philip Blundell  <philb@gnu.org>
 
        * cccp.c (print_help): Fix typos.
index d4dbf5ea9d67a4f95b58774a2b581948c16ad59b..c5a312d84964fe7f8d5f81a81e2022b91c93c7b7 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -5040,48 +5040,53 @@ main (argc, argv)
          int len;
 
          if (cp->spec[0][0] == '#')
-           error ("%s: %s compiler not installed on this system",
-                  input_filename, &cp->spec[0][1]);
-
-         input_basename = input_filename;
-         for (p = input_filename; *p; p++)
-           if (IS_DIR_SEPARATOR (*p))
-             input_basename = p + 1;
-
-         /* Find a suffix starting with the last period,
-            and set basename_length to exclude that suffix.  */
-         basename_length = strlen (input_basename);
-         p = input_basename + basename_length;
-         while (p != input_basename && *p != '.') --p;
-         if (*p == '.' && p != input_basename)
            {
-             basename_length = p - input_basename;
-             input_suffix = p + 1;
+             error ("%s: %s compiler not installed on this system",
+                    input_filename, &cp->spec[0][1]);
+             this_file_error = 1;
            }
          else
-           input_suffix = "";
+           {
+             input_basename = input_filename;
+             for (p = input_filename; *p; p++)
+               if (IS_DIR_SEPARATOR (*p))
+                 input_basename = p + 1;
+
+             /* Find a suffix starting with the last period,
+                and set basename_length to exclude that suffix.  */
+             basename_length = strlen (input_basename);
+             p = input_basename + basename_length;
+             while (p != input_basename && *p != '.') --p;
+             if (*p == '.' && p != input_basename)
+               {
+                 basename_length = p - input_basename;
+                 input_suffix = p + 1;
+               }
+             else
+               input_suffix = "";
 
-         len = 0;
-         for (j = 0; j < sizeof cp->spec / sizeof cp->spec[0]; j++)
-           if (cp->spec[j])
-             len += strlen (cp->spec[j]);
+             len = 0;
+             for (j = 0; j < sizeof cp->spec / sizeof cp->spec[0]; j++)
+               if (cp->spec[j])
+                 len += strlen (cp->spec[j]);
 
-         {
-           char *p1 = (char *) xmalloc (len + 1);
+             {
+               char *p1 = (char *) xmalloc (len + 1);
            
-           len = 0;
-           for (j = 0; j < sizeof cp->spec / sizeof cp->spec[0]; j++)
-             if (cp->spec[j])
-               {
-                 strcpy (p1 + len, cp->spec[j]);
-                 len += strlen (cp->spec[j]);
-               }
+               len = 0;
+               for (j = 0; j < sizeof cp->spec / sizeof cp->spec[0]; j++)
+                 if (cp->spec[j])
+                   {
+                     strcpy (p1 + len, cp->spec[j]);
+                     len += strlen (cp->spec[j]);
+                   }
            
-           value = do_spec (p1);
-           free (p1);
-         }
-         if (value < 0)
-           this_file_error = 1;
+               value = do_spec (p1);
+               free (p1);
+             }
+             if (value < 0)
+               this_file_error = 1;
+           }
        }
 
       /* If this file's name does not contain a recognized suffix,