This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[incremental] Patch: FYI: fix array completion
- From: Tom Tromey <tromey at redhat dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Sep 2007 14:11:56 -0600
- Subject: [incremental] Patch: FYI: fix array completion
- Reply-to: Tom Tromey <tromey at redhat dot com>
I'm checking this in on the incremental-compiler branch.
This just fixes a small thinko in pushdecl, which broke building
libiberty. Now a typical build of the tree succeeds again.
I also added a couple of FIXME comments to remind me to go back and
fix a couple more decl-smashing problems.
Tom
ChangeLog:
2007-09-19 Tom Tromey <tromey@redhat.com>
* c-decl.c (pushdecl): Pass b_use, not b, to duplicate_decls.
Index: c-decl.c
===================================================================
--- c-decl.c (revision 128581)
+++ c-decl.c (working copy)
@@ -2259,10 +2259,10 @@
{
b_use = b_ext;
if (b_use->type)
- TREE_TYPE (b_use->decl) = b_use->type;
+ TREE_TYPE (b_use->decl) = b_use->type; /* FIXME!!! */
}
}
- if (duplicate_decls (x, b_use->decl, b))
+ if (duplicate_decls (x, b_use->decl, b_use))
{
if (b_use != b)
{
@@ -2280,7 +2280,7 @@
= build_type_attribute_variant (thistype,
TYPE_ATTRIBUTES
(b_use->type));
- TREE_TYPE (b_use->decl) = thistype;
+ TREE_TYPE (b_use->decl) = thistype; /* FIXME!!! */
}
return b_use->decl;
}
@@ -2357,7 +2357,7 @@
composite of the visible types only. */
if (b && (TREE_PUBLIC (x) || same_translation_unit_p (x, b->decl))
&& b->type)
- TREE_TYPE (b->decl) = b->type;
+ TREE_TYPE (b->decl) = b->type; /* FIXME!!! */
/* The point of the same_translation_unit_p check here is,
we want to detect a duplicate decl for a construct like
@@ -2383,7 +2383,7 @@
thistype
= build_type_attribute_variant (thistype,
TYPE_ATTRIBUTES (b->type));
- TREE_TYPE (b->decl) = thistype;
+ TREE_TYPE (b->decl) = thistype; /* FIXME!!! */
bind (name, b->decl, scope, /*invisible=*/false, /*nested=*/true,
/*notify_ok=*/true);
return b->decl;