From: Kaveh R. Ghazi Date: Mon, 20 Sep 2004 22:23:12 +0000 (+0000) Subject: tsystem.h (alloca): Provide a default definition. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c82eecc7896f50079c2e333fa1d0f76afdbfabf;p=gcc.git 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 --- 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;