[c++-concepts] Check function concept definitions

Andrew Sutton andrew.n.sutton@gmail.com
Mon Sep 29 14:55:00 GMT 2014


This fixes an ICE trying to normalize a function concept with multiple
statements. That error will now be diagnosed at the point of
definition.

Jason, do you want to review this before I commit? This is a pretty small patch.

2014-09-01  Andrew Sutton  <andrew.n.sutton@gmail.com>

        Check requirements on function concept definitions.
        * gcc/cp/decl.c (finish_function): Check properties of a function
        concept definition.
        * gcc/cp/constraint.cc (check_function_concept): New. Check
        for deduced return type and multiple statements.
        (normalize_misc): Don't normalize multiple statements.
        (normalize_stmt_list): Removed.
        * gcc/cp/cp-tree.h (check_function_concept): New.
        * gcc/testsuite/g++.dg/concepts/fn-concept1.C: New.

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fn-concept.patch
Type: text/x-patch
Size: 4140 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140929/8d589810/attachment.bin>


More information about the Gcc-patches mailing list