OSDN Git Service

2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Sep 2008 17:57:24 +0000 (17:57 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Sep 2008 17:57:24 +0000 (17:57 +0000)
PR c++/37450
* name-lookup.c (pushdecl_maybe_friend): Don't return the old
parameter for duplicate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140425 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/name-lookup.c

index adad8cc..502c650 100644 (file)
@@ -1,3 +1,9 @@
+2008-09-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR c++/37450
+       * name-lookup.c (pushdecl_maybe_friend): Don't return the old
+       parameter for duplicate.
+
 2008-09-17  Jason Merrill  <jason@redhat.com>
 
        PR c++/37588
index a7c5be4..946b321 100644 (file)
@@ -720,8 +720,9 @@ pushdecl_maybe_friend (tree x, bool is_friend)
          else if (TREE_CODE (t) == PARM_DECL)
            {
              /* Check for duplicate params.  */
-             if (duplicate_decls (x, t, is_friend))
-               POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t);
+             tree d = duplicate_decls (x, t, is_friend);
+             if (d)
+               POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, d);
            }
          else if ((DECL_EXTERN_C_FUNCTION_P (x)
                    || DECL_FUNCTION_TEMPLATE_P (x))