On Fri, Oct 01, 2021 at 04:11:08PM -0400, Marek Polacek via Gcc-patches wrote:
> + auto_diagnostic_group d;
> + if (warning_at (location, OPT_Warray_compare,
> + "comparison between two arrays%s",
> + (c_dialect_cxx () && cxx_dialect >= cxx20)
> + ? " is
This patch addresses one of my leftovers from GCC 11. C++20 introduced
[depr.array.comp]: "Equality and relational comparisons between two operands
of array type are deprecated." so this patch adds -Warray-compare. Since the
code in question is dubious (the comparison doesn't actually compare the