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

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #8)
> (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.

The compiler has since r16-1191 (which was PR 120231 ).

Reply via email to