public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ian at airs dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/38064] [c++0x] operator== doesn't work for enum classes Date: Mon, 25 May 2009 18:32:00 -0000 [thread overview] Message-ID: <20090525183246.12919.qmail@sourceware.org> (raw) In-Reply-To: <bug-38064-15404@http.gcc.gnu.org/bugzilla/> ------- 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 default_conversion checks INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P. I would guess that this would work if several checks in cp_build_binary_op also checked for ENUMERAL_TYPE in cases where they currently check for INTEGER_TYPE. But I haven't tried to read the standard to understand where the right fix is. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
next prev parent reply other threads:[~2009-05-25 18:32 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-11-09 4:04 [Bug c++/38064] New: " rbuergel at web dot de 2008-11-09 4:12 ` [Bug c++/38064] " rbuergel at web dot de 2008-11-09 4:23 ` rbuergel at web dot de 2009-01-26 10:48 ` piotr dot wyderski at gmail dot com 2009-05-18 22:12 ` paolo dot carlini at oracle dot com 2009-05-25 15:15 ` steven at gcc dot gnu dot org 2009-05-25 16:12 ` paolo dot carlini at oracle dot com 2009-05-25 16:45 ` jason at gcc dot gnu dot org 2009-05-25 18:32 ` ian at airs dot com [this message] 2009-05-25 23:01 ` jason at gcc dot gnu dot org 2009-05-25 23:07 ` jason at gcc dot gnu dot org 2009-05-25 23:12 ` jason at gcc dot gnu dot org 2009-08-10 21:38 ` pinskia at gcc dot gnu dot org 2009-08-10 21:38 ` pinskia at gcc dot gnu dot org 2010-04-26 11:23 ` redi at gcc dot gnu dot org 2010-04-26 17:50 ` pinskia at gcc dot gnu dot org 2010-04-26 23:07 ` redi at gcc dot gnu dot org 2010-05-04 19:01 ` jason at gcc dot gnu dot org 2010-05-04 19:03 ` jason at gcc dot gnu dot org 2010-05-04 19:04 ` jason at gcc dot gnu dot org [not found] <bug-38064-4@http.gcc.gnu.org/bugzilla/> 2014-02-16 10:02 ` jackie.rosen at hushmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090525183246.12919.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).