[Bug c++/93668] constexpr delete[]

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/93668] constexpr delete[]

2020-02-11 Thread euloanty at live dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668 --- Comment #7 from fdlbxtqi --- I mean it is a bug. constexpr int f() { auto p(new int[1]); delete p; return 4; } int main() { constexpr auto w(f()); } I mean this is UB so it should not compile. However, i

[Bug c++/93668] constexpr delete[]

2020-02-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668 --- Comment #6 from Jonathan Wakely --- Although "a pointer to a non-array object created by a previous new-expression" does rule out arrays created by an array new-expression.

[Bug c++/93668] constexpr delete[]

2020-02-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668 --- Comment #5 from Jonathan Wakely --- (In reply to Jakub Jelinek from comment #3) > I found http://eel.is/c++draft/expr.delete#2 but for the non-array delete it > talks about previous new-expression, which even the array one is. Although it do

[Bug c++/93668] constexpr delete[]

2020-02-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668 --- Comment #4 from Jonathan Wakely --- I think it's required by http://eel.is/c++draft/new.delete#single-12 and http://eel.is/c++draft/new.delete#array-11 which says you have to use the matching form. delete must be used with new, and delete[] m

[Bug c++/93668] constexpr delete[]

2020-02-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org,

[Bug c++/93668] constexpr delete[]

2020-02-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668 Richard Biener changed: What|Removed |Added Keywords||diagnostic --- Comment #2 from Richard

[Bug c++/93668] constexpr delete[]

2020-02-10 Thread euloanty at live dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668 --- Comment #1 from fdlbxtqi --- constexpr int f() { auto p(new int[1]); delete p; return 4; } int main() { constexpr auto w(f()); }