[Bug c++/98450] New: Inconsistent Wunused-variable warning for std::array
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
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};