diff options
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index f3ad82e..ac09d26 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1498,6 +1498,8 @@ duplicate_decls (newdecl, olddecl, different_binding_level) tree trytype = build_function_type (newreturntype, TYPE_ARG_TYPES (oldtype)); + trytype = build_type_attribute_variant (trytype, + TYPE_ATTRIBUTES (oldtype)); types_match = comptypes (newtype, trytype); if (types_match) @@ -1519,6 +1521,8 @@ duplicate_decls (newdecl, olddecl, different_binding_level) tree_cons (NULL_TREE, TREE_VALUE (TYPE_ARG_TYPES (newtype)), TREE_CHAIN (TYPE_ARG_TYPES (oldtype)))); + trytype = build_type_attribute_variant (trytype, + TYPE_ATTRIBUTES (oldtype)); types_match = comptypes (newtype, trytype); if (types_match) |