From 2c82eecc7896f50079c2e333fa1d0f76afdbfabf Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Mon, 20 Sep 2004 22:23:12 +0000 Subject: [PATCH] tsystem.h (alloca): Provide a default definition. * tsystem.h (alloca): Provide a default definition. Revert: 2001-08-31 Kaveh R. Ghazi * unwind-dw2.c: Call __builtin_alloca, not alloca. From-SVN: r87775 --- gcc/ChangeLog | 8 ++++++++ gcc/tsystem.h | 4 ++++ gcc/unwind-dw2.c | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 40b125ead44..919059442c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-09-20 Kaveh R. Ghazi + + * tsystem.h (alloca): Provide a default definition. + + Revert: + 2001-08-31 Kaveh R. Ghazi + * unwind-dw2.c: Call __builtin_alloca, not alloca. + 2004-09-20 Andrew Pinski PR tree-opt/17558 diff --git a/gcc/tsystem.h b/gcc/tsystem.h index 7928b31b68a..7ccdf4c0f59 100644 --- a/gcc/tsystem.h +++ b/gcc/tsystem.h @@ -117,4 +117,8 @@ extern int errno; #define NULL 0 #endif +/* GCC always provides __builtin_alloca(x). */ +#undef alloca +#define alloca(x) __builtin_alloca(x) + #endif /* ! GCC_TSYSTEM_H */ diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c index eb36e207e2f..67b8d1cd066 100644 --- a/gcc/unwind-dw2.c +++ b/gcc/unwind-dw2.c @@ -840,7 +840,7 @@ execute_cfa_program (const unsigned char *insn_ptr, unused_rs = unused_rs->prev; } else - new_rs = __builtin_alloca (sizeof (struct frame_state_reg_info)); + new_rs = alloca (sizeof (struct frame_state_reg_info)); *new_rs = fs->regs; fs->regs.prev = new_rs; -- 2.30.2