From 36560e9e15a83b068d3a9dd12816a2529086e69a Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 5 Sep 2017 19:52:56 +0000 Subject: [PATCH] class.c (unreverse_member_declarations): Remove extraneous if. * class.c (unreverse_member_declarations): Remove extraneous if. * pt.c (push_template_decl_real): Use string concatenation, not \. Add %<..%>. From-SVN: r251724 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/class.c | 3 +-- gcc/cp/pt.c | 8 ++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 26b51ec3b16..e0743aefa14 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2017-09-05 Nathan Sidwell + + * class.c (unreverse_member_declarations): Remove extraneous if. + * pt.c (push_template_decl_real): Use string concatenation, not + \. Add %<..%>. + 2017-09-05 Paolo Carlini PR c++/81942 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index e5f237cb052..9e740dbbfb7 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -7070,8 +7070,7 @@ unreverse_member_declarations (tree t) if (prev) { DECL_CHAIN (TYPE_FIELDS (t)) = x; - if (prev) - TYPE_FIELDS (t) = prev; + TYPE_FIELDS (t) = prev; } } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index d5ab93985a3..aeb523d5232 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -5572,11 +5572,11 @@ push_template_decl_real (tree decl, bool is_friend) (TI_ARGS (tinfo), TI_ARGS (get_template_info (DECL_TEMPLATE_RESULT (tmpl))))) { - error ("\ -template arguments to %qD do not match original template %qD", - decl, DECL_TEMPLATE_RESULT (tmpl)); + error ("template arguments to %qD do not match original" + "template %qD", decl, DECL_TEMPLATE_RESULT (tmpl)); if (!uses_template_parms (TI_ARGS (tinfo))) - inform (input_location, "use template<> for an explicit specialization"); + inform (input_location, "use %%> for" + " an explicit specialization"); /* Avoid crash in import_export_decl. */ DECL_INTERFACE_KNOWN (decl) = 1; return error_mark_node; -- 2.30.2