From: Zack Weinberg Date: Wed, 3 Oct 2001 00:46:10 +0000 (+0000) Subject: gcc.c (main): Set this_file_error if the appropriate compiler for a language has... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83d9ca53bce5f1d13fe94aa27fdfe5b23c6e7277;p=thirdparty%2Fgcc.git gcc.c (main): Set this_file_error if the appropriate compiler for a language has not been... * gcc.c (main): Set this_file_error if the appropriate compiler for a language has not been installed. From-SVN: r45984 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 77bedc4945b0..4a7a86b98370 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-10-02 Zack Weinberg + + * gcc.c (main): Set this_file_error if the appropriate + compiler for a language has not been installed. + 2001-09-17 Philip Blundell * cccp.c (print_help): Fix typos. diff --git a/gcc/gcc.c b/gcc/gcc.c index d4dbf5ea9d67..c5a312d84964 100644 --- 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,