http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44561
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-11
09:30:57 UTC ---
New problems.
typedef decltype(nullptr) nullptr_t;
class shared_ptr {
public:
shared_ptr(nullptr_t __p);
};
shared_ptr p = nullptr;
exposes a nullptr constant (INTEGER_CST of LANG_TYPE). Of course
build_int_cst_wide doesn't like this at all. From
cp/decl.c:cxx_init_decl_processing():
nullptr_node = make_node (INTEGER_CST);
TREE_TYPE (nullptr_node) = nullptr_type_node;
:(
One more reason to make NULLPTR_TYPE a regular middle-end tree code.