public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [C++/Obj-C++ PATCH] Fix Objective-C++ breakage
@ 2008-03-27 10:12 Steven Bosscher
  2008-03-27 10:22 ` Paolo Bonzini
  2008-03-27 16:19 ` Joseph S. Myers
  0 siblings, 2 replies; 55+ messages in thread
From: Steven Bosscher @ 2008-03-27 10:12 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Stan Shebs, Andrew Pinski, Doug Gregor, GCC Patches

xf. http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01640.html

On Wed, 26 Mar 2008, Kaveh R. GHAZI wrote:
> I think showing progress on this front would help establish that objc++ is
> actively maintained and strengthen the argument to put it in the default
> bootstrap list.  Stan, are you able to contribute on this front?

Is "actively maintained" an argument to enable a language by default?
Ada is actively maintained, and the Ada language probably has far more
users than ObjC++ does. But GNAT is not enabled by default. It is good
that Stan has stood up to maintain it, but the real maintenance hassle
is not on Stan but on everyone who wants to change the C, ObjC, or C++
front ends. If I look at the ObjC++ front end, I see a
dump-and-disappear action by the front end contributors, burdening the
community with the maintenance for it.

So who is going to benefit from enabling ObjC++ by default? Certainly
not any of the groups and individuals who actively contribute to GCC
development. Maybe the odd-one-out Apple user who builds GCC from
source, but that wouldn't justify enabling the front end for everyone
by default, IMHO.

The SC tried to avoid exactly the situation GCC is in now
(http://gcc.gnu.org/ml/gcc/2004-06/msg00818.html): "Furthermore,
nobody will be required to test Objective-C++ as part of the check-in
cycle, and people who cause defects in Objective-C++ will not
necessarily be required to fix them, although good manners dictates
that people will help clean up their own mess where practical."

Gr.
Steven

^ permalink raw reply	[flat|nested] 55+ messages in thread
* Re: [C++/Obj-C++ PATCH] Fix Objective-C++ breakage
@ 2008-03-28 13:08 FX Coudert
  0 siblings, 0 replies; 55+ messages in thread
From: FX Coudert @ 2008-03-28 13:08 UTC (permalink / raw)
  To: gcc patches

Hi,

I'm adding a little comment here:

> Inlining changes: Ada, C and C++ show more issues than Fortran.

More inlining opportunities are expected in Fortran when the multiple- 
decls-per-function issue is fixed (I'm working on it for 4.4). I  
don't know if it will make us on par with other languages.

Another comment: my feeling is that the Fortran front-end and  
testsuite have exposed quite a few tree-optimization regressions  
during 4.2 and 4.3 development. I'm wondering what are the times of  
the different testsuites (C, C++, Fortran, Java); from my feeling (as  
front-end maintainer, I don't often test C, rarely C++, and almost  
never Java), C++ and Java are the major resource eaters.

FX


-- 
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/

^ permalink raw reply	[flat|nested] 55+ messages in thread
* Re: [C++/Obj-C++ PATCH] Fix Objective-C++ breakage
@ 2008-03-26 20:58 Dominique Dhumieres
  0 siblings, 0 replies; 55+ messages in thread
From: Dominique Dhumieres @ 2008-03-26 20:58 UTC (permalink / raw)
  To: gcc-patches

I have opened pr35704 this morning, though my summary was not explicit
enough. The patch fixed the bootstrap issue for me.

Dominique

^ permalink raw reply	[flat|nested] 55+ messages in thread
* [C++/Obj-C++ PATCH] Fix Objective-C++ breakage
@ 2008-03-25 17:58 Doug Gregor
  2008-03-26  6:46 ` Andrew Pinski
  2008-03-26 20:44 ` Stan Shebs
  0 siblings, 2 replies; 55+ messages in thread
From: Doug Gregor @ 2008-03-25 17:58 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

My SFINAE patch to the C++ front end broke the Objective-C++ front
end. This patch fixes the problem, which involves some renaming of
routines in the C++ front end as well as minor fixes to the
Objective-C++ front end. Okay for mainline?

  - Doug

2008-03-25  Douglas Gregor  <doug.gregor@gmail.com>

	* typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
	(build_compound_expr): New, for compatibility with C
	build_compound_expr.
	(cp_build_compound_expr): Renamed from build_compound_expr.
	(build_c_cast): New, for compatibility with C build_c_cast.
	(cp_build_c_cast): Renamed from build_c_cast.
	* init.c (build_vec_delete_1): Fix calls to build_compound_expr.
	* decl.c (cxx_maybe_build_cleanup): Ditto.
	* cp-tree.h (build_compound_expr): Add C-compatibile prototype.
	(cp_build_compound_expr): Renamed from build_compound_expr.
	(build_c_cast): Add C-compatible prototype.
	(cp_build_c_cast): Renamed from build_c_cast.
	* typeck2.c (build_functional_cast): Use cp_build_c_cast.
	* parser.c (cp_parser_cast_expression): Fix call to build_c_cast.

2008-03-25  Douglas Gregor  <doug.gregor@gmail.com>

	* objc-act.c (objc_build_component_ref): Fix call to
	finish_class_member_access_expr.
	(objc_generate_cxx_ctor_or_dtor): Fix call to
	build_special_member_call.

[-- Attachment #2: sfinae-339-objc.patch --]
[-- Type: application/octet-stream, Size: 7113 bytes --]

Index: cp/typeck.c
===================================================================
--- cp/typeck.c	(revision 133519)
+++ cp/typeck.c	(working copy)
@@ -5037,7 +5037,7 @@ build_x_compound_expr (tree op1, tree op
   result = build_new_op (COMPOUND_EXPR, LOOKUP_NORMAL, op1, op2, NULL_TREE,
 			 /*overloaded_p=*/NULL, complain);
   if (!result)
-    result = build_compound_expr (op1, op2, complain);
+    result = cp_build_compound_expr (op1, op2, complain);
 
   if (processing_template_decl && result != error_mark_node)
     return build_min_non_dep (COMPOUND_EXPR, result, orig_op1, orig_op2);
@@ -5045,10 +5045,18 @@ build_x_compound_expr (tree op1, tree op
   return result;
 }
 
+/* Like cp_build_compound_expr, but for the c-common bits.  */
+
+tree
+build_compound_expr (tree lhs, tree rhs)
+{
+  return cp_build_compound_expr (lhs, rhs, tf_warning_or_error);
+}
+
 /* Build a compound expression.  */
 
 tree
-build_compound_expr (tree lhs, tree rhs, tsubst_flags_t complain)
+cp_build_compound_expr (tree lhs, tree rhs, tsubst_flags_t complain)
 {
   lhs = convert_to_void (lhs, "left-hand operand of comma", complain);
 
@@ -5775,11 +5783,19 @@ build_const_cast (tree type, tree expr, 
 			     /*valid_p=*/NULL);
 }
 
+/* Like cp_build_c_cast, but for the c-common bits.  */
+
+tree
+build_c_cast (tree type, tree expr)
+{
+  return cp_build_c_cast (type, expr, tf_warning_or_error);
+}
+
 /* Build an expression representing an explicit C-style cast to type
    TYPE of expression EXPR.  */
 
 tree
-build_c_cast (tree type, tree expr, tsubst_flags_t complain)
+cp_build_c_cast (tree type, tree expr, tsubst_flags_t complain)
 {
   tree value = expr;
   tree result;
@@ -6466,7 +6482,7 @@ build_ptrmemfunc (tree type, tree pfn, i
   /* Handle null pointer to member function conversions.  */
   if (integer_zerop (pfn))
     {
-      pfn = build_c_cast (type, integer_zero_node, tf_warning_or_error);
+      pfn = build_c_cast (type, integer_zero_node);
       return build_ptrmemfunc1 (to_type,
 				integer_zero_node,
 				pfn);
Index: cp/init.c
===================================================================
--- cp/init.c	(revision 133519)
+++ cp/init.c	(working copy)
@@ -2528,15 +2528,13 @@ build_vec_delete_1 (tree base, tree maxi
   body = build_compound_expr
     (body, cp_build_modify_expr (tbase, NOP_EXPR,
 				 build2 (POINTER_PLUS_EXPR, ptype, tbase, tmp),
-				 tf_warning_or_error),
-     tf_warning_or_error);
+				 tf_warning_or_error));
   body = build_compound_expr
     (body, build_delete (ptype, tbase, sfk_complete_destructor,
-			 LOOKUP_NORMAL|LOOKUP_DESTRUCTOR, 1),
-     tf_warning_or_error);
+			 LOOKUP_NORMAL|LOOKUP_DESTRUCTOR, 1));
 
   loop = build1 (LOOP_EXPR, void_type_node, body);
-  loop = build_compound_expr (tbase_init, loop, tf_warning_or_error);
+  loop = build_compound_expr (tbase_init, loop);
 
  no_destructor:
   /* If the delete flag is one, or anything else with the low bit set,
@@ -2582,7 +2580,7 @@ build_vec_delete_1 (tree base, tree maxi
   else if (!body)
     body = deallocate_expr;
   else
-    body = build_compound_expr (body, deallocate_expr, tf_warning_or_error);
+    body = build_compound_expr (body, deallocate_expr);
 
   if (!body)
     body = integer_zero_node;
Index: cp/decl.c
===================================================================
--- cp/decl.c	(revision 133519)
+++ cp/decl.c	(working copy)
@@ -12229,7 +12229,7 @@ cxx_maybe_build_cleanup (tree decl)
       call = build_delete (TREE_TYPE (addr), addr,
 			   sfk_complete_destructor, flags, 0);
       if (cleanup)
-	cleanup = build_compound_expr (cleanup, call, tf_warning_or_error);
+	cleanup = build_compound_expr (cleanup, call);
       else
 	cleanup = call;
     }
Index: cp/cp-tree.h
===================================================================
--- cp/cp-tree.h	(revision 133519)
+++ cp/cp-tree.h	(working copy)
@@ -4804,11 +4804,13 @@ extern tree build_x_conditional_expr		(t
                                                  tsubst_flags_t);
 extern tree build_x_compound_expr_from_list	(tree, const char *);
 extern tree build_x_compound_expr		(tree, tree, tsubst_flags_t);
-extern tree build_compound_expr			(tree, tree, tsubst_flags_t);
+extern tree build_compound_expr                 (tree, tree);
+extern tree cp_build_compound_expr		(tree, tree, tsubst_flags_t);
 extern tree build_static_cast			(tree, tree, tsubst_flags_t);
 extern tree build_reinterpret_cast		(tree, tree, tsubst_flags_t);
 extern tree build_const_cast			(tree, tree, tsubst_flags_t);
-extern tree build_c_cast			(tree, tree, tsubst_flags_t);
+extern tree build_c_cast			(tree, tree);
+extern tree cp_build_c_cast			(tree, tree, tsubst_flags_t);
 extern tree build_x_modify_expr			(tree, enum tree_code, tree,
 						 tsubst_flags_t);
 extern tree cp_build_modify_expr		(tree, enum tree_code, tree,
Index: cp/typeck2.c
===================================================================
--- cp/typeck2.c	(revision 133519)
+++ cp/typeck2.c	(working copy)
@@ -1342,7 +1342,7 @@ build_functional_cast (tree exp, tree pa
 
       /* This must build a C cast.  */
       parms = build_x_compound_expr_from_list (parms, "functional cast");
-      return build_c_cast (type, parms, complain);
+      return cp_build_c_cast (type, parms, complain);
     }
 
   /* Prepare to evaluate as a call to a constructor.  If this expression
@@ -1363,7 +1363,7 @@ build_functional_cast (tree exp, tree pa
      conversion is equivalent (in definedness, and if defined in
      meaning) to the corresponding cast expression.  */
   if (parms && TREE_CHAIN (parms) == NULL_TREE)
-    return build_c_cast (type, TREE_VALUE (parms), complain);
+    return cp_build_c_cast (type, TREE_VALUE (parms), complain);
 
   /* [expr.type.conv]
 
Index: cp/parser.c
===================================================================
--- cp/parser.c	(revision 133519)
+++ cp/parser.c	(working copy)
@@ -5880,7 +5880,7 @@ cp_parser_cast_expression (cp_parser *pa
 	    return error_mark_node;
 
 	  /* Perform the cast.  */
-	  expr = build_c_cast (type, expr, tf_warning_or_error);
+	  expr = build_c_cast (type, expr);
 	  return expr;
 	}
     }
Index: objc/objc-act.c
===================================================================
--- objc/objc-act.c	(revision 133518)
+++ objc/objc-act.c	(working copy)
@@ -1255,7 +1255,8 @@ objc_build_component_ref (tree datum, tr
      front-end, but 'finish_class_member_access_expr' seems to be
      a worthy substitute.  */
 #ifdef OBJCPLUS
-  return finish_class_member_access_expr (datum, component, false);
+  return finish_class_member_access_expr (datum, component, false,
+                                          tf_warning_or_error);
 #else
   return build_component_ref (datum, component);
 #endif
@@ -4493,7 +4494,7 @@ objc_generate_cxx_ctor_or_dtor (bool dto
 	     (build_special_member_call
 	      (build_ivar_reference (DECL_NAME (ivar)),
 	       dtor ? complete_dtor_identifier : complete_ctor_identifier,
-	       NULL_TREE, type, LOOKUP_NORMAL));
+	       NULL_TREE, type, LOOKUP_NORMAL, tf_warning_or_error));
 	}
     }
 

^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2008-04-03  5:22 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-27 10:12 [C++/Obj-C++ PATCH] Fix Objective-C++ breakage Steven Bosscher
2008-03-27 10:22 ` Paolo Bonzini
2008-03-27 10:23   ` Paolo Bonzini
2008-03-27 16:19 ` Joseph S. Myers
2008-03-27 18:13   ` Mark Mitchell
2008-03-27 22:55     ` Kaveh R. GHAZI
2008-03-27 22:56       ` Andrew Pinski
2008-03-27 22:57       ` Richard Guenther
2008-03-28  4:12         ` Kaveh R. GHAZI
2008-03-28  8:04           ` Kaveh R. GHAZI
2008-03-28  8:04             ` Paolo Bonzini
2008-03-28 12:41               ` Richard Guenther
2008-03-28 12:45                 ` Paolo Bonzini
2008-03-28 13:30                   ` Richard Guenther
2008-03-28 13:36                     ` Andrew Pinski
2008-03-28 13:44                     ` Paolo Bonzini
2008-03-28 13:45                   ` H.J. Lu
2008-03-28 14:12                 ` Jakub Jelinek
2008-03-28 21:28                   ` Ralf Wildenhues
2008-03-30 15:18                 ` Improving parallel build (was: [C++/Obj-C++ PATCH] Fix Objective-C++ breakage) Ralf Wildenhues
2008-03-30 15:27                   ` Ralf Wildenhues
2008-03-31  8:43                     ` Improving parallel build Paolo Bonzini
2008-03-30 18:39                   ` Improving parallel build (was: [C++/Obj-C++ PATCH] Fix Objective-C++ breakage) Richard Guenther
2008-03-30 19:02                   ` Improving parallel build Tom Tromey
2008-03-30 19:35                     ` Ralf Wildenhues
2008-03-30 23:29                       ` Tom Tromey
2008-03-31 19:49                         ` Ralf Wildenhues
2008-03-31 20:35                           ` Tom Tromey
2008-04-01 22:47                           ` Richard Guenther
2008-04-01 22:51                             ` Ralf Wildenhues
2008-04-02 21:12                           ` Ralf Wildenhues
2008-04-03  5:22                             ` Paolo Bonzini
2008-03-27 22:58       ` [C++/Obj-C++ PATCH] Fix Objective-C++ breakage Mark Mitchell
2008-03-27 23:10         ` Richard Guenther
2008-03-27 23:17           ` Richard Guenther
2008-03-27 23:26           ` Andrew Pinski
2008-03-27 23:30           ` Mark Mitchell
2008-03-28  0:41             ` Andrew Pinski
2008-03-28  2:41               ` Mark Mitchell
2008-03-28  3:17                 ` Andrew Pinski
2008-03-28  2:12             ` Richard Guenther
2008-03-27 19:21   ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2008-03-28 13:08 FX Coudert
2008-03-26 20:58 Dominique Dhumieres
2008-03-25 17:58 Doug Gregor
2008-03-26  6:46 ` Andrew Pinski
2008-03-26 13:07   ` Richard Guenther
2008-03-26 13:17     ` NightStrike
2008-03-26 13:41       ` Richard Guenther
2008-03-26 18:21         ` Doug Gregor
2008-03-26 19:57           ` Kaveh R. GHAZI
2008-03-26 15:12   ` Tom Tromey
2008-03-26 20:59   ` Stan Shebs
2008-03-27  7:49     ` Kaveh R. GHAZI
2008-03-26 20:44 ` Stan Shebs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).