FYI: New Clang flag "-fnew-infallible" to mark C++ new as "throw()" and "returns_nonnull"
Modi Mo
modimo@fb.com
Tue Aug 3 17:23:16 GMT 2021
Hi all,
I recently committed support for the "-fnew-infallible" flag in Clang (https://reviews.llvm.org/D105225) to improve non-exceptional performance for code that contains exceptions. Having "new" terminate immediately on failure stops upward exception propagation and leads to significantly less landing pads generated. Posting here for visibility and to reduce the chance that a similar feature may manifest under a different flag for GCC.
Thanks,
Modi
More information about the Gcc
mailing list