extern "C" int isnan (double); void f(double d) { bool b = isnan(d); } $ ~/gcc/4.6/bin/g++ s.cc -std=gnu++0x s.cc: In function 'void f(double)': s.cc:5:21: sorry, unimplemented: unexpected ast of kind unordered_expr s.cc:5:21: internal compiler error: in potential_constant_expression_1, at cp/semantics.c:7746 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Only happens when the function is extern "C" but that obviously affects the whole of <math.h> No ICE for -std=c++98 / gnu++98 / c++0x, only gnu++0x I haven't tried it on trunk
Author: jason Date: Wed Mar 30 19:50:17 2011 New Revision: 171746 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171746 Log: PR c++/48369 * semantics.c (potential_constant_expression_1): Handle UNORDERED_EXPR and ORDERED_EXPR. Added: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/regress/isnan.C Modified: branches/gcc-4_6-branch/gcc/cp/ChangeLog branches/gcc-4_6-branch/gcc/cp/semantics.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
Author: jason Date: Wed Mar 30 19:51:32 2011 New Revision: 171747 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171747 Log: PR c++/48369 * semantics.c (potential_constant_expression_1): Handle UNORDERED_EXPR and ORDERED_EXPR. Added: trunk/gcc/testsuite/g++.dg/cpp0x/regress/isnan.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog
Fixed for 4.6.1.
*** Bug 48577 has been marked as a duplicate of this bug. ***