Patch to define __NO_STRING_INLINES in system.h

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Sat Jan 18 14:01:00 GMT 2003


As reported here
http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01104.html 

the string inlines from glibc systems cause warnings when
bootstrapping gcc.  I've prepared a patch to define
__NO_STRING_INLINES in system.h to avoid this.  This is probably
necessary on all glibc systems, not just x86-linux-gnu.

Besides zapping the warnings, I think this is good for two extra
reasons.  First, the change helps our technology because it helps
ensure much wider use of and therefore wider testing of our compiler
string builtins during bootstrap.  Second, it's good policy because it
projects our confidence in our own mechanism for these optimizations.

Over time, I've heard several opinions against the string inlines and
none in favor of them (on the gcc lists at least.)  We're compiler
hackers, after all.  Let this be done in the compiler! :-)

Tested via bootstrap on i686-pc-linux-gnu, three-stage bootstrap
completes with -Werror enabled.

Ok to install?

		Thanks,
		--Kaveh


2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* system.h (__NO_STRING_INLINES): Define.
	
diff -rup orig/egcc-CVS20030117/gcc/system.h egcc-CVS20030117/gcc/system.h
--- orig/egcc-CVS20030117/gcc/system.h	2002-12-24 07:00:38.000000000 -0500
+++ egcc-CVS20030117/gcc/system.h	2003-01-17 14:02:13.040449689 -0500
@@ -112,6 +112,10 @@ extern int fprintf_unlocked PARAMS ((FIL
 extern int errno;
 #endif
 
+/* Some of glibc's string inlines cause warnings.  Plus we'd rather
+   rely on (and therefore test) GCC's string builtins.  */
+#define __NO_STRING_INLINES
+
 #ifdef STRING_WITH_STRINGS
 # include <string.h>
 # include <strings.h>



More information about the Gcc-patches mailing list