Re: [PATCH v3] c++: warn on undefined casts from Base to Derived ref/ptr [PR96765]

2022-03-29 Thread Jason Merrill via Gcc-patches
On 3/27/22 08:37, Zhao Wei Liew wrote: On Fri, 25 Mar 2022 at 05:58, Jason Merrill wrote: + if (current_function_decl + && (DECL_CONSTRUCTOR_P (current_function_decl) + || DECL_DESTRUCTOR_P (current_function_decl)) + && TREE_CODE (expr) == NOP_EXPR +

Re: [PATCH v3] c++: warn on undefined casts from Base to Derived ref/ptr [PR96765]

2022-03-27 Thread Zhao Wei Liew via Gcc-patches
On Fri, 25 Mar 2022 at 05:58, Jason Merrill wrote: > > > >>> + if (current_function_decl > >>> + && (DECL_CONSTRUCTOR_P (current_function_decl) > >>> + || DECL_DESTRUCTOR_P (current_function_decl)) > >>> + && TREE_CODE (expr) == NOP_EXPR > >>> + && is_t