public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers) Date: Wed, 06 Aug 2014 19:46:00 -0000 [thread overview] Message-ID: <bug-51312-4-oq7JwnQ2TH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51312-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 --- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> --- I'm having a look at the issue and it seems rather different than I (we) thought. Suffices to say that it does not affect constexpr non-operator member functions, and that sort-of explains this (ugly) workaround: enum : int { e = X().operator int() }; Also, isn't just about C++11 enums, eg, this should be also accepted: enum { e = X() };
next prev parent reply other threads:[~2014-08-06 19:46 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-11-26 15:16 [Bug c++/51312] New: Wrong interpretation of converted constant expressions (for template arguments and " tsoae at mail dot ru 2011-11-26 15:33 ` [Bug c++/51312] " marc.glisse at normalesup dot org 2011-11-26 17:32 ` tsoae at mail dot ru 2012-01-30 22:15 ` [Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for " pinskia at gcc dot gnu.org 2012-02-08 20:20 ` pinskia at gcc dot gnu.org 2012-04-29 14:12 ` marc.glisse at normalesup dot org 2014-07-12 19:57 ` paolo.carlini at oracle dot com 2014-07-13 8:54 ` paolo.carlini at oracle dot com 2014-07-13 9:17 ` paolo.carlini at oracle dot com 2014-07-22 10:01 ` glisse at gcc dot gnu.org 2014-07-31 13:26 ` paolo.carlini at oracle dot com 2014-08-06 19:46 ` paolo.carlini at oracle dot com [this message] 2014-08-07 0:02 ` paolo.carlini at oracle dot com 2014-08-07 19:52 ` paolo at gcc dot gnu.org 2014-08-07 19:53 ` paolo.carlini at oracle 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=bug-51312-4-oq7JwnQ2TH@http.gcc.gnu.org/bugzilla/ \ --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).