http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
Jackie Rosen jackie.rosen at hushmail dot com changed:
What|Removed |Added
CC|
--- Comment #14 from jason at gcc dot gnu dot org 2010-05-04 19:01 ---
Subject: Bug 38064
Author: jason
Date: Tue May 4 19:01:13 2010
New Revision: 159042
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159042
Log:
PR c++/38064
* typeck.c (cp_build_binary_op):
--- Comment #15 from jason at gcc dot gnu dot org 2010-05-04 19:03 ---
Subject: Bug 38064
Author: jason
Date: Tue May 4 19:03:00 2010
New Revision: 159043
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159043
Log:
PR c++/38064
* typeck.c (cp_build_binary_op):
--- Comment #16 from jason at gcc dot gnu dot org 2010-05-04 19:04 ---
Other comparisons fixed for 4.5.1.
--
jason at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #11 from redi at gcc dot gnu dot org 2010-04-26 11:23 ---
This is fixed for equality operators but not relational operators
enum class E { Foo, Bar };
bool b2 = E::Foo E::Bar;
--
redi at gcc dot gnu dot org changed:
What|Removed
--- Comment #12 from pinskia at gcc dot gnu dot org 2010-04-26 17:50
---
(In reply to comment #11)
This is fixed for equality operators but not relational operators
enum class E { Foo, Bar };
bool b2 = E::Foo E::Bar;
Is that even allowed for normal enums?
--
--- Comment #13 from redi at gcc dot gnu dot org 2010-04-26 23:07 ---
(In reply to comment #12)
Is that even allowed for normal enums?
yes, unscoped enums will be promoted to int
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
Target Milestone|--- |4.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
--- Comment #10 from pinskia at gcc dot gnu dot org 2009-08-10 21:37
---
*** Bug 41030 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #5 from paolo dot carlini at oracle dot com 2009-05-25 16:11
---
CC-ing Jason...
--
paolo dot carlini at oracle dot com changed:
What|Removed |Added
--
jason at gcc dot gnu dot org changed:
What|Removed |Added
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org
--- Comment #6 from ian at airs dot com 2009-05-25 18:32 ---
With unscoped enums the similar code works because cp_build_binary_op applies
the default integral promotions to the enums, and winds up comparing two int
values. The promotions are not applied to scoped enums because
--- Comment #7 from jason at gcc dot gnu dot org 2009-05-25 23:01 ---
Subject: Bug 38064
Author: jason
Date: Mon May 25 23:01:02 2009
New Revision: 147854
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147854
Log:
PR c++/38064
* typeck.c (cp_build_binary_op):
--- Comment #8 from jason at gcc dot gnu dot org 2009-05-25 23:07 ---
Subject: Bug 38064
Author: jason
Date: Mon May 25 23:07:05 2009
New Revision: 147855
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147855
Log:
PR c++/38064
* typeck.c (cp_build_binary_op):
--- Comment #9 from jason at gcc dot gnu dot org 2009-05-25 23:12 ---
Fixed for 4.4.1.
--
jason at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #4 from paolo dot carlini at oracle dot com 2009-05-18 22:12
---
*** Bug 40193 has been marked as a duplicate of this bug. ***
--
paolo dot carlini at oracle dot com changed:
What|Removed |Added
--- Comment #3 from piotr dot wyderski at gmail dot com 2009-01-26 10:48
---
The bug is definitely confirmed and it still happens on GCC-4.4.0 trunk
(revision 143673).
--
piotr dot wyderski at gmail dot com changed:
What|Removed |Added
--- Comment #2 from rbuergel at web dot de 2008-11-09 04:22 ---
ok, even for the case i misunderstood the proposal: there are still some
problems with it, making it unuseable.
enum class E { elem };
inline bool operator== (E c1, E c2)
{
return (int) c1 == (int) c2;
}
int
--- Comment #1 from rbuergel at web dot de 2008-11-09 04:11 ---
extended testcase, this fails for other operators, too
enum class E { elem };
int main()
{
E::elem == E::elem;
E::elem != E::elem;
E::elem E::elem;
E::elem = E::elem;
E::elem
19 matches
Mail list logo