https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67488
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- A similar fix would be good for: void g() { void f(void); } void k() {int f(int); f(1);} Saying f was declared in a different scope too. Note I don't have access to clang so I can't say what it shows.