Commit 50e4d1ec by Paolo Carlini Committed by Paolo Carlini

re PR c++/59571 ([C++11] ICE when casting inside static member constexpr brace initializer)

/cp
2014-03-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59571
	* typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.

/testsuite
2014-03-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59571
	* g++.dg/cpp0x/constexpr-ice13.C: New.

From-SVN: r208619
parent ab2ffbeb
2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59571
* typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2014-03-14 Jason Merrill <jason@redhat.com> 2014-03-14 Jason Merrill <jason@redhat.com>
PR c++/60532 PR c++/60532
......
...@@ -861,7 +861,7 @@ check_narrowing (tree type, tree init) ...@@ -861,7 +861,7 @@ check_narrowing (tree type, tree init)
return; return;
} }
init = maybe_constant_value (init); init = maybe_constant_value (fold_non_dependent_expr_sfinae (init, tf_none));
if (TREE_CODE (type) == INTEGER_TYPE if (TREE_CODE (type) == INTEGER_TYPE
&& TREE_CODE (ftype) == REAL_TYPE) && TREE_CODE (ftype) == REAL_TYPE)
......
2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59571
* g++.dg/cpp0x/constexpr-ice13.C: New.
2014-03-17 Marek Polacek <polacek@redhat.com> 2014-03-17 Marek Polacek <polacek@redhat.com>
PR middle-end/60534 PR middle-end/60534
......
// PR c++/59571
// { dg-do compile { target c++11 } }
template <class>
struct foo
{
static constexpr int bar{(int)-1};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment