X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fcp%2Fcp-tree.h;h=9ae7f7f010535a7adcda1a9fe3b7a95a32c3d773;hb=8096679edecdd39e95252580a30d4cffda75c649;hp=a28a2e30fdab83f73249363c942dfae234b6c9f1;hpb=4fdaf896dddd224958053b670bc9be78f102e789;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index a28a2e30fda..9ae7f7f0105 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. */ @@ -1739,6 +1741,12 @@ struct GTY(()) lang_type { (TYPE_RAISES_EXCEPTIONS (NODE) \ && TREE_VALUE (TYPE_RAISES_EXCEPTIONS (NODE)) == NULL_TREE) +/* For FUNCTION_TYPE or METHOD_TYPE, true if NODE is noexcept. This is the + case for things declared noexcept(true) and, with -fnothrow-opt, for + throw() functions. */ +#define TYPE_NOEXCEPT_P(NODE) \ + (flag_nothrow_opt && TYPE_NOTHROW_P(NODE)) + /* The binding level associated with the namespace. */ #define NAMESPACE_LEVEL(NODE) \ (LANG_DECL_NS_CHECK (NODE)->level) @@ -3002,6 +3010,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 +3028,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 @@ -4857,7 +4870,7 @@ extern tree create_temporary_var (tree); extern void initialize_vtbl_ptrs (tree); extern tree build_java_class_ref (tree); extern tree integral_constant_value (tree); -extern int diagnose_uninitialized_cst_or_ref_member (tree, bool, bool); +extern void diagnose_uninitialized_cst_or_ref_member (tree, bool); /* in lex.c */ extern void cxx_dup_lang_specific_decl (tree); @@ -5359,6 +5372,8 @@ extern tree build_x_indirect_ref (tree, ref_operator, extern tree cp_build_indirect_ref (tree, ref_operator, tsubst_flags_t); extern tree build_array_ref (location_t, tree, tree); +extern tree cp_build_array_ref (location_t, tree, tree, + tsubst_flags_t); extern tree get_member_function_from_ptrfunc (tree *, tree); extern tree cp_build_function_call (tree, tree, tsubst_flags_t); extern tree cp_build_function_call_vec (tree, VEC(tree,gc) **,