[llvm-bugs] [Bug 52210] New: Failure to compile void{}

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 18 11:56:38 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=52210

            Bug ID: 52210
           Summary: Failure to compile void{}
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gabravier at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

void f()
{
    void{};
}

This has been considered valid since
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2351 was accepted
as a DR in 2018, but Clang fails to compile it, with this error:

<source>:3:9: error: illegal initializer type 'void'
    void{};
        ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211018/55fa2343/attachment.html>


More information about the llvm-bugs mailing list