summaryrefslogtreecommitdiff
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 80fadead0f7..bef31416fb7 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -6315,7 +6315,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;
}