https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78842
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |INVALID --- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- Presumably you had a local variable 'icase' in your function, because you wouldn't get a diagnostic saying "shadows a parameter" for a global variable. That's impossible. It's an error if the local variable is in the outermost block of the function, because it declares two variables of the same name in the same scope: void find_vsizet(bool icase=false) { bool icase = false; // error { bool icase = false; // ok here, only a warning } }