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: Implement C11 _Atomic


On Thu, 7 Nov 2013, Uros Bizjak wrote:

> Please note that following code form fenv.c won't generate overflow
> exception on x87:
> 
>   if (excepts & FP_EX_OVERFLOW)
>     {
>       volatile float max = __FLT_MAX__;
>       r = max * max;
>     }

r being volatile is intended to ensure that the result does get stored 
back to memory, and so in particular that a result computed with excess 
precision gets converted back to float and the exception is raised.

-- 
Joseph S. Myers
joseph@codesourcery.com


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