This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Warnings from strings.h compiling fixinc/gnu-regex.c
- To: gcc-patches at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Subject: Warnings from strings.h compiling fixinc/gnu-regex.c
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Wed, 30 Aug 2000 11:58:59 -0400 (EDT)
The following warnings occur when compiling gnu-regex.c:
gcc -c -DIN_GCC -g -I. -I.. -I../../../gcc/fixinc -I../../../gcc/fixinc/.. -I../../../gcc/fixinc/../config -I../../../gcc/fixinc/../../include ../../../gcc/fixinc/gnu-regex.c
In file included from ../../../gcc/fixinc/gnu-regex.c:125:
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.3/include/string.h:24: warning: conflicting types for built-in function `memcmp'
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.3/include/string.h:28: warning: conflicting types for built-in function `strcpy'
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.3/include/string.h:31: warning: conflicting types for built-in function `strcmp'
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.3/include/string.h:76: warning: conflicting types for built-in function `memcpy'
The problem is auto-host.h doesn't define HAVE_CONST. It directly defines
const to empty when necessary. Here is a patch to the squelch warnings.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2000-08-30 J. David Anglin <dave@hiauly1.hia.nrc.ca>
fixinc/gnu-regex.c: Don't define `const'.
--- fixinc/gnu-regex.c.orig Thu May 11 12:47:00 2000
+++ fixinc/gnu-regex.c Wed Aug 30 11:36:23 2000
@@ -87,10 +87,6 @@
# include "auto-host.h"
-# if !defined(const) && !defined(HAVE_CONST)
-# define const
-# endif
-
# if !defined(volatile) && !defined(HAVE_VOLATILE)
# define volatile
# endif