MitalAshok wrote: The array-to-pointer conversion *is* necessary, even if it's impractical to use:
https://eel.is/c++draft/expr.delete#1.sentence-5 > Otherwise, it shall be a prvalue of pointer to object type. https://eel.is/c++draft/basic.lval#6 > Whenever a glvalue appears as an operand of an operator that requires a > prvalue for that operand, the lvalue-to-rvalue > ([[conv.lval]](https://eel.is/c++draft/conv.lval)), array-to-pointer > ([[conv.array]](https://eel.is/c++draft/conv.array)), or function-to-pointer > ([[conv.func]](https://eel.is/c++draft/conv.func)) standard conversions are > applied to convert the expression to a prvalue. Deleting an array object will almost always be erroneous, which is why I've added the warning. https://github.com/llvm/llvm-project/pull/92814 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits