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++/51242] [C++11] Unable to use strongly typed enums as bit fields


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

--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-26 11:36:56 UTC ---
For example, consider this variant of the PR53661 situation:

enum class Code {
  SUCCESS = 0
};

Code a;

short r[] = {a};

we currently produce a -Wnarrowing warning, which seems bogus to me, exactly
because we don't realize that actually the only enumerator has value zero.


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