malloc.h: declare the allocation functions _NOTHROW #4
Loading…
Reference in a new issue
No description provided.
Delete branch "malloc-nothrow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In C++ with clang,
<malloc.h>and<stdlib.h>(or libc++'s<cstdlib>) declare malloc, calloc, realloc, free and their_rvariants with different exception specifications, so including both fails withexception specification in declaration does not match previous declaration.stdlib.halready uses_NOTHROW;malloc.hnow does too.Checked with the clean-install toolchain headers: a C++20 file including malloc.h, stdlib.h and in either order, and a C file, compile with 0 errors. Found building RiptOPL, whose atlas.cpp includes malloc.h.
🤖 Generated with Claude Code