This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] Change default to -fno-math-errno


On 10/4/18 6:37 AM, Richard Biener wrote:
> On Thu, Oct 4, 2018 at 2:06 PM Joseph Myers <joseph@codesourcery.com> wrote:
>>
>> On Thu, 4 Oct 2018, Richard Biener wrote:
>>
>>> The other issue is that we're treating -fno-math-errno as disabling
>>> errno handling in general (not only for math functions).  That would
>>
>> Also, is it treated as meaning the math functions *do not set errno* (so a
>> load of errno (or of anything that might be errno) before a math function
>> call could be moved after the call)?
> 
> Yes.  That's implicit in math functions becoming CONST.
Right.  But I think this highlights the other issue here.  Namely that
if the user's code does read errno, we don't know if the intent was to
read errno from some other call before the math bits or the most recent
math call.

So again, as much as I'd like to move to a world where we don't have to
worry about errno for math functions, I'm not comfortable making that
change, though I won't object if someone  with a stronger standards
background says "just do it".

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]