So maybe my intention in first email was not clear w.r.t.:void foo(int a[2]);I want only sized arrays to be deprecated.void foo(int a[2]); // deprecatedvoid foo(int *a[2]); // deprecatedvoid foo(int *a[]); // not deprecatedvoid foo(int &a[2]); // not deprecatedvoid foo(int && a[2]); // not deprecatedpt., 13 mar 2020 o 00:59 Maciej Cencora <m.cencora@gmail.com> napisał(a):As you already figured out, array == array comparison is already deprecated in C++20.I admit I didn't think of your third case (which I agree that should be deprecated as well).In this context char *argv[] is a completely different beast compared to int a[2].The construct 'char *argv[]' would not be affected buy the deprecation, because the size of nested array is not provided, so it can rightfully apply to array of any size.pt., 13 mar 2020 o 00:48 Arthur O'Dwyer <arthur.j.odwyer@gmail.com> napisał(a):On Thu, Mar 12, 2020 at 5:40 PM Maciej Cencora via Std-Proposals <std-proposals@lists.isocpp.org> wrote:I propose to deprecate in C++23:1) mixed pointer and array comparisons:int a[2]; int b[2];a == &b[0];Okay... but why "mixed"? Why not just deprecate all relational/equality operators where either side (or both) is an array?bool one(const char *p) { return p == "hello"; } // definitely a bugbool two(int x, int y) { int a[2] = {x,y}; int b[2] = {3,4}; return (a == b); } // definitely a bugconst char *three(const char *p) { static const char arr[] = "hello"; return (p == arr) ? nullptr : arr; } // not a bug, but perhaps expendable if its sacrifice buys us something goodGCC, Clang, and MSVC all warn on `one`.Clang warns twice on `two`, even going so far as to claim that comparison between two arrays is already deprecated(!).Nobody warns on `three`.2) array decl in func parameters:void foo(int a[2]);Sadly, you can't do this. It's true that nobody should ever write what you have there; but there's simply too much code out there of the formint main(int argc, char *argv[])to ever permit a general deprecation of the notation.Vendors could certainly start warning on it, though.Does clang-tidy support a check for "misleading array syntax in parameter declaration"?–Arthur