Index: gcc-3.2.3/gcc/read-rtl.c =================================================================== --- gcc-3.2.3/gcc/read-rtl.c (revision 131336) +++ gcc-3.2.3/gcc/read-rtl.c (working copy) @@ -659,7 +659,7 @@ { ungetc (c, infile); list_counter++; - obstack_ptr_grow (&vector_stack, (PTR) read_rtx (infile)); + obstack_ptr_grow (&vector_stack, read_rtx (infile)); } if (list_counter > 0) { Index: system.h =================================================================== --- gcc-3.2.3/gcc/system.h (revision 131336) +++ gcc-3.2.3/gcc/system.h (working copy) @@ -589,7 +589,9 @@ #undef realloc #undef calloc #undef strdup +#if ! (defined(FLEX_SCANNER) || defined(YYBISON) || defined(YYBYACC)) #pragma GCC poison malloc realloc calloc strdup +#endif /* Old target macros that have moved to the target hooks structure. */ #pragma GCC poison ASM_OPEN_PAREN ASM_CLOSE_PAREN \ @@ -628,4 +630,11 @@ #endif /* GCC >= 3.0 */ +#if defined(FLEX_SCANNER) || defined(YYBISON) || defined(YYBYACC) +/* Flex and bison use malloc and realloc. Yuk. Note that this means + really_call_* cannot be used in a .l or .y file. */ +#define malloc xmalloc +#define realloc xrealloc +#endif + #endif /* ! GCC_SYSTEM_H */