[RFC] possible approach to fix fortran/pr21061

Steve Kargl sgk@troutmask.apl.washington.edu
Sun Nov 27 15:24:00 GMT 2005


On Sat, Nov 26, 2005 at 05:46:20PM +0100, Bernhard Fischer wrote:
> 
> Attached patchlet would fix pr21061.
> 
> Two short questions:
> (1) Is the path taken in this patch ok?

IMHO, this is a good temporary solution to improve our
warning/error handling.  A long-range solution is to
move gfortran to the generic warning/error handling 
mechanism used in other parts of GCC, which is the
topic of (2).

> 
> (2) There are a couple of warning() invocations, which obviously do not
> use gfc_{warning,error}() but the generic ones from C et al. The second
> part of attached patch does correct all except one occurance of
> "warning()" in trans-decl.c. My question is, is it ok to remove these
> warning() calls in favour of using the gfc_() ones? This would make the
> warning and error diagnostics more consistent, imho.

Be careful.  gfc_error and gfc_warning write into a buffer
while gfc_error_now and gfc_warning_now issue immediate
errors.   Choose the right replacement.

> PS: if (1) is ok, then i'll clean it up and submit proper.
> TIA,

Seems ok to me.

-- 
Steve



More information about the Fortran mailing list