aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.cc')
-rw-r--r--gcc/cp/pt.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index c415db3..6c581fe0 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -6377,7 +6377,10 @@ redeclare_class_template (tree type, tree parms, tree cons)
{
auto_diagnostic_group d;
error ("template parameter %q+#D", tmpl_parm);
- inform (DECL_SOURCE_LOCATION (parm), "redeclared here as %q#D", parm);
+ if (DECL_P (parm))
+ inform (DECL_SOURCE_LOCATION (parm), "redeclared here as %q#D", parm);
+ else
+ inform (input_location, "redeclared here");
return false;
}