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

maic23 at live dot de gcc-bugzilla@gcc.gnu.org
Mon Dec 28 16:12:47 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98450

--- Comment #1 from maic <maic23 at live dot de> ---
As a temporary workaround to suppress the erroneous warning, `auto` can be
used:

$ cat /tmp/c.cpp
#include <array>
static constexpr auto bay = std::array{9};
static constexpr std::array<int, 1> bax{9};


More information about the Gcc-bugs mailing list