https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115747
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Jason Merrill from comment #4) > I think we want parallel changes for the vec and non-vec cases. Of course, left those out for brevity. > I agree that the diagnostic message needs to be different for C++26, just > that the C++26 diagnostic should also be affected by -Wno-delete-incomplete. So @@ -4114,6 +4114,21 @@ build_vec_delete_1 (location_t loc, tree if (!COMPLETE_TYPE_P (type)) { + if (cxx_dialect > cxx23) + { + if (complain & tf_error) + { + if (warn_delete_incomplete + && permerror (loc, "operator %<delete []%> used on " + "incomplete type")) + { + cxx_incomplete_type_diagnostic (base, type, DK_PERMERROR); + return error_mark_node; + } + } + else + return error_mark_node; + } if (complain & tf_warning) { auto_diagnostic_group d; then? -Wno-delete-incomplete will make it silently accepted except during SFINAE, -fpermissive accepted with a warning? And obviously I'll adjust the testsuite to whatever is chosen.