Commit 3474a3b7 by Jason Merrill Committed by Jason Merrill

pt.c (determine_specialization): Give helpful error about missing "template<>".

	* pt.c (determine_specialization): Give helpful error about missing
	"template<>".

From-SVN: r154518
parent 032d1b71
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
......
......@@ -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))
......
2009-11-23 Jason Merrill <jason@redhat.com>
* g++.dg/template/spec15.C: Check for helpful message.
2009-11-24 Janis Johnson <janis187@us.ibm.com>
* gcc.target/powerpc/altivec-32.c: Don't use -m64.
......
......@@ -19,6 +19,7 @@ struct A<float> {
};
template <> void A<int>::f (int); // { dg-error "" }
// { dg-message "need 2" "" { target *-*-* } 21 }
template <> template <> void A<int>::f (int);
template <> void A<int>::f2 (int);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment