This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/78842] New: "error: declaration of 'bool icase' shadows a parameter" should be warning
- From: "jmichae3 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 17 Dec 2016 06:35:42 +0000
- Subject: [Bug c++/78842] New: "error: declaration of 'bool icase' shadows a parameter" should be warning
- Auto-submitted: auto-generated
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?