https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117639

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #1)
> Does std::log need to set errno?

Yes, it's the same log function as in C.

So log((unsigned)0) sets ERANGE and log ((signed)-1) sets EDOM. But I would
expect the compiler to notice that neither case is possible here, and that i >
0 for every std::log(i) call here. So errno will never be set here.

Reply via email to