aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-05-13 01:04:46 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-05-13 01:04:46 -0400
commit5116acc6fefb0a16d644defe9322a7fcee768c8c (patch)
tree572a495193f31f2ec341afb86e711e1dd2c80197 /gcc/cp/cp-tree.h
parentfbfc8363a378a676d5ab71fc44edf0b8f681ffa0 (diff)
downloadgcc-5116acc6fefb0a16d644defe9322a7fcee768c8c.zip
gcc-5116acc6fefb0a16d644defe9322a7fcee768c8c.tar.gz
gcc-5116acc6fefb0a16d644defe9322a7fcee768c8c.tar.bz2
re PR bootstrap/44048 (building without C++ enabled fails)
PR bootstrap/44048 PR target/44099 gcc/cp: * cp-tree.def (NULLPTR_TYPE): Remove. * cp-tree.h (NULLPTR_TYPE_P): New. (SCALAR_TYPE_P): Use it. (nullptr_type_node): New. (cp_tree_index): Add CPTI_NULLPTR_TYPE. * decl.c (cxx_init_decl_processing): Call record_builtin_type on nullptr_type_node. * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE. * cxx-pretty-print.c (pp_cxx_constant): Likewise. * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise. * mangle.c (write_type): Likewise. * name-lookup.c (arg_assoc_type): Likewise. * typeck.c (build_reinterpret_cast_1): Likewise. * rtti.c (typeinfo_in_lib_p): Likewise. (emit_support_tinfos): Remove local nullptr_type_node. gcc: * dbxout.c (dbxout_type): Remove NULLPTR_TYPE handling. * sdbout.c (plain_type_1): Likewise. * dwarf2out.c (is_base_type): Likewise. (gen_type_die_with_usage): Likewise. Generate DW_TAG_unspecified_type for any LANG_TYPE. From-SVN: r159350
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index a28a2e3..02e81eb 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -776,6 +776,7 @@ enum cp_tree_index
CPTI_KEYED_CLASSES,
CPTI_NULLPTR,
+ CPTI_NULLPTR_TYPE,
CPTI_MAX
};
@@ -812,6 +813,7 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
#define global_delete_fndecl cp_global_trees[CPTI_GLOBAL_DELETE_FNDECL]
#define current_aggr cp_global_trees[CPTI_AGGR_TAG]
#define nullptr_node cp_global_trees[CPTI_NULLPTR]
+#define nullptr_type_node cp_global_trees[CPTI_NULLPTR_TYPE]
/* We cache these tree nodes so as to call get_identifier less
frequently. */
@@ -3002,6 +3004,11 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
|| TREE_CODE (TYPE) == REAL_TYPE \
|| TREE_CODE (TYPE) == COMPLEX_TYPE)
+/* True iff TYPE is cv decltype(nullptr). */
+#define NULLPTR_TYPE_P(TYPE) \
+ (TREE_CODE (TYPE) == LANG_TYPE \
+ && TYPE_MAIN_VARIANT (TYPE) == nullptr_type_node)
+
/* [basic.types]
Arithmetic types, enumeration types, pointer types,
@@ -3015,7 +3022,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
|| ARITHMETIC_TYPE_P (TYPE) \
|| TYPE_PTR_P (TYPE) \
|| TYPE_PTRMEMFUNC_P (TYPE) \
- || TREE_CODE (TYPE) == NULLPTR_TYPE)
+ || NULLPTR_TYPE_P (TYPE))
/* Determines whether this type is a C++0x scoped enumeration
type. Scoped enumerations types are introduced via "enum class" or