This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran] PR 38248 - don't silently fail if unlink/rename fails
- From: Tobias Burnus <burnus at net-b dot de>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Tue, 25 Nov 2008 00:04:05 +0100
- Subject: Re: [Patch, Fortran] PR 38248 - don't silently fail if unlink/rename fails
- References: <492ADC59.5060107@net-b.de> <20081124175709.GA86896@troutmask.apl.washington.edu>
Steve Kargl wrote:
> On Mon, Nov 24, 2008 at 05:54:49PM +0100, Tobias Burnus wrote:
>
>> + if (unlink (filename))
>> + gfc_fatal_error ("Can't delete module file '%s': %s", filename,
>>
> Why gfc_fatal_error instead of gfc_error or gfc_error_now?
>
Frankly, I don't mind that much whether it is an error_now or a fatal
error; however, I think gfc_fatal_error is OK since not able too write a
file is rather bad and can lead to strange errors afterwards. (At least
I often prefer to see the big error first without needing to dig through
parenthesis diagnosts (due to changed .mod format) and other misleading
error messages.)
But if you think gfc_error_now is superior, I can change it before
submittal.
Tobias