|
Message-ID: <YYbL/2nQje5Cj7pk@wirbelwind.zhasha.com> Date: Sat, 6 Nov 2021 19:39:59 +0100 From: Joakim Sindholt <opensource@...sha.com> To: musl@...ts.openwall.com Subject: Re: add noexcept to all functions please On Sat, Nov 06, 2021 at 06:28:31PM +0000, Jon Chesterfield wrote: > That's a compiler bug, surely. A C function that takes no callbacks is not > going to throw. I don't think the compiler can prove that. As far as I know the extern "C" {} that C headers get wrapped in for C++ just means the compiler doesn't type-mangle function names. The function itself can not only throw by itself but it can also call other functions that throw as part of its implementation. If there's a compiler bug here it would have to be that it discards knowledge about C standard functions that can indeed not throw. I don't know if that's the case here, or if it's just nonstandard functions that are affected. FWIW I don't think musl should tag any functions with anything just to make C++ marginally faster. This seems like a case of C++ getting hoisted by its own petard.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.