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]

[gcc-in-cxx] Fix objc frontend to build with C++


I committed this patch to the gcc-in-cxx branch to let the objc frontend
to let it build with C++.  Among other things, this corrects an earlier
merge error.

Ian


2009-03-04  Ian Lance Taylor  <iant@google.com>

	* objc/Make-lang.in (cc1obj-dummy$(exeext)): Link with $(CXX).
	(cc1obj$(exeext)): Likewise.
	* objc/objc-act.c (objc_rewrite_function_call): Change params to
	tree.
	(objc_gimplify_expr): Change return type to int.
	* objc/objc-act.h (objc_gimplify_expr): Update declaration.


Index: objc/Make-lang.in
===================================================================
--- objc/Make-lang.in	(revision 144568)
+++ objc/Make-lang.in	(working copy)
@@ -52,7 +52,7 @@ OBJC_OBJS = objc/objc-lang.o objc/objc-a
 objc_OBJS = $(OBJC_OBJS) cc1obj-checksum.o
 
 cc1obj-dummy$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
-	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+	$(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
 	      $(OBJC_OBJS) $(C_AND_OBJC_OBJS) dummy-checksum.o \
 	      $(BACKEND) $(LIBS) $(BACKENDLIBS)
 
@@ -62,7 +62,7 @@ cc1obj-checksum.c : cc1obj-dummy$(exeext
 cc1obj-checksum.o : cc1obj-checksum.c
 
 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) $(LIBDEPS)
-	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+	$(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
 	      $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o \
 	      $(BACKEND) $(LIBS) $(BACKENDLIBS)
 
Index: objc/objc-act.c
===================================================================
--- objc/objc-act.c	(revision 144568)
+++ objc/objc-act.c	(working copy)
@@ -9490,7 +9490,7 @@ objc_lookup_ivar (tree other, tree id)
    needs to be done if we are calling a function through a cast.  */
 
 tree
-objc_rewrite_function_call (tree function, VEC(tree,gc) *params)
+objc_rewrite_function_call (tree function, tree params)
 {
   if (TREE_CODE (function) == NOP_EXPR
       && TREE_CODE (TREE_OPERAND (function, 0)) == ADDR_EXPR
@@ -9499,7 +9499,7 @@ objc_rewrite_function_call (tree functio
     {
       function = build3 (OBJ_TYPE_REF, TREE_TYPE (function),
 			 TREE_OPERAND (function, 0),
-			 VEC_index (tree, params, 0), size_zero_node);
+			 TREE_VALUE (params), size_zero_node);
     }
 
   return function;
@@ -9509,7 +9509,7 @@ objc_rewrite_function_call (tree functio
    a function in OBJ_TYPE_REF_EXPR (presumably objc_msgSend or one
    of its cousins).  */
 
-enum gimplify_status
+int
 objc_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 {
   enum gimplify_status r0, r1;
Index: objc/objc-act.h
===================================================================
--- objc/objc-act.h	(revision 144568)
+++ objc/objc-act.h	(working copy)
@@ -31,7 +31,7 @@ bool objc_init (void);
 const char *objc_printable_name (tree, int);
 void objc_finish_file (void);
 tree objc_fold_obj_type_ref (tree, tree);
-enum gimplify_status objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
+int objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
 
 /* NB: The remaining public functions are prototyped in c-common.h, for the
    benefit of stub-objc.c and objc-act.c.  */

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