This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR 38248 - don't silently fail if unlink/rename fails


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]