This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fwd: [cxx-mem-model] Don't over process __sync_mem parameters.
- From: Richard Henderson <rth at redhat dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 15 Sep 2011 13:35:42 -0700
- Subject: Re: Fwd: [cxx-mem-model] Don't over process __sync_mem parameters.
- References: <4E6A70DA.70409@redhat.com>
> * 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~