aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 59abd15..c86a131 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1281,8 +1281,11 @@ validate_constexpr_redeclaration (tree old_decl, tree new_decl)
&& DECL_TEMPLATE_SPECIALIZATION (new_decl))
return true;
- error ("redeclaration %q+D differs in %<constexpr%>", new_decl);
- error ("from previous declaration %q+D", old_decl);
+ error_at (DECL_SOURCE_LOCATION (new_decl),
+ "redeclaration %qD differs in %<constexpr%> "
+ "from previous declaration", new_decl);
+ inform (DECL_SOURCE_LOCATION (old_decl),
+ "previous declaration %qD", old_decl);
return false;
}
return true;