diff --git a/gcc/builtins.c b/gcc/builtins.c index a75b24c549288536205cb67a91f2cbdd2125a3ee..40e77c7bf40eb010305b237a5e8a7ee2ab4c3151 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2228,6 +2228,7 @@ type_to_class (tree type) case ARRAY_TYPE: return (TYPE_STRING_FLAG (type) ? string_type_class : array_type_class); case LANG_TYPE: return lang_type_class; + case OPAQUE_TYPE: return opaque_type_class; default: return no_type_class; } } diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c index 8953e3b678b8b70a55ec145b1b61b697d9e0660c..3027703056bf1c7e65dfea8737093e2bfa8a9729 100644 --- a/gcc/c-family/c-pretty-print.c +++ b/gcc/c-family/c-pretty-print.c @@ -342,6 +342,7 @@ c_pretty_printer::simple_type_specifier (tree t) break; case VOID_TYPE: + case OPAQUE_TYPE: case BOOLEAN_TYPE: case INTEGER_TYPE: case REAL_TYPE: @@ -662,6 +663,7 @@ c_pretty_printer::direct_abstract_declarator (tree t) case IDENTIFIER_NODE: case VOID_TYPE: + case OPAQUE_TYPE: case BOOLEAN_TYPE: case INTEGER_TYPE: case REAL_TYPE: diff --git a/gcc/c/c-aux-info.c b/gcc/c/c-aux-info.c index ffc8099856d32e23a88876a0c00b74ae3e835264..bdeef525892233023d819e4e4863af8487e20481 100644 --- a/gcc/c/c-aux-info.c +++ b/gcc/c/c-aux-info.c @@ -409,6 +409,7 @@ gen_type (const char *ret_val, tree t, formals_style style) data_type = concat ("unsigned ", data_type, NULL); break; + case OPAQUE_TYPE: case REAL_TYPE: data_type = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (t))); break; diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 396558be17f091500c326c255da897d2fb4e861f..d27545d1223b366bf021042b3c2734cb30abf72b 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -529,6 +529,7 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags) case INTEGER_TYPE: case REAL_TYPE: case VOID_TYPE: + case OPAQUE_TYPE: case BOOLEAN_TYPE: case COMPLEX_TYPE: case VECTOR_TYPE: @@ -874,6 +875,7 @@ dump_type_prefix (cxx_pretty_printer *pp, tree t, int flags) case UNION_TYPE: case LANG_TYPE: case VOID_TYPE: + case OPAQUE_TYPE: case TYPENAME_TYPE: case COMPLEX_TYPE: case VECTOR_TYPE: @@ -997,6 +999,7 @@ dump_type_suffix (cxx_pretty_printer *pp, tree t, int flags) case UNION_TYPE: case LANG_TYPE: case VOID_TYPE: + case OPAQUE_TYPE: case TYPENAME_TYPE: case COMPLEX_TYPE: case VECTOR_TYPE: @@ -2810,6 +2813,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) case ENUMERAL_TYPE: case REAL_TYPE: case VOID_TYPE: + case OPAQUE_TYPE: case BOOLEAN_TYPE: case INTEGER_TYPE: case COMPLEX_TYPE: diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 463b1c3a57d6de4ab6e2c39792474e9c1a858241..b03778613ae75df9896645644bf40b8a02cfc0ba 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -15376,6 +15376,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) case ERROR_MARK: case IDENTIFIER_NODE: case VOID_TYPE: + case OPAQUE_TYPE: case REAL_TYPE: case COMPLEX_TYPE: case VECTOR_TYPE: @@ -23588,6 +23589,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict, case BOOLEAN_TYPE: case ENUMERAL_TYPE: case VOID_TYPE: + case OPAQUE_TYPE: case NULLPTR_TYPE: if (TREE_CODE (arg) != TREE_CODE (parm)) return unify_type_mismatch (explain_p, parm, arg); diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 700e166ca6683d90c381c8e07f4079facb8edf93..729c7069c4f3e0dd5965c5431509f1ca0d4be871 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -1314,6 +1314,7 @@ structural_comptypes (tree t1, tree t2, int strict) /* All void and bool types are the same. */ break; + case OPAQUE_TYPE: case INTEGER_TYPE: case FIXED_POINT_TYPE: case REAL_TYPE: diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 07e1a9218329ff48bdcd167ad4189877aac39e54..01e7ae183d51110afd22d85771f1943cc750cded 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -13038,6 +13038,7 @@ is_base_type (tree type) return 1; case VOID_TYPE: + case OPAQUE_TYPE: case ARRAY_TYPE: case RECORD_TYPE: case UNION_TYPE: @@ -25776,6 +25777,7 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die, return; case VOID_TYPE: + case OPAQUE_TYPE: case INTEGER_TYPE: case REAL_TYPE: case FIXED_POINT_TYPE: diff --git a/gcc/expr.c b/gcc/expr.c index 83aa63c41b57c676ea5c3449152bed91d10fae64..25e93b6d46fd79a9ab0347a6c72adf419c4e9e6a 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6171,6 +6171,7 @@ count_type_elements (const_tree type, bool for_ctor_p) return 0; case VOID_TYPE: + case OPAQUE_TYPE: case METHOD_TYPE: case FUNCTION_TYPE: case LANG_TYPE: diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 6e6df0b2af5afe8245171427aaf4b9476e85aa0b..0f2b8143849c9db33dbb95d490d38b13aa783f6f 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -1521,6 +1521,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, break; } case VOID_TYPE: + case OPAQUE_TYPE: case NULLPTR_TYPE: break; diff --git a/gcc/tree-streamer.c b/gcc/tree-streamer.c index b0afa1dc6c0c29ef2cf0d9e2b50337ce27ecd89b..a393983f76ca3ff34b0a4fefa5e025b9c29d4b13 100644 --- a/gcc/tree-streamer.c +++ b/gcc/tree-streamer.c @@ -317,6 +317,7 @@ record_common_node (struct streamer_tree_cache_d *cache, tree node) case TREE_LIST: case VOID_CST: case VOID_TYPE: + case OPAQUE_TYPE: /* No recursive trees. */ break; case ARRAY_TYPE: diff --git a/gcc/tree.c b/gcc/tree.c index 531fe96542259967d85ea058a1832e5300f5ab84..d6ba55319bfc3102b2541532089ac83c80499d56 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -3972,6 +3972,7 @@ type_contains_placeholder_1 (const_tree type) switch (TREE_CODE (type)) { case VOID_TYPE: + case OPAQUE_TYPE: case COMPLEX_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: @@ -7100,6 +7101,7 @@ type_cache_hasher::equal (type_hash *a, type_hash *b) switch (TREE_CODE (a->type)) { case VOID_TYPE: + case OPAQUE_TYPE: case COMPLEX_TYPE: case POINTER_TYPE: case REFERENCE_TYPE: diff --git a/gcc/typeclass.h b/gcc/typeclass.h index 434e6acf6c9ca57d6db927e85e7409619a25330c..b4e3dda21eca4d74339654c41186c9b1d9fa8bbd 100644 --- a/gcc/typeclass.h +++ b/gcc/typeclass.h @@ -37,7 +37,7 @@ enum type_class function_type_class, method_type_class, record_type_class, union_type_class, array_type_class, string_type_class, - lang_type_class + lang_type_class, opaque_type_class }; #endif /* GCC_TYPECLASS_H */