]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Thu, 1 Sep 2005 11:47:42 +0000 (11:47 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Thu, 1 Sep 2005 11:47:42 +0000 (11:47 +0000)
2005-02-22  Mark Mitchell  <mark@codesourcery.com>
PR c++/20153
* decl2.c (build_anon_union_vars): Add type parameter.
(finish_anon_union): Pass it.

* g++.dg/template/error17.C: New test.

2005-07-28  Mark Mitchell  <mark@codesourcery.com>
PR c++/22545
* call.c (add_builtin_candidate): Adjust for changes in
representation of pointer-to-member types.

* g++.dg/expr/ptrmem7.C: New test.

From-SVN: r103725

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/decl2.c
gcc/testsuite/ChangeLog

index b054e31a7e6ccc5f4f97072d113c71f9e5ca8b1e..e24c72bddd4bdfffafd90cab9c03361bab8f2bf1 100644 (file)
@@ -1,3 +1,17 @@
+2005-09-01  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       Backport:
+
+       2005-02-22  Mark Mitchell  <mark@codesourcery.com>
+       PR c++/20153
+       * decl2.c (build_anon_union_vars): Add type parameter.
+       (finish_anon_union): Pass it.
+
+       2005-07-28  Mark Mitchell  <mark@codesourcery.com>
+       PR c++/22545
+       * call.c (add_builtin_candidate): Adjust for changes in
+       representation of pointer-to-member types.
+
 2005-09-01  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/13377
index 404c2ad12318dfc5d380455dda04d44311436810..067b0450c45400be4e25c245cd4c7f316ff6521e 100644 (file)
@@ -1556,7 +1556,7 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
 
          if (IS_AGGR_TYPE (c1) && DERIVED_FROM_P (c2, c1)
              && (TYPE_PTRMEMFUNC_P (type2)
-                 || is_complete (TREE_TYPE (TREE_TYPE (type2)))))
+                 || is_complete (TYPE_PTRMEM_POINTED_TO_TYPE (type2))))
            break;
        }
       return;
index 09fe5ddea079476ff46fff8bbc4725116e9984ad..0a7155ed470f1790dad5162d9db8666b0f0d58cf 100644 (file)
@@ -64,7 +64,6 @@ typedef struct priority_info_s {
 static void mark_vtable_entries (tree);
 static void grok_function_init (tree, tree);
 static bool maybe_emit_vtables (tree);
-static tree build_anon_union_vars (tree);
 static bool acceptable_java_type (tree);
 static tree start_objects (int, int);
 static void finish_objects (int, int, tree);
@@ -1131,14 +1130,13 @@ defer_fn (tree fn)
   VARRAY_PUSH_TREE (deferred_fns, fn);
 }
 
-/* Walks through the namespace- or function-scope anonymous union OBJECT,
-   building appropriate ALIAS_DECLs.  Returns one of the fields for use in
-   the mangled name.  */
+/* Walks through the namespace- or function-scope anonymous union
+   OBJECT, with the indicated TYPE, building appropriate ALIAS_DECLs.
+   Returns one of the fields for use in the mangled name.  */
 
 static tree
-build_anon_union_vars (tree object)
+build_anon_union_vars (tree type, tree object)
 {
-  tree type = TREE_TYPE (object);
   tree main_decl = NULL_TREE;
   tree field;
 
@@ -1185,7 +1183,7 @@ build_anon_union_vars (tree object)
          decl = pushdecl (decl);
        }
       else if (ANON_AGGR_TYPE_P (TREE_TYPE (field)))
-       decl = build_anon_union_vars (ref);
+       decl = build_anon_union_vars (TREE_TYPE (field), ref);
       else
        decl = 0;
 
@@ -1225,7 +1223,7 @@ finish_anon_union (tree anon_union_decl)
       return;
     }
 
-  main_decl = build_anon_union_vars (anon_union_decl);
+  main_decl = build_anon_union_vars (type, anon_union_decl);
   if (main_decl == NULL_TREE)
     {
       warning ("anonymous union with no members");
index 81e6c9a0c4399b3306d9e322877287d3d71d0b05..e4356b2faa962028caf0d2ee1ea49cc701862b1b 100644 (file)
@@ -1,3 +1,15 @@
+2005-09-01  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       Backport:
+
+       2005-02-22  Mark Mitchell  <mark@codesourcery.com>
+       PR c++/20153
+       * g++.dg/template/error17.C: New test.
+
+       2005-07-28  Mark Mitchell  <mark@codesourcery.com>
+       PR c++/22545
+       * g++.dg/expr/ptrmem7.C: New test.
+
 2005-09-01  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/13377