[PATCH 1/2] difftime can throw exceptions

Paul Eggert eggert@cs.ucla.edu
Tue Jun 4 22:53:05 GMT 2024


On 6/4/24 13:52, Florian Weimer wrote:
> But what I meant: The code that throws from a synchronously invoked
> signal handler would have to be built with -fnon-call-exceptions, so in
> our case, glibc.

Oh, in that case, no I don't know of anybody doing that.

We could document that one cannot build glibc with -fnon-call-exceptions 
(and similarly for -flto and other options you can't build glibc with), 
and then bring back __attribute__ ((pure)) for difftime. But we couldn't 
bring back __attribute__ ((const)) due to rounding mode changes, right?

Not sure it's worth the effort just for the rarely-used difftime, but it 
might be worth it if more commonly-used library calls benefit from these 
attributes.


More information about the Libc-alpha mailing list