[c++-concepts] Diagnostics patch

2013-10-30 Thread Andrew Sutton
Applying a patch from Ville that adds diagnostics for the concept specifier. Thanks Ville! 2013-10-30 Ville Voutilainen * gcc/cp/decl.c (grokdeclarator): Reject concept keyword in typedefs, function parameters, data members, non-static member functions and variables. All

Re: [c++-concepts]: Diagnostics

2013-06-27 Thread Jason Merrill
On 06/21/2013 10:59 AM, Andrew Sutton wrote: + sorry ("cannot diagnose disjunctions just yet"); Use diagnose_other for the time being? + /* Langhook for print_error_function. */ void cxx_print_error_function (diagnostic_context *context, const char *file, @@ -3326,7 +3331,7 @@ cp_pri

Re: [c++-concepts]: Diagnostics

2013-06-21 Thread Gabriel Dos Reis
Andrew Sutton writes: | Shoot. Forgot to attach the patch... |reinit_cxx_pp (); | - dump_template_decl (TREE_PURPOSE (p), flags); | + if (decl) | +{ | + dump_template_decl (decl, flags); |pp_cxx_whitespace (cxx_pp); | +} Watch out for indentation. Otherwise, OK to apply.

Re: [c++-concepts]: Diagnostics

2013-06-21 Thread Andrew Sutton
Shoot. Forgot to attach the patch... Andrew On Fri, Jun 21, 2013 at 10:17 AM, Gabriel Dos Reis wrote: > Andrew Sutton writes: > > | Changes are pushed in git branch asutton/c++-concepts. The Changelog > | is below > > Andrew, please can you send me a diff? When reading emails, it really is > m

Re: [c++-concepts]: Diagnostics

2013-06-21 Thread Gabriel Dos Reis
Andrew Sutton writes: | Changes are pushed in git branch asutton/c++-concepts. The Changelog | is below Andrew, please can you send me a diff? When reading emails, it really is much easier for me that way. Thanks, -- Gaby

[c++-concepts]: Diagnostics

2013-06-21 Thread Andrew Sutton
Initial pass on diagnostics for constraints. The general approach is to recurse through a requirement expression searching for constraints that have failed, generating as precise a message as possible. Admittedly, these will require some polishing (indentation, messages, formatting, choosing a rea