===================================================================
@@ -1278,8 +1278,11 @@ validate_constexpr_redeclaration (tree old_decl, t
&& 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 here");
return false;
}
return true;
===================================================================
@@ -3,10 +3,10 @@
template<typename T> constexpr int foo(T);
template<> int foo(int);
-template<> int foo(int); // { dg-error "previous" }
+template<> int foo(int); // { dg-message "previous" }
template<> constexpr int foo(int); // { dg-error "redeclaration" }
template<typename T> int bar(T);
template<> constexpr int bar(int);
-template<> constexpr int bar(int); // { dg-error "previous" }
+template<> constexpr int bar(int); // { dg-message "previous" }
template<> int bar(int); // { dg-error "redeclaration" }