[libc-commits] [libc] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)
Louis Dionne via libc-commits
libc-commits at lists.llvm.org
Fri Oct 20 10:51:08 PDT 2023
ldionne wrote:
> Are there tests that we actually correctly call the overridden throwing version from the overridden non-throwing version?
Yes, see for example `libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_nothrow.replace.indirect.pass.cpp`.
> Also, I wonder how much we really care about the library being built without exceptions vs allowing the library to be used without exceptions.
We currently support both ways of building the library (`-fexceptions` and `-fno-exceptions`). I don't know how widely used the `-fno-exceptions` variant is used and we could discuss dropping it (and forcing people to always build the library itself with `-fexceptions`), but IMO this should be a separate change. In practice, I suspect that a lot of folks in the embedded world might be building the library with `-fno-exceptions`.
https://github.com/llvm/llvm-project/pull/69498
More information about the libc-commits
mailing list