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]

[PATCH,frv,installed] use BB_HEAD instead of BLOCK_HEAD for protos

There doesn't seem to be a good way to test whether the header that
declares ce_if_block_t was already included, so frv-protos.h has
resorted to a hack of resorting to BLOCK_HEAD.  Unfortunately,
BLOCK_HEAD is gone in favor of BB_HEAD.  As a result, the ifcvt
functions end up being called without prototypes.  This has no ill
effects, except for the fact that one of them returns a pointer and,
on an x86_64 host, pointers are wider than int, the assumed return
type.  Oops.

Fixed with the patch below.  Would it be ok to define a macro along
with ce_if_block_t (maybe even #define it to itself?), and test for
this macro instead, such that we don't get bitten again?

I grepped for BLOCK_HEAD in other headers and didn't get any hits, so
it seems like this was the only affected port.

Here's the patch I'm checking in for now.

Index: gcc/ChangeLog
from  Alexandre Oliva  <>
	* config/frv/frv-protos.h: Guard ifcvt functions declarations with

Index: gcc/config/frv/frv-protos.h
RCS file: /cvs/uberbaum/gcc/config/frv/frv-protos.h,v
retrieving revision 1.20
diff -u -p -r1.20 frv-protos.h
--- gcc/config/frv/frv-protos.h 5 Oct 2004 20:11:16 -0000 1.20
+++ gcc/config/frv/frv-protos.h 26 Nov 2004 19:00:12 -0000
@@ -116,7 +116,7 @@ extern rtx frv_split_minmax		(rtx *);
 extern rtx frv_split_abs		(rtx *);
 extern void frv_split_double_load	(rtx, rtx);
 extern void frv_split_double_store	(rtx, rtx);
-#ifdef BLOCK_HEAD
+#ifdef BB_HEAD
 extern void frv_ifcvt_init_extra_fields	(ce_if_block_t *);
 extern void frv_ifcvt_modify_tests	(ce_if_block_t *, rtx *, rtx *);
 extern void frv_ifcvt_modify_multiple_tests
Alexandre Oliva   
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

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