mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-12 07:10:26 +08:00
c-decl.c (duplicate_decls): If different_binding_level is nonzero...
* c-decl.c (duplicate_decls): If different_binding_level is nonzero, olddecl has argument types and newdecl has none, use the argument types from olddecl. From-SVN: r39254
This commit is contained in:
parent
e57cabac80
commit
91239b939c
@ -1,3 +1,9 @@
|
||||
Thu Jan 25 02:01:16 2001 J"orn Rennecke <amylaar@redhat.com>
|
||||
|
||||
* c-decl.c (duplicate_decls): If different_binding_level is nonzero,
|
||||
olddecl has argument types and newdecl has none, use the argument
|
||||
types from olddecl.
|
||||
|
||||
2001-01-24 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* dwarf2out.c (prefix_of): New function. Determine longest common
|
||||
|
16
gcc/c-decl.c
16
gcc/c-decl.c
@ -1800,11 +1800,17 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
|
||||
if (TREE_CODE (newdecl) != FUNCTION_DECL || !DECL_BUILT_IN (olddecl))
|
||||
{
|
||||
if (different_binding_level)
|
||||
TREE_TYPE (newdecl)
|
||||
= build_type_attribute_variant
|
||||
(newtype,
|
||||
merge_attributes (TYPE_ATTRIBUTES (newtype),
|
||||
TYPE_ATTRIBUTES (oldtype)));
|
||||
{
|
||||
if (TYPE_ARG_TYPES (oldtype) != 0
|
||||
&& TYPE_ARG_TYPES (newtype) == 0)
|
||||
TREE_TYPE (newdecl) = common_type (newtype, oldtype);
|
||||
else
|
||||
TREE_TYPE (newdecl)
|
||||
= build_type_attribute_variant
|
||||
(newtype,
|
||||
merge_attributes (TYPE_ATTRIBUTES (newtype),
|
||||
TYPE_ATTRIBUTES (oldtype)));
|
||||
}
|
||||
else
|
||||
TREE_TYPE (newdecl)
|
||||
= TREE_TYPE (olddecl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user