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: Fwd: [cxx-mem-model] Don't over process __sync_mem parameters.


> 	* c-family/c-common.c (sync_resolve_params, sync_resolve_return): Only
> 	tweak parameters that are the same type size.
> 	(resolve_overloaded_builtin): Use new param for __sync_mem builtins.
> 	
> 	* testsuite/gcc.dg/sync-mem-param.c: New testcase to check correct
> 	number of parameters on a sample __sync_mem builtin.

Ok, except,

> +   /* __sync_mem routines are not variadic.  */
> +   if (!orig_format && VEC_length (tree, params) != parmnum + 1)
> +     {
> +       error ("too many arguments to function %qE", orig_function);
> +       return false;
> +     }

I shouldn't think you need this?  Surely because the function type
is non-variadic the c front end would diagnose this.


r~


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