On 09/15/2011 04:35 PM, Richard Henderson wrote:
        * 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.


It didn't seem to until I added it... The expanders handle issuing the message if there aren't enough parameters already... It doesnt really complain about types either.. maybe it just passes builtins on to be processed by expanders?

Andrew

Reply via email to