aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-11-19 17:06:17 -0500
committerJason Merrill <jason@gcc.gnu.org>2014-11-19 17:06:17 -0500
commit69eb4fde588c5c2e4e206aeba9a5a17fcaf5cecb (patch)
tree7ab8f15cad76cb28be65015b3cbb7153217b4139 /gcc/function.c
parent6d06c429dc7effbf2ecc26401c7d43f5ab192dd7 (diff)
downloadgcc-69eb4fde588c5c2e4e206aeba9a5a17fcaf5cecb.zip
gcc-69eb4fde588c5c2e4e206aeba9a5a17fcaf5cecb.tar.gz
gcc-69eb4fde588c5c2e4e206aeba9a5a17fcaf5cecb.tar.bz2
re PR c++/57979 (G++ accepts constant expression defined using floating point non-constexpr glvalue)
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. From-SVN: r217814
Diffstat (limited to 'gcc/function.c')
0 files changed, 0 insertions, 0 deletions