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]

(C++) small patches


Applied.

1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>

	* typeck.c (convert_arguments): Don't handle pmf references 
	specially.

	* init.c (build_member_call): Don't try to convert to the base type
	if it's ambiguous or if pedantic.

	* typeck2.c (check_for_new_type): Don't depend on pedantic.

Index: init.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/init.c,v
retrieving revision 1.72
diff -c -p -r1.72 init.c
*** init.c	1998/10/23 14:53:07	1.72
--- init.c	1998/10/26 08:45:48
*************** build_member_call (type, name, parmlist)
*** 1418,1424 ****
  
    /* Convert 'this' to the specified type to disambiguate conversion
       to the function's context.  */
!   if (decl == current_class_ref)
      {
        tree olddecl = current_class_ptr;
        tree oldtype = TREE_TYPE (TREE_TYPE (olddecl));
--- 1418,1426 ----
  
    /* Convert 'this' to the specified type to disambiguate conversion
       to the function's context.  */
!   if (decl == current_class_ref
!       && ! pedantic
!       && ACCESSIBLY_UNIQUELY_DERIVED_P (type, current_class_type))
      {
        tree olddecl = current_class_ptr;
        tree oldtype = TREE_TYPE (TREE_TYPE (olddecl));
Index: typeck.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/typeck.c,v
retrieving revision 1.119
diff -c -p -r1.119 typeck.c
*** typeck.c	1998/10/23 14:53:28	1.119
--- typeck.c	1998/10/26 08:43:56
*************** convert_arguments (typelist, values, fnd
*** 3063,3074 ****
  	    error ("insufficient type information in parameter list");
  	  val = integer_zero_node;
  	}
-       else if (TREE_CODE (val) == OFFSET_REF
- 	    && TREE_CODE (TREE_TYPE (val)) == METHOD_TYPE)
- 	{
- 	  /* This is unclean.  Should be handled elsewhere.  */
- 	  val = build_unary_op (ADDR_EXPR, val, 0);
- 	}
        else if (TREE_CODE (val) == OFFSET_REF)
  	val = resolve_offset_ref (val);
  
--- 3063,3068 ----
Index: typeck2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/typeck2.c,v
retrieving revision 1.34
diff -c -p -r1.34 typeck2.c
*** typeck2.c	1998/10/19 20:08:23	1.34
--- typeck2.c	1998/10/26 08:43:56
*************** check_for_new_type (string, inptree)
*** 1659,1664 ****
       char *string;
       flagged_type_tree inptree;
  {
!   if (pedantic && inptree.new_type_flag)
      pedwarn ("ANSI C++ forbids defining types within %s",string);
  }
--- 1659,1664 ----
       char *string;
       flagged_type_tree inptree;
  {
!   if (inptree.new_type_flag)
      pedwarn ("ANSI C++ forbids defining types within %s",string);
  }


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