This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Table-ize builtins


On 26-May-2001, Mark Mitchell <mark@codesourcery.com> wrote:
> 
> +      DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P,
> +                   FALLBACK_P, NONANSI_P)
...
> + #define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE)		\
> +   DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
> + 	       false, true, false)
...
> + /* If SMALL_STACK is defined, then `alloca' is only defined in its
> +    `__builtin' form.  */
> + #if SMALL_STACK  
> + DEF_FALLBACK_BUILTIN(BUILT_IN_ALLOCA,
> + 		     "__builtin_alloca",
> + 		     BT_FN_PTR_SIZE)
> + #else
> + DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA,
> + 		    "__builtin_alloca",
> + 		    BT_FN_PTR_SIZE)
> + #endif

I don't think using DEF_FALLBACK_BUILTIN there is correct, since that makes
NONANSI_P false, but alloca() is not standard, so NONANSI_P should be true.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]