On Tue, Nov 1, 2016 at 2:15 PM, Bernd Edlinger <bernd.edlin...@hotmail.de> wrote: > On 11/01/16 18:11, Jason Merrill wrote: >> On Tue, Nov 1, 2016 at 11:45 AM, Bernd Edlinger >> <bernd.edlin...@hotmail.de> wrote: >>> On 11/01/16 16:20, Jason Merrill wrote: >>>> On 10/17/2016 03:18 PM, Bernd Edlinger wrote: >>>> I'm not even sure we need a new warning. Can we combine this warning >>>> with the block that currently follows? >>> >>> After 20 years of not having a warning on that, >>> an implicitly enabled warning would at least break lots of bogus >>> test cases. >> >> Would it, though? Which test cases still break with the current patch? > > Less than before, but there are still at least a few of them. > > I can make a list and send it tomorrow. > >>> Of course in C we have an implicitly enabled warning, >>> so I would like to at least enable the warning on -Wall, thus >>> -Wshadow is too weak IMO. >> >> Right. The -Wshadow warning is for file-local declarations, so that >> doesn't apply to your testcase; I was thinking that we should hit the >> first (currently unconditional) warning. >> >>>>> 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. Jason