[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-bugs
Subject:    [LLVMbugs] [Bug 21684] New: Ellipsis at end of generic lambda parameter-declaration-clause should be
From:       bugzilla-daemon () llvm ! org
Date:       2014-11-27 15:37:52
Message-ID: bug-21684-206 () http ! llvm ! org/bugs/
[Download RAW message or body]

--1417102673.7043d1.21673
Date: Thu, 27 Nov 2014 09:37:53 -0600
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"

http://llvm.org/bugs/show_bug.cgi?id=21684

            Bug ID: 21684
           Summary: Ellipsis at end of generic lambda
                    parameter-declaration-clause should be parsed as a
                    parameter pack
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs@nondot.org
          Reporter: ed@catmur.co.uk
                CC: llvmbugs@cs.uiuc.edu
    Classification: Unclassified

void f() { [](auto...){}(); }

prog.cc:1:12: error: no matching function for call to object of type '(lambda
at prog.cc:1:12)'
void f() { [](auto...){}(); }
          ^~~~~~~~~~~~~
prog.cc:1:12: note: candidate function template not viable: requires at least 1
argument, but 0 were provided
1 error generated.

According to [dcl.fct]/14 the ellipsis should be parsed as part of the
abstract-declarator; however gcc parses it as part of the
parameter-declaration-clause.

gcc is similarly incorrect; according to
http://www.reddit.com/r/cpp/comments/2nkcvi/generic_lambda_inconsistency/ MSVC
(latest CTP) is correct.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

--1417102673.7043d1.21673
Date: Thu, 27 Nov 2014 09:37:53 -0600
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"

<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Ellipsis at end of generic lambda parameter-declaration-clause \
should be parsed as a parameter pack"  \
href="http://llvm.org/bugs/show_bug.cgi?id=21684">21684</a>  </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Ellipsis at end of generic lambda parameter-declaration-clause should \
be parsed as a parameter pack  </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.5
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++14
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs&#64;nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ed&#64;catmur.co.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs&#64;cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>void f() { [](auto...){}(); }

prog.cc:1:12: error: no matching function for call to object of type '(lambda
at prog.cc:1:12)'
void f() { [](auto...){}(); }
          ^~~~~~~~~~~~~
prog.cc:1:12: note: candidate function template not viable: requires at least 1
argument, but 0 were provided
1 error generated.

According to [dcl.fct]/14 the ellipsis should be parsed as part of the
abstract-declarator; however gcc parses it as part of the
parameter-declaration-clause.

gcc is similarly incorrect; according to
<a href="http://www.reddit.com/r/cpp/comments/2nkcvi/generic_lambda_inconsistency/">http://www.reddit.com/r/cpp/comments/2nkcvi/generic_lambda_inconsistency/</a> \
MSVC (latest CTP) is correct.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>

--1417102673.7043d1.21673--



_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic