On 11/01/16 20:48, Jason Merrill wrote: >>>>>> else if ((DECL_EXTERN_C_P (newdecl) >>>>>> && DECL_EXTERN_C_P (olddecl)) >>>>>> || compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl)), >>>>>> TYPE_ARG_TYPES (TREE_TYPE (olddecl)))) >>> >>> So I was thinking to drop the "else" and the compparms test. >> >> Yes. But then we must somehow avoid: >> >> else >> /* Discard the old built-in function. */ >> return NULL_TREE; >> >> It maybe easier, just to copy the warning to the DECL_ANTICIPATED case? > > Or even move it there; removing the existing warning doesn't change > anything in the testsuite, and I'm having trouble imagining how to > trigger it. >
Nice. It must be something, which does not anticipate a declaration. like: cat test.cc int __builtin_abort(void*); g++ -c test.cc test.cc:1:5: warning: new declaration 'int __builtin_abort(void*)' ambiguates built-in declaration 'void __builtin_abort()' int __builtin_abort(void*); ^~~~~~~~~~~~~~~ Intersting, the warning comes even though I forgot to add the extern "C". Bernd.