This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,RFA] Fix error with arm_vector_mode_supported_p()
- From: Bernhard Fischer <rep dot dot dot nop at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: rep dot dot dot nop at gmail dot com
- Date: Wed, 5 Dec 2007 14:44:08 +0100
- Subject: [PATCH,RFA] Fix error with arm_vector_mode_supported_p()
Hi,
The following patchlet attempts to fix compilation of insn-opinit.c
on arm for a native compiler.
Error was (on arm, xscale):
... -o libbackend.o \
-DBASEVER="\"4.3.0\"" -DDATESTAMP="\" 20071127\"" \
-DREVISION= \
-DDEVPHASE="\" (experimental)\"" -DPKGVERSION="\"(GCC) \"" \
-DBUGURL="\"<http://gcc.gnu.org/bugs.html>\"" -combine
insn-opinit.c: In function 'init_all_optabs':
insn-opinit.c:443: warning: implicit declaration of function 'arm_vector_mode_supported_p'
/there/toolchain_build_arm_nofpu/gcc-4.3.0/gcc/config/arm/arm-protos.h:47: note: previous declaration of 'arm_vector_mode_supported_p' was here
insn-opinit.c:443: error: incompatible implicit declaration of function 'arm_vector_mode_supported_p'
The compiler was configured via:
/there/toolchain_build_arm_nofpu/gcc-4.3.0/configure \
--prefix=/usr \
--build=i386-pc-linux-gnu \
--host=arm-linux-uclibcgnueabi \
--target=arm-linux-uclibcgnueabi \
--enable-languages=c,fortran \
--with-gxx-include-dir=/usr/include/c++ \
--disable-__cxa_atexit \
--with-gnu-ld \
--enable-shared \
--with-gmp="/there/build_arm_nofpu/gmp-4.2.2" \
--with-mpfr="/there/build_arm_nofpu/mpfr-2.3.0" \
--disable-nls \
--enable-threads \
--disable-multilib \
--with-float=soft \
--enable-intermodule
The patch leaves the warning about the implicit decl of
arm_vector_mode_supported_p, though.
Please consider fixing.
gcc/ChangeLog
2007-11-27 Bernhard Fischer <>
* config/arm/arm-protos.h (arm_vector_mode_supported_p,
arm_hard_regno_mode_ok, const_ok_for_arm): Do not hide non-rtx related
function prototypes in RTX_CODE.
* genopinit.c: Include tm_p.h.
gcc/ChangeLog
2007-11-27 Bernhard Fischer <>
* config/arm/arm-protos.h (arm_vector_mode_supported_p,
arm_hard_regno_mode_ok, const_ok_for_arm): Do not hide non-rtx related
function prototypes in RTX_CODE.
* genopinit.c: Include tm_p.h.
Index: gcc-4.3.0/gcc/config/arm/arm-protos.h
===================================================================
--- gcc-4.3.0/gcc/config/arm/arm-protos.h (revision 130463)
+++ gcc-4.3.0/gcc/config/arm/arm-protos.h (working copy)
@@ -40,15 +40,14 @@
unsigned int);
extern unsigned int arm_dbx_register_number (unsigned int);
extern void arm_output_fn_unwind (FILE *, bool);
-
#ifdef TREE_CODE
extern int arm_return_in_memory (const_tree);
#endif
-#ifdef RTX_CODE
extern bool arm_vector_mode_supported_p (enum machine_mode);
extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
extern int const_ok_for_arm (HOST_WIDE_INT);
+#ifdef RTX_CODE
extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
HOST_WIDE_INT, rtx, rtx, int);
extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode,
Index: gcc-4.3.0/gcc/genopinit.c
===================================================================
--- gcc-4.3.0/gcc/genopinit.c (revision 130463)
+++ gcc-4.3.0/gcc/genopinit.c (working copy)
@@ -486,6 +486,7 @@
printf ("#include \"expr.h\"\n");
printf ("#include \"optabs.h\"\n");
printf ("#include \"reload.h\"\n\n");
+ printf ("#include \"tm_p.h\"\n\n");
printf ("void\ninit_all_optabs (void)\n{\n");