[llvm-bugs] [Bug 49972] New: direct initialization fails for aggregate types

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 15 10:12:44 PDT 2021


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

            Bug ID: 49972
           Summary: direct initialization fails for aggregate types
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: cgnitash at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

The following program 

struct { int i; } s(42);

fails to compile, but is valid from C++20 since direct initialization can now
be used to initialize aggregate types.

GCC accepts the program https://godbolt.org/z/axo7bhacY

-- 
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/20210415/31f47db7/attachment.html>


More information about the llvm-bugs mailing list