aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2010-05-06 16:51:52 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-05-06 16:51:52 -0400
commit14c2101daa9fd45e83de153275c7650950f1b7de (patch)
tree6b6815281c65b569db623d6f41bf2f7830a753db /gcc/cp/error.c
parent0d1141a39ee38d8a2e1af47a0a64ccd47f41b908 (diff)
downloadgcc-14c2101daa9fd45e83de153275c7650950f1b7de.zip
gcc-14c2101daa9fd45e83de153275c7650950f1b7de.tar.gz
gcc-14c2101daa9fd45e83de153275c7650950f1b7de.tar.bz2
Add support for C++0x nullptr.
gcc: * c-common.c (c_common_reswords): Add nullptr. * c-common.h: Add RID_NULLPTR. Reorganize C++0x rids. * dwarf2out.c (is_base_type): Handle NULLPTR_TYPE. (gen_type_die_with_usage): Likewise. * dbxout.c (dbxout_type): Likewise. * sdbout.c (plain_type_1): Likewise. gcc/cp: * cp-tree.def: Add NULLPTR_TYPE. * cp-tree.h: Add nullptr_node. (cp_tree_index): Add CPTI_NULLPTR. (SCALAR_TYPE_P): Add NULLPTR_TYPE. * call.c (null_ptr_cst_p): Handle nullptr. (standard_conversion): Likewise. (convert_arg_to_ellipsis): Likewise. * mangle.c (write_type): Likewise. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_parser_primary_expression): Likewise. * typeck.c (cp_build_binary_op): Likewise. (build_reinterpret_cast_1): Likewise. * error.c (dump_type): Likewise. (dump_type_prefix, dump_type_suffix): Likewise. * decl.c (cxx_init_decl_processing): Likewise. * cxx-pretty-print.c (pp_cxx_constant): Likewise. * cvt.c (ocp_convert): Likewise. * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put nullptr_t tinfo in libsupc++. libstdc++-v3: * config/abi/pre/gnu.ver: Add typeinfo for decltype(nullptr). libiberty: * cp-demangle.c (cplus_demangle_builtin_types): Add nullptr. (cplus_demangle_type): Handle nullptr. From-SVN: r159131
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 4ac70f7..3a03790 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -475,6 +475,10 @@ dump_type (tree t, int flags)
pp_cxx_right_paren (cxx_pp);
break;
+ case NULLPTR_TYPE:
+ pp_string (cxx_pp, "std::nullptr_t");
+ break;
+
default:
pp_unsupported_tree (cxx_pp, t);
/* Fall through to error. */
@@ -703,6 +707,7 @@ dump_type_prefix (tree t, int flags)
case DECLTYPE_TYPE:
case TYPE_PACK_EXPANSION:
case FIXED_POINT_TYPE:
+ case NULLPTR_TYPE:
dump_type (t, flags);
pp_base (cxx_pp)->padding = pp_before;
break;
@@ -805,6 +810,7 @@ dump_type_suffix (tree t, int flags)
case DECLTYPE_TYPE:
case TYPE_PACK_EXPANSION:
case FIXED_POINT_TYPE:
+ case NULLPTR_TYPE:
break;
default: