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]
Other format: [Raw text]

Re: Hookize BUILD_VA_LIST_TYPE


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


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