[Patch, Fortran] convert almost all {warning,error}_now to common diagnostic

Tobias Burnus burnus@net-b.de
Tue Nov 25 08:04:00 GMT 2014


With this patch – and the still pending patch for gfc_internal_error at 
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg03003.html – all 
error/warning messages have been converted to the common diagnostic, 
except for:

(a) those majority which might need buffering (gfc_error, gfc_warning);
(b) those 10 gfc_error_now_1 with two locations (%L %L or %L %C); and
(c) those 6 gfc_warning_now_1 in scanner.c, for which "location" 
(gfc_current_loc) is not properly set up. [Could be less, I haven't 
check all of them.]


As most *_now functions now go through common diagnostic, I remove the 
_2 from the name and changed the old one to _1. The increment of the 
errors is required to stop before going to the translation stage in case 
errors have occurred.

In order to have something to be placed in brackets behind a warning, I 
changed a bit the handling of -Wconvertion/-Wconversion-extra such that 
each gfc_warning_now is only triggered by one -W*. Related, I moved some 
-W* to an *.opt variable and used it was OPT_W* in the warning message.

Bootstrapped and regtested on x86-64-gnu-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diag_now.diff
Type: text/x-patch
Size: 45561 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141125/75695192/attachment.bin>


More information about the Gcc-patches mailing list