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]

[gfortran] Fix PR 16455: Print locus when module file can't be opened


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;


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