From: Tobias Burnus Date: Fri, 21 Jan 2011 22:38:55 +0000 (+0100) Subject: re PR fortran/47394 (Internal compiler error when error count limit is reached) X-Git-Tag: releases/gcc-4.5.3~284 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bf1c0456384434c795170b776e048d7ef2de16b;p=thirdparty%2Fgcc.git re PR fortran/47394 (Internal compiler error when error count limit is reached) 2011-01-21 Tobias Burnus PR fortran/47394 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check): Use defined instead of magic number exit status codes. * scanner.c (include_line, gfc_new_file): Ditto. * gfortranspec.c (lang_specific_driver): Ditto. From-SVN: r169109 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 7faa1584113c..ad7abc5752bf 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2011-01-21 Tobias Burnus + + PR fortran/47394 + * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check): + Use defined instead of magic number exit status codes. + * scanner.c (include_line, gfc_new_file): Ditto. + * gfortranspec.c (lang_specific_driver): Ditto. + 2011-01-16 Jakub Jelinek Backport from mainline diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index b05e669c3707..4d85fdcf2522 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -939,7 +939,7 @@ gfc_error_now (const char *gmsgid, ...) buffer_flag = i; if (flag_fatal_errors) - exit (1); + exit (FATAL_EXIT_CODE); } @@ -956,7 +956,7 @@ gfc_fatal_error (const char *gmsgid, ...) error_print (_("Fatal Error:"), _(gmsgid), argp); va_end (argp); - exit (3); + exit (FATAL_EXIT_CODE); } @@ -1019,7 +1019,7 @@ gfc_error_check (void) gfc_increment_error_count(); if (flag_fatal_errors) - exit (1); + exit (FATAL_EXIT_CODE); } return rc; diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c index d6d4477cda5b..14bd86ef60e5 100644 --- a/gcc/fortran/gfortranspec.c +++ b/gcc/fortran/gfortranspec.c @@ -375,7 +375,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, You may redistribute copies of GNU Fortran\n\ under the terms of the GNU General Public License.\n\ For more information about these matters, see the file named COPYING\n\n")); - exit (0); + exit (SUCCESS_EXIT_CODE); break; case OPTION_help: diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 9abd2d7b447b..3d259a8ef044 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -1841,7 +1841,7 @@ include_line (gfc_char_t *line) filename = gfc_widechar_to_char (begin, -1); if (load_file (filename, NULL, false) == FAILURE) - exit (1); + exit (FATAL_EXIT_CODE); gfc_free (filename); return true; @@ -2045,7 +2045,7 @@ gfc_new_file (void) printf ("%s:%3d %s\n", LOCATION_FILE (line_head->location), LOCATION_LINE (line_head->location), line_head->line); - exit (0); + exit (SUCCESS_EXIT_CODE); #endif return result;