gcc -Wshadow is too strict?
- by idimba
In the following example:
class A
{
int len();
void setLen(int len) { len_ = len; } // warning at this line
int len_;
};
gcc with -Wshadow issue a warning:
main.cpp:4: warning: declaration of `len' shadows a member of `this'
function len and integer len are of different type. Why the warning?