This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Hookize BUILD_VA_LIST_TYPE
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 30 Oct 2003 14:40:01 +0100
- Subject: Re: Hookize BUILD_VA_LIST_TYPE
- References: <20031029181135.A22528@redhat.com>
Richard Henderson <rth@redhat.com> writes:
> Index: gcc/config/mips/mips.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
> retrieving revision 1.336
> diff -c -p -d -u -r1.336 mips.c
> --- gcc/config/mips/mips.c 19 Oct 2003 07:52:10 -0000 1.336
> +++ gcc/config/mips/mips.c 30 Oct 2003 01:51:13 -0000
> -tree
> -mips_build_va_list (void)
> +static tree
> +mips_build_builtin_va_list (void)
> {
> if (EABI_FLOAT_VARARGS_P)
> {
> @@ -4028,7 +4031,15 @@ mips_build_va_list (void)
> return record;
> }
> else
> - return ptr_type_node;
> + {
> +#if defined(TARGET_IRIX) && !TARGET_IRIX5
> + /* On IRIX 6, this type is 'char *'. */
> + return build_pointer_type (char_type_node);
> +#else
> + /* Otherwise, we use 'void *'. */
> + return ptr_type_node;
> +#endif
> + }
> }
>
I think this is wrong: TARGET_IRIX* are always defined (as 0 or 1 as
appropriate), so this should become a runtime test:
if (TARGET_IRIX && !TARGET_IRIX5)
/* On IRIX 6, this type is 'char *'. */
return build_pointer_type (char_type_node);
else
/* Otherwise, we use 'void *'. */
return ptr_type_node;
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University