This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Attached is a revised and much simpler fix for PR fortran/21061 where -Werror was ignored. The attached patch makes sure that we exit(1) properly even for warnings.
@@ -475,7 +475,12 @@ gfc_warning (const char *nocmsgid, ...)
va_start (argp, nocmsgid); if (buffer_flag == 0) + { warnings++; + if (warnings_are_errors) + errors++; + }
- if (warning) + if (warning && !warnings_are_errors) warnings++; else errors++;
@@ -518,14 +523,15 @@ gfc_notify_std (int std, const char *noc
if (gfc_suppress_error)
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->index = 0;
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |