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: PATCH: Gimplify VA_ARG_EXPR


On Wed, Jun 09, 2004 at 01:05:34AM -0400, Jason Merrill wrote:
> +   tree valist = TREE_OPERAND (*expr_p, 0);
...
> +   valist = build_fold_indirect_ref (valist);

The argument to va_arg_expr isn't a pointer.

> +   addr = create_tmp_var (ptr_type_node, "addr");
> +   DECL_POINTER_ALIAS_SET (addr) = get_varargs_alias_set ();

Alias set on the decl and not the type?  Isn't this going to be
(potentially) broken by gimplification?

> +   tree t = convert (build_pointer_type (type), null_pointer_node);

fold_convert.

> +       /* Make it easier for the backends by protecting the valist argument
> +          from multiple evaluations.  */
> +       valist = stabilize_va_list (valist, 0);

Seems like the min_value thing would be better here.


r~


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