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++/55776] -Wshadow generates an incorrect warning with enum classes


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.


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