public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57979] G++ accepts constant expression defined using floating point non-constexpr glvalue Date: Wed, 19 Nov 2014 22:06:00 -0000 [thread overview] Message-ID: <bug-57979-4-XKScMxtIR6@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-57979-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57979 --- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Wed Nov 19 22:06:17 2014 New Revision: 217814 URL: https://gcc.gnu.org/viewcvs?rev=217814&root=gcc&view=rev Log: PR c++/57979 * init.c (decl_really_constant_value): Rename from integral_constant_value. (scalar_constant_value): Similar but limited to scalar results. (decl_constant_value_safe): Remove. (constant_value_1): Respect return_aggregate_cst_ok_p. * typeck.c (decay_conversion): Use scalar_constant_value. * call.c (convert_like_real): Likewise. * cvt.c (ocp_convert): No need to check CLASS_TYPE_P. * typeck.c (decay_conversion): Or ARRAY_TYPE. * constexpr.c (struct constexpr_ctx): Add strict field. (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between decl_constant_value and decl_really_constant_value. (cxx_eval_outermost_constant_expr): Add strict parm. (maybe_constant_init): Not strict. (potential_constant_expression_1): Add strict parm. Shorten most internal calls with RECUR macro. * cp-tree.h, pt.c, semantics.c: Adjust. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/cp/constexpr.c trunk/gcc/cp/cp-tree.h trunk/gcc/cp/cvt.c trunk/gcc/cp/decl.c trunk/gcc/cp/init.c trunk/gcc/cp/pt.c trunk/gcc/cp/semantics.c trunk/gcc/cp/typeck.c trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-object2.C trunk/gcc/testsuite/g++.dg/cpp0x/nullptr06.C
next prev parent reply other threads:[~2014-11-19 22:06 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-07-25 8:13 [Bug c++/57979] New: G++ accepts constant expression defined using floating point glvalue jogojapan at gmail dot com 2013-07-25 9:16 ` [Bug c++/57979] G++ accepts constant expression defined using floating point non-constexpr glvalue jogojapan at gmail dot com 2014-09-05 9:38 ` paolo.carlini at oracle dot com 2014-11-18 14:03 ` jason at gcc dot gnu.org 2014-11-18 14:16 ` ville.voutilainen at gmail dot com 2014-11-18 14:17 ` ville.voutilainen at gmail dot com 2014-11-19 22:06 ` jason at gcc dot gnu.org [this message] 2014-11-20 3:43 ` 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-57979-4-XKScMxtIR6@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).