This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55776] -Wshadow generates an incorrect warning with enum classes
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Jun 2013 01:15:12 +0000
- Subject: [Bug c++/55776] -Wshadow generates an incorrect warning with enum classes
- Auto-submitted: auto-generated
- References: <bug-55776-4 at http dot gcc dot gnu dot org/bugzilla/>
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.