re PR c++/48369 ([C++0x] ICE in potential_constant_expression_1, at cp/semantics.c:7746)

PR c++/48369
	* semantics.c (potential_constant_expression_1): Handle
	UNORDERED_EXPR and ORDERED_EXPR.

From-SVN: r171747
This commit is contained in:
Jason Merrill 2011-03-30 15:51:32 -04:00 committed by Jason Merrill
parent 666a21a299
commit e0f89433aa
4 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2011-03-30 Jason Merrill <jason@redhat.com>
PR c++/48369
* semantics.c (potential_constant_expression_1): Handle
UNORDERED_EXPR and ORDERED_EXPR.
PR c++/48281
* semantics.c (finish_compound_literal): Do put static/constant
arrays in static variables.

View File

@ -7744,6 +7744,8 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
case TRUTH_XOR_EXPR:
case UNORDERED_EXPR:
case ORDERED_EXPR:
case UNLT_EXPR:
case UNLE_EXPR:
case UNGT_EXPR:

View File

@ -1,5 +1,7 @@
2011-03-30 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/regress/isnan.C: New.
* g++.dg/cpp0x/initlist46.C: New.
2011-03-30 Richard Sandiford <richard.sandiford@linaro.org>

View File

@ -0,0 +1,9 @@
// PR c++/48369
// { dg-options -std=gnu++0x }
extern "C" int isnan (double);
void f(double d)
{
bool b = isnan(d);
}