This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/78842] New: "error: declaration of 'bool icase' shadows a parameter" should be warning


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]