[llvm-bugs] [Bug 49883] New: missing-braces warning for empty aggregates inhering from aggregates
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 7 07:48:42 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49883
Bug ID: 49883
Summary: missing-braces warning for empty aggregates inhering
from aggregates
Product: clang
Version: 11.0
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: mail at hanicka.net
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
I'm creating a tagged array by inheriting from std::array, and I'm getting
warning missing-braces:
https://compiler-explorer.com/z/Eshjs8Eaz
```
#include <array>
#include <type_traits>
struct tagged_array: std::array<int, 4> { };
static_assert(std::is_aggregate_v<tagged_array>);
void foo() {
[[maybe_unused]] tagged_array t{1,2,3,4};
}
```
GCC and MSVC are fine without any warning here.
--
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/20210407/e0d88de4/attachment-0001.html>
More information about the llvm-bugs
mailing list