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]

[PATCH]: Allow -Werror for fortran directory


Since the remaining warnings in the fortran directory stem from inline
functions defined in GMP headers, I don't see an easy way to fix them.
So I'm going to move the -Wno-error from the overall directory onto
the files where we get this warning.

 > expr.c:894: warning: control may reach end of non-void function '__gmpz_get_ui' being inlined
 > resolve.c:4308: warning: control may reach end of non-void function '__gmpz_get_ui' being inlined
 > simplify.c:3238: warning: control may reach end of non-void function '__gmpz_get_ui' being inlined
 > trans-common.c:510: warning: control may reach end of non-void function '__gmpz_get_ui' being inlined

If someone fixes these, it'll be easy to remove the workaround later.
In the mean time, the rest of the fortran directory has the safety of
-Werror keeping it warning clean.

Bootstrapped on x86_64-unknown-linux-gnu with --enable-languages=f95.

Ok for mainline?

		Thanks,
		--Kaveh


2005-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Make-lang.in (fortran-warn): Remove -Wno-error.
	(expr.o-warn, resolve.o-warn, simplify.o-warn,
	trans-common.o-warn): Specify -Wno-error.
	
diff -rup orig/egcc-CVS20050311/gcc/fortran/Make-lang.in egcc-CVS20050311/gcc/fortran/Make-lang.in
--- orig/egcc-CVS20050311/gcc/fortran/Make-lang.in	2005-03-11 21:08:20.000000000 -0500
+++ egcc-CVS20050311/gcc/fortran/Make-lang.in	2005-03-12 09:16:39.891836008 -0500
@@ -49,7 +49,14 @@ GFORTRAN_CROSS_NAME := $(shell echo gfor
 #^L
 
 # Use strict warnings for this front end.
-fortran-warn = $(STRICT_WARN) -Wno-error
+fortran-warn = $(STRICT_WARN)
+
+# These files get warnings from an inline function in GMP saying:
+# "control may reach end of non-void function '__gmpz_get_ui' being inlined"
+fortran/expr.o-warn = -Wno-error
+fortran/resolve.o-warn = -Wno-error
+fortran/simplify.o-warn = -Wno-error
+fortran/trans-common.o-warn = -Wno-error
 
 # These are the groups of object files we have.  The F95_PARSER_OBJS are
 # all the front end files, the F95_OBJS are the files for the translation


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