public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54021] [c++0x] __builtin_constant_p should be constexpr Date: Thu, 19 Jul 2012 07:12:00 -0000 [thread overview] Message-ID: <bug-54021-4-Z45z1eATl3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54021-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54021 --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-07-19 07:12:18 UTC --- Perhaps the C++ FE could when parsing a constexpr function during finish_call_expr of __builtin_constant_p just temporarily force optimize = 1 if it is zero to prevent folding it to 0 (or alternatively, if it folds to 0, build it non-folded), it would be an extension over how this builtin behaves right now, on the other side as constexpr is "optimized" even at -O0 it would match the intent of the builtin. The question is if/when it will be actually folded to 0 afterwards if not in constexpr context.
next prev parent reply other threads:[~2012-07-19 7:12 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-07-18 19:52 [Bug c++/54021] New: " luto at mit dot edu 2012-07-19 6:53 ` [Bug c++/54021] " jakub at gcc dot gnu.org 2012-07-19 7:12 ` jakub at gcc dot gnu.org [this message] 2012-07-19 20:02 ` jason at gcc dot gnu.org 2012-07-19 20:57 ` jason at gcc dot gnu.org 2012-09-08 21:36 ` david at doublewise dot net 2012-09-08 22:29 ` luto at mit dot edu 2012-09-09 6:00 ` david at doublewise dot net 2012-09-09 6:05 ` luto at mit dot edu 2012-09-09 16:48 ` jason at gcc dot gnu.org
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-54021-4-Z45z1eATl3@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).