This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[incremental] Patch: FYI: fix array completion


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]