This patch implements some of rth's suggestions, and changes the signature of the hook to take the valist and type as args and return the object. Tested x86_64-pc-linux-gnu, ia64-pc-linux-gnu, powerpc64-pc-linux-gnu. Now testing (slowly) on sparc-sun-solaris9; I'll commit that hook once it finishes. rth, can you verify that the alpha hook still works after this patch? Applied to trunk. 2004-06-10 Jason Merrill * target.h (struct gcc_target): Change gimplify_va_arg_expr hook signature. * tree-gimple.h: Adjust. * config/alpha/alpha.c (alpha_gimplify_va_arg): Adjust. * config/i386/i386.c (ix86_gimplify_va_arg): Adjust. Use fold_convert. * config/ia64/ia64.c (ia64_gimplify_va_arg): Adjust. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust. Use COMPLEX_EXPR for complex numbers. Use fold_convert. * builtins.c (std_gimplify_va_arg_expr): Adjust. Use fold_convert. (gimplify_va_arg_expr): Return GS_ERROR in error case. Gimplify valist rather than calling stabilize_va_list.