> 2020-08-07 Bruno Haible <[email protected]> > > Use __builtin_alloca with clang. > * lib/alloca.in.h (alloca): Define as __builtin_alloca on clang.
This goes with it: 2020-08-07 Bruno Haible <[email protected]> alloca: No need to compile alloca.c with clang. * lib/alloca.c: Skip all code with clang. diff --git a/lib/alloca.c b/lib/alloca.c index cdaf466..91b9ec3 100644 --- a/lib/alloca.c +++ b/lib/alloca.c @@ -39,8 +39,8 @@ # define memory_full() abort () #endif -/* If compiling with GCC 2, this file's not needed. */ -#if !defined (__GNUC__) || __GNUC__ < 2 +/* If compiling with GCC or clang, this file is not needed. */ +#if !(defined __GNUC__ || defined __clang__) /* If someone has defined alloca as a macro, there must be some other way alloca is supposed to work. */ @@ -197,4 +197,4 @@ alloca (size_t size) } # endif /* no alloca */ -#endif /* not GCC 2 */ +#endif /* not GCC || clang */
