This is the mail archive of the gcc-bugs@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]

[Bug c++/71140] New: [concepts] ill-formed nested-requirement lacking a semicolon not rejected


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71140

            Bug ID: 71140
           Summary: [concepts] ill-formed nested-requirement lacking a
                    semicolon not rejected
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tom at honermann dot net
                CC: andrew.n.sutton at gmail dot com, asutton at gcc dot gnu.org
  Target Milestone: ---

The following ill-formed code is not rejected by gcc r236238.  According to the
Concepts TS Â 5.1.4.4, the nested-requirement must include a terminating
semicolon.

$ cat a.cpp
template<typename T>
concept bool C = requires(T t) {
    requires true
};  // expected error: expected â;â before â}â token
static_assert(C<int>);

$ svn info
Path: .
Working Copy Root Path: /home/tom/src/gcc-trunk
URL: svn://gcc.gnu.org/svn/gcc/trunk
Relative URL: ^/trunk
Repository Root: svn://gcc.gnu.org/svn/gcc
Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4
Revision: 236239
Node Kind: directory
Schedule: normal
Last Changed Author: uros
Last Changed Rev: 236238
Last Changed Date: 2016-05-14 05:07:13 -0400 (Sat, 14 May 2016)

$ g++ --version
g++ (GCC) 7.0.0 20160514 (experimental)
...

$ g++ -c -std=c++1z -fconcepts a.cpp; echo $?
0

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