diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-09-24 17:16:23 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-09-24 17:16:23 +0200 |
commit | 2dff8956e37c835db601f922cadc5b1229a0a6bd (patch) | |
tree | f797391d227e5aa4b01ffffd275aa29817b4403c /gcc/tree.c | |
parent | c946ce8bb9716d31286140dad73e0d3b9e48c36b (diff) | |
download | gcc-2dff8956e37c835db601f922cadc5b1229a0a6bd.zip gcc-2dff8956e37c835db601f922cadc5b1229a0a6bd.tar.gz gcc-2dff8956e37c835db601f922cadc5b1229a0a6bd.tar.bz2 |
re PR c++/33506 (TYPE_RAISES_EXCEPTIONS dumped with attributes)
PR c++/33506
* langhooks.h (struct lang_hooks_for_types): Add type_hash_eq
field.
* langhooks-def.h (LANG_HOOKS_TYPE_HASH_EQ): Define.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add LANG_HOOKS_TYPE_HASH_EQ.
* tree.c (type_hash_eq): For FUNCTION_TYPE use
lang_hooks.type.type_hash_eq in addition to generic tests.
* cp-tree.h (cxx_type_hash_eq): New prototype.
* cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
* tree.c (cxx_type_hash_eq): New function.
* g++.dg/ext/attrib29.C: New test.
From-SVN: r128718
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -4608,17 +4608,24 @@ type_hash_eq (const void *va, const void *vb) TYPE_FIELDS (b->type)))); case FUNCTION_TYPE: - return (TYPE_ARG_TYPES (a->type) == TYPE_ARG_TYPES (b->type) - || (TYPE_ARG_TYPES (a->type) - && TREE_CODE (TYPE_ARG_TYPES (a->type)) == TREE_LIST - && TYPE_ARG_TYPES (b->type) - && TREE_CODE (TYPE_ARG_TYPES (b->type)) == TREE_LIST - && type_list_equal (TYPE_ARG_TYPES (a->type), - TYPE_ARG_TYPES (b->type)))); + if (TYPE_ARG_TYPES (a->type) == TYPE_ARG_TYPES (b->type) + || (TYPE_ARG_TYPES (a->type) + && TREE_CODE (TYPE_ARG_TYPES (a->type)) == TREE_LIST + && TYPE_ARG_TYPES (b->type) + && TREE_CODE (TYPE_ARG_TYPES (b->type)) == TREE_LIST + && type_list_equal (TYPE_ARG_TYPES (a->type), + TYPE_ARG_TYPES (b->type)))) + break; + return 0; default: return 0; } + + if (lang_hooks.types.type_hash_eq != NULL) + return lang_hooks.types.type_hash_eq (a->type, b->type); + + return 1; } /* Return the cached hash value. */ |