aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2004-07-07 17:16:57 -0400
committerJason Merrill <jason@gcc.gnu.org>2004-07-07 17:16:57 -0400
commit4fe2a1a7bceeb0a0ff1b3c81a0d964ddc24850e1 (patch)
tree2484b4dc1f4712c7a70b3ee7767776cf29def46b
parent051822f61fefadbfa6dd2d2d80fcb394ad97f937 (diff)
downloadgcc-4fe2a1a7bceeb0a0ff1b3c81a0d964ddc24850e1.zip
gcc-4fe2a1a7bceeb0a0ff1b3c81a0d964ddc24850e1.tar.gz
gcc-4fe2a1a7bceeb0a0ff1b3c81a0d964ddc24850e1.tar.bz2
re PR c++/16334 (No warning about use of overloading extension)
PR c++/16334 * call.c (build_new_op): Give overload warnings for built-in candidates. From-SVN: r84229
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/call.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 851cd26..d575410 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index b698386..af8bb88 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -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)
{