[Bug c++/98450] New: Inconsistent Wunused-variable warning for std::array

2020-12-26 Thread maic23 at live dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98450 Bug ID: 98450 Summary: Inconsistent Wunused-variable warning for std::array Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Compon

[Bug c++/98450] Inconsistent Wunused-variable warning for std::array

2020-12-28 Thread maic23 at live dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98450 --- Comment #1 from maic --- As a temporary workaround to suppress the erroneous warning, `auto` can be used: $ cat /tmp/c.cpp #include static constexpr auto bay = std::array{9}; static constexpr std::array bax{9};