[PATCH] Workaround bootstrap failure on RedHat 7.2 (take 2)

Roger Sayle roger@eyesopen.com
Tue Jan 3 17:17:00 GMT 2006


On Tue, 3 Jan 2006, Kaveh R. Ghazi wrote:
> There's no need for fixincludes.  In gcc/system.h we define
> __NO_STRING_INLINES for this exact problem.  I suggest we do this in
> libdecnumber and anywhere else we use -Werror.

Excellent!  The following patch implements Kaveh's suggestion and
follows the idiom used for the rest of the compiler.  This patch
has been tested on i686-pc-linux-gnu (RedHat 7.2) with a
"make decNumber.o" in stage2-libdecnumber, where it resolves
the fatal compilation error from a unpatched tree.

I've just double checked gcc/MAINTAINERS and was surprised to see
that Ben Ellison isn't officially listed as the libdecnumber maintainer.
My apologies to Ben for Cc'ing him on all of my libdecnumber patches.
I'm not sure if this is an oversight, but could some global write
person approve this patch to restore bootstrap on affected targets?

Thanks in advance,


2006-01-03  Roger Sayle  <roger@eyesopen.com>
	    Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* decNumber.c (__NO_STRING_INLINES): Define to prevent glibc macro
	definition of strcpy from generating compilation warnings.


Index: decNumber.c
===================================================================
*** decNumber.c	(revision 109243)
--- decNumber.c	(working copy)
***************
*** 149,154 ****
--- 149,158 ----
  /*      -ve -- negative                                               */
  /* ------------------------------------------------------------------ */

+ /* 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
+
  #include <stdlib.h>		/* for malloc, free, etc. */
  #include <stdio.h>		/* for printf [if needed] */
  #include <string.h>		/* for strcpy */


Roger
--




More information about the Gcc-patches mailing list