typeck.c (convert_arguments): Don't handle pmf references specially.
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 26 Oct 1998 00:48:20 +0000 (00:48 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 26 Oct 1998 00:48:20 +0000 (19:48 -0500)
* 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.
* typeck2.c (check_for_new_type): Don't depend on pedantic.

From-SVN: r23338

gcc/cp/ChangeLog
gcc/cp/init.c
gcc/cp/typeck.c
gcc/cp/typeck2.c

index 69287e3c6fa80c4a228deb9e7bc091833e164b5b..4a22f1ec2b7114a338ec7e94c8832cfa9daba7b0 100644 (file)
@@ -1,3 +1,13 @@
+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.
+
+       * typeck2.c (check_for_new_type): Don't depend on pedantic.
+
 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
 
        * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
index 82e616f76cdc69a4f55720c148d2d4cfee464c26..3b3ee7f6cc45bd419debf343a115715c0a0e552c 100644 (file)
@@ -1417,8 +1417,11 @@ build_member_call (type, name, parmlist)
   decl = maybe_dummy_object (type, &basetype_path);
 
   /* Convert 'this' to the specified type to disambiguate conversion
-     to the function's context.  */
-  if (decl == current_class_ref)
+     to the function's context.  Apparently Standard C++ says that we
+     shouldn't do this.  */
+  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 254bc394d3def86867f574893f50d73bf7135fbc..5030030af946ac31d1e4015c5d0ae6541bd4699e 100644 (file)
@@ -3063,12 +3063,6 @@ convert_arguments (typelist, values, fndecl, flags)
            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);
 
index 809b89d589ee8d020d46640040f7e655482d8c9a..8fa70c9fb961c3cb6379b195bc40f7834aa46fa1 100644 (file)
@@ -1659,6 +1659,6 @@ check_for_new_type (string, inptree)
      char *string;
      flagged_type_tree inptree;
 {
-  if (pedantic && inptree.new_type_flag)
+  if (inptree.new_type_flag)
     pedwarn ("ANSI C++ forbids defining types within %s",string);
 }