https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111493
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:40d2dec34b58c3c31b1c731049a914204ec252c3 commit r13-7837-g40d2dec34b58c3c31b1c731049a914204ec252c3 Author: Patrick Palka <ppa...@redhat.com> Date: Fri Sep 22 06:27:48 2023 -0400 c++: missing SFINAE in grok_array_decl [PR111493] We should guard both the diagnostic and backward compatibilty fallback code with tf_error, so that in a SFINAE context we don't issue any diagnostics and correctly treat ill-formed C++23 multidimensional subscript operator expressions as such. PR c++/111493 gcc/cp/ChangeLog: * decl2.cc (grok_array_decl): Guard diagnostic and backward compatibility fallback code paths with tf_error. gcc/testsuite/ChangeLog: * g++.dg/cpp23/subscript15.C: New test. (cherry picked from commit 1fea14def849dd38b098b0e2d54e64801f9c1f43)