This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[patch, libfortran] Silence compiler warning


Hello world,

the patch below silences the only compiler warning on i686-pc-linux-gnu
when building libfortran, about the possibility of "type" being
clobbered by setjmp / longjmp.

I'll commit within 24 hours as obvious unless anybody objects.

	Thomas

2008-05-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* io/list_read.c (list_formatted_read_scalar):  Declare
	type as volatile to shut up compiler warning.

Index: /home/ig25/gcc/trunk/libgfortran/io/list_read.c
===================================================================
--- /home/ig25/gcc/trunk/libgfortran/io/list_read.c	(revision 134952)
+++ /home/ig25/gcc/trunk/libgfortran/io/list_read.c	(working copy)
@@ -1737,8 +1737,8 @@ check_type (st_parameter_dt *dtp, bt typ
    greater than one, we copy the data item multiple times.  */
 
 static void
-list_formatted_read_scalar (st_parameter_dt *dtp, bt type, void *p, int kind,
-			    size_t size)
+list_formatted_read_scalar (st_parameter_dt *dtp, volatile bt type, void *p,
+			    int kind, size_t size)
 {
   char c;
   int m;

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