re PR fortran/21061 (gfortran ignores -Werror)
2006-11-05 Bernhard Fischer <aldot@gcc.gnu.org> PR fortran/21061 * error.c (gfc_warning): If warnings_are_errors then treat warnings as errors with respect to the exit code. (gfc_notify_std): Ditto. (gfc_warning_now): Ditto. From-SVN: r118501
This commit is contained in:
parent
7945be3f19
commit
f4d4085c10
|
@ -1,3 +1,11 @@
|
||||||
|
2006-11-05 Bernhard Fischer <aldot@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/21061
|
||||||
|
* error.c (gfc_warning): If warnings_are_errors then treat
|
||||||
|
warnings as errors with respect to the exit code.
|
||||||
|
(gfc_notify_std): Ditto.
|
||||||
|
(gfc_warning_now): Ditto.
|
||||||
|
|
||||||
2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
|
2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
|
||||||
Paul Thomas <pault@gcc.gnu.org>
|
Paul Thomas <pault@gcc.gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -476,7 +476,12 @@ gfc_warning (const char *nocmsgid, ...)
|
||||||
|
|
||||||
va_start (argp, nocmsgid);
|
va_start (argp, nocmsgid);
|
||||||
if (buffer_flag == 0)
|
if (buffer_flag == 0)
|
||||||
|
{
|
||||||
warnings++;
|
warnings++;
|
||||||
|
if (warnings_are_errors)
|
||||||
|
errors++;
|
||||||
|
}
|
||||||
|
|
||||||
error_print (_("Warning:"), _(nocmsgid), argp);
|
error_print (_("Warning:"), _(nocmsgid), argp);
|
||||||
va_end (argp);
|
va_end (argp);
|
||||||
|
|
||||||
|
@ -520,13 +525,14 @@ gfc_notify_std (int std, const char *nocmsgid, ...)
|
||||||
if (gfc_suppress_error)
|
if (gfc_suppress_error)
|
||||||
return warning ? SUCCESS : FAILURE;
|
return warning ? SUCCESS : FAILURE;
|
||||||
|
|
||||||
cur_error_buffer = warning ? &warning_buffer : &error_buffer;
|
cur_error_buffer = (warning && !warnings_are_errors)
|
||||||
|
? &warning_buffer : &error_buffer;
|
||||||
cur_error_buffer->flag = 1;
|
cur_error_buffer->flag = 1;
|
||||||
cur_error_buffer->index = 0;
|
cur_error_buffer->index = 0;
|
||||||
|
|
||||||
if (buffer_flag == 0)
|
if (buffer_flag == 0)
|
||||||
{
|
{
|
||||||
if (warning)
|
if (warning && !warnings_are_errors)
|
||||||
warnings++;
|
warnings++;
|
||||||
else
|
else
|
||||||
errors++;
|
errors++;
|
||||||
|
@ -539,7 +545,7 @@ gfc_notify_std (int std, const char *nocmsgid, ...)
|
||||||
va_end (argp);
|
va_end (argp);
|
||||||
|
|
||||||
error_char ('\0');
|
error_char ('\0');
|
||||||
return warning ? SUCCESS : FAILURE;
|
return (warning && !warnings_are_errors) ? SUCCESS : FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -557,6 +563,8 @@ gfc_warning_now (const char *nocmsgid, ...)
|
||||||
i = buffer_flag;
|
i = buffer_flag;
|
||||||
buffer_flag = 0;
|
buffer_flag = 0;
|
||||||
warnings++;
|
warnings++;
|
||||||
|
if (warnings_are_errors)
|
||||||
|
errors++;
|
||||||
|
|
||||||
va_start (argp, nocmsgid);
|
va_start (argp, nocmsgid);
|
||||||
error_print (_("Warning:"), _(nocmsgid), argp);
|
error_print (_("Warning:"), _(nocmsgid), argp);
|
||||||
|
|
Loading…
Reference in New Issue