aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-11-24 15:55:17 -0500
committerJason Merrill <jason@gcc.gnu.org>2009-11-24 15:55:17 -0500
commit3474a3b72bf01781f123dc2423bff037ae398fcd (patch)
tree37f95f59875eedb257ad5cb6223f0535e85c67f0 /gcc/cp
parent032d1b710a0f42d3c6254a728292056b0626b933 (diff)
downloadgcc-3474a3b72bf01781f123dc2423bff037ae398fcd.zip
gcc-3474a3b72bf01781f123dc2423bff037ae398fcd.tar.gz
gcc-3474a3b72bf01781f123dc2423bff037ae398fcd.tar.bz2
pt.c (determine_specialization): Give helpful error about missing "template<>".
* pt.c (determine_specialization): Give helpful error about missing "template<>". From-SVN: r154518
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b40ddb6..ba3bbf2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-24 Jason Merrill <jason@redhat.com>
+
+ * pt.c (determine_specialization): Give helpful error about missing
+ "template<>".
+
2009-11-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/42095
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 2e58ed9..dfe7791 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -1945,6 +1945,10 @@ determine_specialization (tree template_id,
{
error ("template-id %qD for %q+D does not match any template "
"declaration", template_id, decl);
+ if (header_count && header_count != template_count + 1)
+ inform (input_location, "saw %d %<template<>%>, need %d for "
+ "specializing a member function template",
+ header_count, template_count + 1);
return error_mark_node;
}
else if ((templates && TREE_CHAIN (templates))