[Bug c++/93668] constexpr delete[]
euloanty at live dot com
gcc-bugzilla@gcc.gnu.org
Tue Feb 11 19:42:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668
--- Comment #7 from fdlbxtqi <euloanty at live dot com> ---
I mean it is a bug.
constexpr int f()
{
auto p(new int[10000]);
delete p;
return 4;
}
int main()
{
constexpr auto w(f());
}
I mean this is UB so it should not compile. However, it compiles on the latest
GCC.
Not detecting this is a series of security vulnerabilities if people using it
at runtime.
More information about the Gcc-bugs
mailing list