From ba64ca335ac54ab2d94ffe4058b2d6415910c10e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 27 Aug 1997 16:50:04 -0700 Subject: [PATCH] Patch from Richard Henderson to fix alpha-linux alloca redefinition problems. * alpha/xm-alpha.h (alloca): Define alloca to builtin_alloca for GNUC if not already defined, and USE_C_ALLOCA not defined. From-SVN: r14977 --- gcc/ChangeLog | 5 +++++ gcc/config/alpha/xm-alpha.h | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d5d718a25b..81a208a12ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 27 16:35:29 1997 Richard Henderson + + * alpha/xm-alpha.h (alloca): Define alloca to builtin_alloca for GNUC + if not already defined, and USE_C_ALLOCA not defined. + Wed Aug 27 16:08:43 1997 Jim Wilson * config.guess: Replace with script that uses ../config.guess. diff --git a/gcc/config/alpha/xm-alpha.h b/gcc/config/alpha/xm-alpha.h index 642e1cf1a6e..2cf8917609b 100644 --- a/gcc/config/alpha/xm-alpha.h +++ b/gcc/config/alpha/xm-alpha.h @@ -41,12 +41,18 @@ Boston, MA 02111-1307, USA. */ #define SUCCESS_EXIT_CODE 0 #define FATAL_EXIT_CODE 33 -/* If not compiled with GNU C, use the builtin alloca. */ -#if !defined(__GNUC__) && !defined(_WIN32) +/* If compiled with GNU C, use the builtin alloca. */ +#ifndef alloca +#if defined(__GNUC__) && !defined(USE_C_ALLOCA) +#define alloca __builtin_alloca +#else +#if !defined(_WIN32) && !defined(USE_C_ALLOCA) #include #else extern void *alloca (); #endif +#endif +#endif /* The host compiler has problems with enum bitfields since it makes them signed so we can't fit all our codes in. */ -- 2.30.2