]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/6179 (EH regression test failure for STLport-4.5.3)
authorJason Merrill <jason@redhat.com>
Sat, 6 Apr 2002 15:59:48 +0000 (10:59 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 6 Apr 2002 15:59:48 +0000 (10:59 -0500)
        PR c++/6179
        * method.c (implicitly_declare_fn): Pass unqualified type to
        synthesize_exception_spec.

From-SVN: r51955

gcc/cp/ChangeLog
gcc/cp/method.c

index d1ac8102f3ece1d953aa2401d984c16d89ad9e15..c30374b026f3258ee6831e24f0101394d029a934 100644 (file)
@@ -1,3 +1,9 @@
+2002-04-06  Jason Merrill  <jason@redhat.com>
+
+       PR c++/6179
+       * method.c (implicitly_declare_fn): Pass unqualified type to 
+       synthesize_exception_spec.
+
 2002-04-03  Jason Merrill  <jason@redhat.com>
 
        PR c++/525
index cef0400d6d0ed0ec7af11c0d1d577c198a10d97a..a1d9b884a6187bc7bacdbf7fcfc5fa0432e6644b 100644 (file)
@@ -795,8 +795,9 @@ synthesize_method (fndecl)
 
 /* Use EXTRACTOR to locate the relevant function called for each base &
    class field of TYPE. CLIENT allows additional information to be passed
-   to EXTRACTOR.  Generates the union of all exceptions generated by
-   those functions.  */
+   to EXTRACTOR.  Generates the union of all exceptions generated by those
+   functions.  Note that we haven't updated TYPE_FIELDS and such of any
+   variants yet, so we need to look at the main one.  */
 
 static tree
 synthesize_exception_spec (type, extractor, client)
@@ -808,7 +809,7 @@ synthesize_exception_spec (type, extractor, client)
   tree fields = TYPE_FIELDS (type);
   int i, n_bases = CLASSTYPE_N_BASECLASSES (type);
   tree binfos = TYPE_BINFO_BASETYPES (type);
-  
+
   for (i = 0; i != n_bases; i++)
     {
       tree base = BINFO_TYPE (TREE_VEC_ELT (binfos, i));
@@ -987,7 +988,7 @@ implicitly_declare_fn (kind, type, const_p)
     case sfk_assignment_operator:
     {
       struct copy_data data;
-      tree argtype;
+      tree argtype = type;
       
       has_parm = 1;
       data.name = NULL;
@@ -1003,10 +1004,10 @@ implicitly_declare_fn (kind, type, const_p)
       if (const_p)
         {
           data.quals = TYPE_QUAL_CONST;
-          type = build_qualified_type (type, TYPE_QUAL_CONST);
+          argtype = build_qualified_type (argtype, TYPE_QUAL_CONST);
         }
     
-      argtype = build_reference_type (type);
+      argtype = build_reference_type (argtype);
       args = build_tree_list (hash_tree_chain (argtype, NULL_TREE),
                              get_identifier ("_ctor_arg"));
       args = tree_cons (NULL_TREE, args, void_list_node);