* [c++-concepts] fixes
@ 2014-07-11 15:08 Andrew Sutton
0 siblings, 0 replies; only message in thread
From: Andrew Sutton @ 2014-07-11 15:08 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
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
[-- Attachment #2: fix.patch --]
[-- Type: text/x-patch, Size: 1254 bytes --]
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);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-11 15:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-11 15:08 [c++-concepts] fixes Andrew Sutton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).