I noticed an 'if (cond)' nested inside an 'if (exact-same-cond)'. Fixed
thusly. Also, pt.c was using '"\<newline>' to deal with a long error
message, and not 5 lines further just having an overly long line. Fixed
by using strinc constant concatenation. I also added a %<...%> around a
fragment that we're elling the user to insert.
applied to trunk.
nathan
--
Nathan Sidwell
2017-09-05 Nathan Sidwell <nat...@acm.org>
* class.c (unreverse_member_declarations): Remove extraneous if.
* pt.c (push_template_decl_real): Use string concatenation, not
\<newline>. Add %<..%>.
Index: class.c
===================================================================
--- class.c (revision 251722)
+++ class.c (working copy)
@@ -7070,8 +7001,7 @@ unreverse_member_declarations (tree t)
if (prev)
{
DECL_CHAIN (TYPE_FIELDS (t)) = x;
- if (prev)
- TYPE_FIELDS (t) = prev;
+ TYPE_FIELDS (t) = prev;
}
}
Index: pt.c
===================================================================
--- pt.c (revision 251722)
+++ pt.c (working copy)
@@ -5572,11 +5572,11 @@ push_template_decl_real (tree decl, bool
(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 %<template<>%> for"
+ " an explicit specialization");
/* Avoid crash in import_export_decl. */
DECL_INTERFACE_KNOWN (decl) = 1;
return error_mark_node;