public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gfortran] Fix PR 16455: Print locus when module file can't be opened
@ 2004-07-11 13:49 Tobias Schlüter
  2004-07-11 14:16 ` Paul Brook
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Schlüter @ 2004-07-11 13:49 UTC (permalink / raw)
  To: GCC Fortran mailing list, patch


Another trivial patch. This simply adds locus information to the error
messages issued when module files can't be opened.

Built & verified the error message.

- Tobi

2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

	PR fortran/15455
	* module.c (gfc_dump_module, gfc_use_module): Print locus
	when opening of module file fails.

Index: module.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/module.c,v
retrieving revision 1.11
diff -u -p -r1.11 module.c
--- module.c    10 Jul 2004 22:37:15 -0000      1.11
+++ module.c    11 Jul 2004 12:33:14 -0000
@@ -3415,7 +3415,7 @@ gfc_dump_module (const char *name, int d

   module_fp = fopen (filename, "w");
   if (module_fp == NULL)
-    gfc_fatal_error ("Can't open module file '%s' for writing: %s",
+    gfc_fatal_error ("Can't open module file '%s' for writing at %C: %s",
                     filename, strerror (errno));

   now = time (NULL);
@@ -3459,7 +3459,7 @@ gfc_use_module (void)

   module_fp = gfc_open_included_file (filename);
   if (module_fp == NULL)
-    gfc_fatal_error ("Can't open module file '%s' for reading: %s",
+    gfc_fatal_error ("Can't open module file '%s' for reading at %C: %s",
                     filename, strerror (errno));

   iomode = IO_INPUT;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gfortran] Fix PR 16455: Print locus when module file can't be opened
  2004-07-11 13:49 [gfortran] Fix PR 16455: Print locus when module file can't be opened Tobias Schlüter
@ 2004-07-11 14:16 ` Paul Brook
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Brook @ 2004-07-11 14:16 UTC (permalink / raw)
  To: fortran; +Cc: Tobias Schlüter, patch

> 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
>
> 	PR fortran/15455
> 	* module.c (gfc_dump_module, gfc_use_module): Print locus
> 	when opening of module file fails.

Ok.

Paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-11 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-11 13:49 [gfortran] Fix PR 16455: Print locus when module file can't be opened Tobias Schlüter
2004-07-11 14:16 ` Paul Brook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).