From: Paolo Carlini Date: Mon, 12 May 2014 15:33:35 +0000 (+0000) Subject: cvt.c (cp_convert_to_pointer): Don't call error_at if complain & tf_error is false. X-Git-Tag: releases/gcc-5.1.0~7643 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc51de9cf8fa724cb2acb81ea6d6504ac2ebbd8d;p=thirdparty%2Fgcc.git cvt.c (cp_convert_to_pointer): Don't call error_at if complain & tf_error is false. 2014-05-12 Paolo Carlini * cvt.c (cp_convert_to_pointer): Don't call error_at if complain & tf_error is false. * decl.c (make_unbound_class_template): Prefer inform for "declared here"-type message. From-SVN: r210326 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5ddf555923da..a9aa6139644c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2014-05-12 Paolo Carlini + + * cvt.c (cp_convert_to_pointer): Don't call error_at if + complain & tf_error is false. + + * decl.c (make_unbound_class_template): Prefer inform for + "declared here"-type message. + 2014-05-09 Momchil Velikov PR c++/60463 diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index c833722538e5..9b066b9f8066 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -198,8 +198,9 @@ cp_convert_to_pointer (tree type, tree expr, tsubst_flags_t complain) complain); } } - error_at (loc, "cannot convert %qE from type %qT to type %qT", - expr, intype, type); + if (complain & tf_error) + error_at (loc, "cannot convert %qE from type %qT to type %qT", + expr, intype, type); return error_mark_node; } diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 01a36252b2ed..51df30cfcc08 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3490,8 +3490,9 @@ make_unbound_class_template (tree context, tree name, tree parm_list, { if (complain & tf_error) { - error ("template parameters do not match template"); - error ("%q+D declared here", tmpl); + error ("template parameters do not match template %qD", tmpl); + inform (DECL_SOURCE_LOCATION (tmpl), + "%qD declared here", tmpl); } return error_mark_node; }