[Bug c++/55776] -Wshadow generates an incorrect warning with enum classes

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 5 01:15:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
A better example:

typedef unsigned char foo;

enum class myenum
{
  foo,
  bar = (foo)-1
};

Is the value -1L or 255?

If I rename myenum::foo to myenum::Foo the code silently changes meaning.



More information about the Gcc-bugs mailing list