Bootstrap failure with your patch

Gabriel Dos Reis gdr@codesourcery.com
Thu Mar 15 03:15:00 GMT 2001


You're correct:  I regression-tested the patch only on the mainline,
applied it to mainline and branch.

Mark Mitchell <mark@codesourcery.com> writes:

| Gaby, please back out your patch until Zack is done, and then put it
| back in.  

Done.

| ... If you're asleep now, and Zack works quickly, this will be a
| no-op.

Well, it seems time come to go to bed.

| ...  But, as it stands, the 3.0 branch will not build, which is
| bad.

I fully understand.

Sorry for the confusion.

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v
retrieving revision 1.2227.2.39
diff -p -r1.2227.2.39 ChangeLog
*** ChangeLog	2001/03/15 08:16:46	1.2227.2.39
--- ChangeLog	2001/03/15 11:13:00
***************
*** 1,5 ****
--- 1,9 ----
  2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
  
+ 	* except.c: Revert previous patch.
+ 
+ 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
+ 
  	Correct semantics restrictions checking in throw-expression.
  	* except.c (is_admissible_throw_operand): New function.
  	(build_throw): Use it.
Index: except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/except.c,v
retrieving revision 1.120.2.1
diff -p -r1.120.2.1 except.c
*** except.c	2001/03/15 08:16:47	1.120.2.1
--- except.c	2001/03/15 11:13:00
*************** static tree build_eh_type_type_ref PARAM
*** 53,59 ****
  static tree build_terminate_handler PARAMS ((void));
  static tree alloc_eh_object PARAMS ((tree));
  static int complete_ptr_ref_or_void_ptr_p PARAMS ((tree, tree));
- static bool is_admissible_throw_operand PARAMS ((tree));
  static int can_convert_eh PARAMS ((tree, tree));
  static void check_handlers_1 PARAMS ((tree, tree));
  static void initialize_handler_parm PARAMS ((tree));
--- 53,58 ----
*************** build_throw (e)
*** 1005,1011 ****
    
    if (e != NULL_TREE)
      {
!       if (!is_admissible_throw_operand (e))
          return error_mark_node;
      }
  
--- 1004,1010 ----
    
    if (e != NULL_TREE)
      {
!       if (!complete_ptr_ref_or_void_ptr_p (TREE_TYPE (e), e))
          return error_mark_node;
      }
  
*************** complete_ptr_ref_or_void_ptr_p (type, fr
*** 1046,1083 ****
          return 0;
      }
    return 1;
- }
- 
- /* Return truth-value if EXPRESSION is admissible in throw-expression,
-    i.e. if it is not of incomplete type or a pointer/reference to such
-    a type or of an abstract class type.  */
- 
- static bool
- is_admissible_throw_operand (expr)
-      tree expr;
- {
-   tree type = TREE_TYPE (expr);
- 
-   /* 15.1/4 [...] The type of the throw-expression shall not be an
-             incomplete type, or a pointer or a reference to an incomplete
-             type, other than void*, const void*, volatile void*, or
-             const volatile void*.  Except for these restriction and the
-             restrictions on type matching mentioned in 15.3, the operand
-             of throw is treated exactly as a function argument in a call
-             (5.2.2) or the operand of a return statement.  */
-   if (!complete_ptr_ref_or_void_ptr_p (type, expr))
-     return false;
- 
-   /* 10.4/3 An abstract class shall not be used as a parameter type,
-             as a function return type or as type of an explicit
-             conversion.  */
-   else if (CLASS_TYPE_P (type) && CLASSTYPE_PURE_VIRTUALS (type))
-     {
-       cp_error ("Expression '%E' of abstract class type '%T' cannot be used in throw-expression", expr, type);
-       return false;
-     }
- 
-   return true;
  }
  
  /* Returns nonzero if FN is a declaration of a standard C library
--- 1045,1050 ----



More information about the Gcc-patches mailing list