This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[c++-concepts] fixes


Fix a couple of issues causing a test regression and boostrap build errors.

2014-07-11  Andrew Sutton  <andrew.n.sutton@gmail.com>
        * gcc/cp/typeck.c (cp_build_function_call_vec): Emit diagnostic
        at the input location.
        * gcc/cp/error.c (dump_template_decl): Constraints are never invalid
        in this way. Also fixes brace warning.

Andrew Sutton
Index: gcc/cp/typeck.c
===================================================================
--- gcc/cp/typeck.c	(revision 212456)
+++ gcc/cp/typeck.c	(working copy)
@@ -3463,8 +3463,8 @@ cp_build_function_call_vec (tree functio
         if (tree ci = get_constraints (function))
           if (!check_constraints (ci))
             {
+              error ("cannot call function %qD", function);
               location_t loc = DECL_SOURCE_LOCATION (function);
-              error_at (loc, "cannot call function %qD", function);
               diagnose_constraints (loc, function, NULL_TREE);
               return error_mark_node;
             }
Index: gcc/cp/error.c
===================================================================
--- gcc/cp/error.c	(revision 212456)
+++ gcc/cp/error.c	(working copy)
@@ -1280,10 +1280,7 @@ dump_template_decl (cxx_pretty_printer *
 
           if (flag_concepts)
             if (tree ci = get_constraints (t))
-                if (ci != error_mark_node)
-                  pp_cxx_requires_clause (pp, CI_LEADING_REQS (ci));
-                else
-                  pp_cxx_ws_string (pp, "<invalid-constraints>");
+              pp_cxx_requires_clause (pp, CI_LEADING_REQS (ci));
 
 	  pp_cxx_whitespace (pp);
 	}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]