[llvm-commits] [llvm-gcc-4.2] r56724 - /llvm-gcc-4.2/trunk/gcc/c-typeck.c

Bill Wendling isanbard at gmail.com
Fri Sep 26 17:19:37 PDT 2008


Author: void
Date: Fri Sep 26 19:19:37 2008
New Revision: 56724

URL: http://llvm.org/viewvc/llvm-project?rev=56724&view=rev
Log:
Assignment to variadic block pointer is ok.

Modified:
    llvm-gcc-4.2/trunk/gcc/c-typeck.c

Modified: llvm-gcc-4.2/trunk/gcc/c-typeck.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-typeck.c?rev=56724&r1=56723&r2=56724&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-typeck.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-typeck.c Fri Sep 26 19:19:37 2008
@@ -4053,23 +4053,8 @@
     return false;
   arg1 = TYPE_ARG_TYPES (f1);
   arg2 = TYPE_ARG_TYPES (f2);
-  while (arg1 && arg2)
-    {
-      tree a1, a2;
-      a1 = TREE_VALUE (arg1);
-      a2 = TREE_VALUE (arg2);
-      if (TREE_CODE (a1) == BLOCK_POINTER_TYPE
-	  && TREE_CODE (a2) == BLOCK_POINTER_TYPE)
-	{
-	  a1 = TREE_TYPE (a1);
-	  a2 = TREE_TYPE (a2);
-	}
-      if (!types_are_block_compatible (a1, a2))
-	return false;
-      arg1 = TREE_CHAIN (arg1);
-      arg2 = TREE_CHAIN (arg2);
-    }
-  return !arg1 && !arg2;
+  /* APPLE LOCAL radar 6246965, 6196572 */
+  return (!arg1) || (type_lists_compatible_p (arg1, arg2) == 1);
 }
 
 static bool





More information about the llvm-commits mailing list