News for hackers. Stuff that matters.
Re:C++'s `Noexcept` Can (Sometimes) Help (Or Hurt) Performance by dataflow on Monday August 05, 2024 @10:28PM (#41167353)
extern "C" seems related to the other flags, not 'r'?
Re:C++'s `Noexcept` Can (Sometimes) Help (Or Hurt) Performance by terrymah on Monday August 05, 2024 @10:57PM (#41167446)
Well, yeah, things can be related to many things, but throwing extern "C"s was one of the motivations as I recall for 'r'. r is about a compiler optimization where we elide the runtime terminate check if we can statically "prove" a function can never throw. To prove it statically we depend on things like extern "C" functions not throwing, even though users can (and do) totally write that code.