[Patch, Fortran] PR 38248 - don't silently fail if unlink/rename fails
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon Nov 24 18:08:00 GMT 2008
On Mon, Nov 24, 2008 at 05:54:49PM +0100, Tobias Burnus wrote:
>
> --- gcc/fortran/module.c (revision 142158)
> +++ gcc/fortran/module.c (working copy)
> @@ -4850,11 +4850,19 @@ gfc_dump_module (const char *name, int d
> || memcmp (md5_old, md5_new, sizeof (md5_old)) != 0)
> {
> /* Module file have changed, replace the old one. */
> - unlink (filename);
> - rename (filename_tmp, filename);
> + 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?
--
Steve
More information about the Gcc-patches
mailing list