]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cvt.c (cp_convert_to_pointer): Don't call error_at if complain & tf_error is false.
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 12 May 2014 15:33:35 +0000 (15:33 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 12 May 2014 15:33:35 +0000 (15:33 +0000)
2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

* 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

gcc/cp/ChangeLog
gcc/cp/cvt.c
gcc/cp/decl.c

index 5ddf555923da1ee278ffac661bdeb6d42ab151b4..a9aa6139644c599ba263f1c3e2d8ca66ef1f48f7 100644 (file)
@@ -1,3 +1,11 @@
+2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * 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  <momchil.velikov@gmail.com>
 
        PR c++/60463
index c833722538e5ae5552a2386989ac5fd3be2bbff7..9b066b9f80666fd67c4e2f667658bf92ec162748 100644 (file)
@@ -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;
     }
 
index 01a36252b2edf992ebd160e21656954ffb808707..51df30cfcc08950cb405955c573b1bc08522c4aa 100644 (file)
@@ -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;
        }