This is the mail archive of the 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]

Fix langhooks-defs.h (was Re: mainline bootstrap failure intreelang)

Andreas Jaeger <> writes:

> Bootstrapping treelang fails on i686-linux-gnu with:
> stage1/xgcc -Bstage1/ -B/opt/gcc/3.4-devel/i686-suse-linux-gnu/bin/ -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wmissing-prototypes -Wmissing-declarations -Werror -fno-common   -DHAVE_CONFIG_H    -I. -Itreelang -I/cvs/gcc/gcc -I/cvs/gcc/gcc/treelang -I/cvs/gcc/gcc/../include  /cvs/gcc/gcc/treelang/treetree.c -o treelang/treetree.o
> /cvs/gcc/gcc/treelang/treetree.c:179: warning: ISO C forbids initialization between function pointer and `void *'
> make[2]: *** [treelang/treetree.o] Error 1
> What has changed in GCC?

I tracked it down to RTH's change from 2003-08-29 to langhooks-defs.h
where a broken cast is used.

I'm currently testing the appended patch on x86_64-linux-gnu and will
commit it as obvious after regression testing,


2003-09-02  Andreas Jaeger  <>

	* langhooks-def.h (LANG_HOOKS_RTL_EXPAND_STMT): Cast properly.
Index: gcc/langhooks-def.h
--- gcc/langhooks-def.h	29 Aug 2003 23:21:11 -0000	1.63
+++ gcc/langhooks-def.h	2 Sep 2003 07:09:38 -0000
@@ -124,7 +124,7 @@ extern void lhd_initialize_diagnostics (
 #define LANG_HOOKS_FUNCTION_LEAVE_NESTED lhd_do_nothing_f
 #define LANG_HOOKS_RTL_EXPAND_START	lhd_do_nothing
-#define LANG_HOOKS_RTL_EXPAND_STMT	(void *) abort
+#define LANG_HOOKS_RTL_EXPAND_STMT	(void (*) (tree)) abort
 #define LANG_HOOKS_RTL_EXPAND_END	lhd_do_nothing
 /* Attribute hooks.  */

 Andreas Jaeger,,
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature

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