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]
Other format: [Raw text]

[C++ PATCH for 3.3] Backport of fix for PR/2294


Hello,

I was going to commit the final patch for PR/2294 to the 3.3 branch (already
approved by Gaby here http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00667.html),
after having retested it with today's CVS. I was wondering if the ChangeLog
should quote exactly the ChangeLog on mainline, or it should be updated to
reflect e.g. the different file the patch operates on (decl.c instead of
name-lookup.c). I went for the latter, but I'm waiting for a confirmation
before committing.

Thanks
Giovanni Bajo



2003-12-27  Giovanni Bajo  <giovannibajo@gcc.gnu.org>

        Backport from mainline.

        2003-12-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>

        PR c++/2294
        * decl.c (push_overloaded_decl): always construct an OVERLOAD
        if the declaration comes from an using declaration.


2003-12-27  Giovanni Bajo  <giovannibajo@gcc.gnu.org>

        Backport from mainline.

        2003-11-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>

        PR c++/2294
        * g++.dg/lookup/using9.c: New test.

Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.965.2.64
diff -c -3 -p -r1.965.2.64 decl.c
*** decl.c      16 Oct 2003 09:33:52 -0000      1.965.2.64
--- decl.c      26 Dec 2003 23:34:35 -0000
*************** push_overloaded_decl (decl, flags)
*** 4919,4925 ****
        }
      }

!   if (old || TREE_CODE (decl) == TEMPLATE_DECL)
      {
        if (old && TREE_CODE (old) != OVERLOAD)
        new_binding = ovl_cons (decl, ovl_cons (old, NULL_TREE));
--- 4919,4929 ----
        }
      }

!   if (old || TREE_CODE (decl) == TEMPLATE_DECL
!       /* If it's a using declaration, we always need to build an OVERLOAD,
!        because it's the only way to remember that the declaration comes
!        from 'using', and have the lookup behave correctly.  */
!       || (flags & PUSH_USING))
      {
        if (old && TREE_CODE (old) != OVERLOAD)
        new_binding = ovl_cons (decl, ovl_cons (old, NULL_TREE));



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