Re: [PATCH] c++: Diagnose constexpr delete [] new int; and delete new int[N]; [PR95808]

2020-10-29 Thread Jason Merrill via Gcc-patches
On 10/16/20 5:42 AM, Jakub Jelinek wrote: Hi! This patch diagnoses delete [] new int; and delete new int[1]; in constexpr contexts by remembering IDENTIFIER_OVL_OP_FLAGS (DECL_NAME (fun)) & OVL_OP_FLAG_VEC from the operator new and checking it at operator delete time. Bootstrapped/regtested on

[PATCH] c++: Diagnose constexpr delete [] new int; and delete new int[N]; [PR95808]

2020-10-16 Thread Jakub Jelinek via Gcc-patches
Hi! This patch diagnoses delete [] new int; and delete new int[1]; in constexpr contexts by remembering IDENTIFIER_OVL_OP_FLAGS (DECL_NAME (fun)) & OVL_OP_FLAG_VEC from the operator new and checking it at operator delete time. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?