https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776
Ian McInerney changed:
What|Removed |Added
CC||ian.s.mcinerney at ieee dot org
--- Comm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776
Sergey Semushin changed:
What|Removed |Added
CC||Predelnik at gmail dot com
--- Comment
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776
--- Comment #7 from Manuel López-Ibáñez ---
(In reply to Jonathan Wakely from comment #5)
> A better example:
>
> typedef unsigned char foo;
>
> enum class myenum
> {
> foo,
> bar = (foo)-1
> };
>
> Is the value -1L or 255?
>
> If I rename
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776
--- Comment #6 from Jonathan Wakely ---
It also changes meaning if I reorder the declarations of myenum::foo and
myenum::bar, which is exactly the sort of fragile code that deserves a warning.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776
--- Comment #5 from Jonathan Wakely ---
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.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776
--- Comment #4 from Jonathan Wakely ---
(In reply to Manuel López-Ibáñez from comment #3)
> But the global foo is a type while myenum::foo is not a type. Is there any
> context where they can be used interchangeably?
>
> enum class myenum
> {
>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776
Manuel López-Ibáñez changed:
What|Removed |Added
CC||manu at gcc dot gnu.org
--- Comment
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776
Jason Merrill changed:
What|Removed |Added
CC||jason at gcc dot gnu.org
--- Comment #2 f
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55776
Philipp changed:
What|Removed |Added
CC||jason at redhat dot com
--- Comment #1 from Phi