aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2004-11-14 10:57:00 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2004-11-14 10:57:00 +0000
commite34b09225a117d9ca0b9b21b716dc84a9eb6ac06 (patch)
tree62d661829012d58390f1b6c2612c322e6cd0b699 /gcc/cp
parent18ccc7e0e3c2e597e96e73b85bbe202e13979adb (diff)
downloadgcc-e34b09225a117d9ca0b9b21b716dc84a9eb6ac06.zip
gcc-e34b09225a117d9ca0b9b21b716dc84a9eb6ac06.tar.gz
gcc-e34b09225a117d9ca0b9b21b716dc84a9eb6ac06.tar.bz2
re PR c++/17344 (completely wacky error with matching template template classes and default arguments)
PR c++/17344 * pt.c (coerce_template_parms): Only emit error message about invalid template argument when TF_ERROR. * g++.dg/template/defarg5.C: New test. From-SVN: r90615
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fe51d5b..9ca645a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/17344
+ * pt.c (coerce_template_parms): Only emit error message about
+ invalid template argument when TF_ERROR.
+
2004-11-12 Mark Mitchell <mark@codesourcery.com>
PR c++/18389
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 54c9979..34fd27b 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -4007,7 +4007,10 @@ coerce_template_parms (tree parms,
gcc_assert (arg);
if (arg == error_mark_node)
- error ("template argument %d is invalid", i + 1);
+ {
+ if (complain & tf_error)
+ error ("template argument %d is invalid", i + 1);
+ }
else
arg = convert_template_argument (TREE_VALUE (parm),
arg, new_args, complain, i,