34 | @@ -35,7 +35,7 @@
35 | #include <QSettings>
36 | #include <QTextDocument>
37 |
38 | -static const std::array<int, 9> confTargets = { {2, 4, 6, 12, 24, 48, 144, 504, 1008} };
39 | +static constexpr std::array confTargets{2, 4, 6, 12, 24, 48, 144, 504, 1008};
Removing a pair of {} causes Clang 5 to fire a false warning:
qt/sendcoinsdialog.cpp:38:41: warning: suggest braces around initialization of subobject [-Wmissing-braces]
static constexpr std::array confTargets{2, 4, 6, 12, 24, 48, 144, 504, 1008};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{ }
1 warning generated.
But this is not the only place in the code base :)
Details: https://reviews.llvm.org/rL314838
Indeed, this is not the only place. And generally, we don't maim our code to accommodate archaic and broken compilers.
Not related to this PR, but we use Clang 5 in CI with --enable-werror now.
The only reason why CI passes is #18092.
And generally, we don't maim our code to accommodate archaic and broken compilers.
But we do accommodate our build system :)
Yes, the build system can disable werror for clang-5, if werror for clang-5 is broken
Yes, the build system can disable werror for clang-5, if werror for clang-5 is broken
#20544 it its recent reincarnation.