Commit 36560e9e by Nathan Sidwell Committed by Nathan Sidwell

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
	\<newline>.  Add %<..%>.

From-SVN: r251724
parent 55b2ce1c
2017-09-05 Nathan Sidwell <nathan@acm.org>
* class.c (unreverse_member_declarations): Remove extraneous if.
* pt.c (push_template_decl_real): Use string concatenation, not
\<newline>. Add %<..%>.
2017-09-05 Paolo Carlini <paolo.carlini@oracle.com> 2017-09-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/81942 PR c++/81942
......
...@@ -7070,8 +7070,7 @@ unreverse_member_declarations (tree t) ...@@ -7070,8 +7070,7 @@ unreverse_member_declarations (tree t)
if (prev) if (prev)
{ {
DECL_CHAIN (TYPE_FIELDS (t)) = x; DECL_CHAIN (TYPE_FIELDS (t)) = x;
if (prev) TYPE_FIELDS (t) = prev;
TYPE_FIELDS (t) = prev;
} }
} }
......
...@@ -5572,11 +5572,11 @@ push_template_decl_real (tree decl, bool is_friend) ...@@ -5572,11 +5572,11 @@ push_template_decl_real (tree decl, bool is_friend)
(TI_ARGS (tinfo), (TI_ARGS (tinfo),
TI_ARGS (get_template_info (DECL_TEMPLATE_RESULT (tmpl))))) TI_ARGS (get_template_info (DECL_TEMPLATE_RESULT (tmpl)))))
{ {
error ("\ error ("template arguments to %qD do not match original"
template arguments to %qD do not match original template %qD", "template %qD", decl, DECL_TEMPLATE_RESULT (tmpl));
decl, DECL_TEMPLATE_RESULT (tmpl));
if (!uses_template_parms (TI_ARGS (tinfo))) if (!uses_template_parms (TI_ARGS (tinfo)))
inform (input_location, "use template<> for an explicit specialization"); inform (input_location, "use %<template<>%> for"
" an explicit specialization");
/* Avoid crash in import_export_decl. */ /* Avoid crash in import_export_decl. */
DECL_INTERFACE_KNOWN (decl) = 1; DECL_INTERFACE_KNOWN (decl) = 1;
return error_mark_node; return error_mark_node;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment