[patch] beat location sense into fold (PR/40435)

Aldy Hernandez aldyh@redhat.com
Thu Jul 9 15:39:00 GMT 2009


On Thu, Jul 09, 2009 at 03:23:10PM +0200, Manuel L?pez-Ib??ez wrote:
> 2009/7/9 Aldy Hernandez <aldyh@redhat.com>:
> >
> > The patch is over a megabyte long, and I'm sure no one wants to see it,
> > let alone have it in their inbox. ?It is available in the link below for
> > review. ?I can post it on request.
> 
> I am all for more precise location info, but I don't understand the
> following change:
> 
>  bool
> -fold_builtin_next_arg (tree exp, bool va_start_p)
> +fold_builtin_next_arg (location_t loc ATTRIBUTE_UNUSED,
> +		       tree exp, bool va_start_p)
>  {
>    tree fntype = TREE_TYPE (current_function_decl);
>    int nargs = call_expr_nargs (exp);
> @@ -11995,7 +12086,8 @@ fold_builtin_next_arg (tree exp, bool va
> 
> The loc is indeed never used, so why bother? This occurs at least twice.

There are a gazillion functions in builtins.c that take a location and
are called fold_builtin_*.  It would be very confusing to have 90
functions take an argument, but 3 not have it.

Aldy



More information about the Gcc-patches mailing list