re PR c++/16334 (No warning about use of overloading extension)
authorJason Merrill <jason@redhat.com>
Wed, 7 Jul 2004 21:16:57 +0000 (17:16 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 7 Jul 2004 21:16:57 +0000 (17:16 -0400)
        PR c++/16334
        * call.c (build_new_op): Give overload warnings for built-in
        candidates.

From-SVN: r84229

gcc/cp/ChangeLog
gcc/cp/call.c

index 851cd265f63f2d91f8ab2fc7c67dbef33ae7fc82..d575410729e7b438902610f13ca933c55b2f4e9b 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-07  Jason Merrill  <jason@redhat.com>
+
+       PR c++/16334
+       * call.c (build_new_op): Give overload warnings for built-in
+       candidates.
+
 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR c++/16276
index b6983868caec2641b7d572969e449f04aacd810f..af8bb88d6559ecdad16d12205333fab46cc22c0a 100644 (file)
@@ -3769,6 +3769,14 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
        }
       else
        {
+         /* Give any warnings we noticed during overload resolution.  */
+         if (cand->warnings)
+           {
+             struct candidate_warning *w;
+             for (w = cand->warnings; w; w = w->next)
+               joust (cand, w->loser, 1);
+           }
+
          /* Check for comparison of different enum types.  */
          switch (code)
            {