[PATCH, committed] Cleanup warning/error buffer target selection in light of -Werror
Bernhard Fischer
rep.dot.nop@gmail.com
Sun Dec 16 20:06:00 GMT 2007
Hi,
Fixing a mishap from the early days of PR21061 was lying around locally:
Irresponsible of -Werror, warnings still are to go straight to the
warning buffer -- diagnostics will TDRT anyway. So i'm (un)installing this
hunk that should not have been installed in the first place.
My initial (misguided) thought was that if -Werror, then warnings should
go straight to the error-buffer which is of course not the right thing
to do. Note that in effect the erroneous hunk corrected below did never
have a negative side-effect.
This erroneous hunk was thus reverted as r130990 to again read like it did
originally:
Index: gcc-4.3/gcc/fortran/error.c
===================================================================
--- gcc-4.3/gcc/fortran/error.c (revision 130960)
+++ gcc-4.3/gcc/fortran/error.c (working copy)
@@ -715,8 +715,7 @@ gfc_notify_std (int std, const char *noc
if (gfc_suppress_error)
return warning ? SUCCESS : FAILURE;
- cur_error_buffer = (warning && !warnings_are_errors)
- ? &warning_buffer : &error_buffer;
+ cur_error_buffer = warning ? &warning_buffer : &error_buffer;
cur_error_buffer->flag = 1;
cur_error_buffer->index = 0;
More information about the Gcc-patches
mailing list