https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78842
Bug ID: 78842 Summary: "error: declaration of 'bool icase' shadows a parameter" should be warning Product: gcc Version: 6.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jmichae3 at yahoo dot com Target Milestone: --- find.cpp:128:6: error: declaration of 'bool icase' shadows a parameter bool icase=false; std::vector<size_t> find_vsizet(std::string haystack, std::string needle, bool icase=false, size_t pos=0); this should be a warning, not an error. the local scope of the function arg icase excludes the global icase doesn't it? is this an attempt to fix "bad-looking" code, or are you following spec?