This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,frv,installed] use BB_HEAD instead of BLOCK_HEAD for protos
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 26 Nov 2004 17:05:07 -0200
- Subject: [PATCH,frv,installed] use BB_HEAD instead of BLOCK_HEAD for protos
- Organization: Red Hat Global Engineering Services Compiler Team
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 <aoliva@redhat.com>
* config/frv/frv-protos.h: Guard ifcvt functions declarations with
BB_HEAD, not BLOCK_HEAD.
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 http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}