This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Implement C11 _Atomic
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Andrew MacLeod <amacleod at redhat dot com>, Mike Stump <mikestump at comcast dot net>, <stanshebs at earthlink dot net>, Jason Merrill <jason at redhat dot com>, Richard Henderson <rth at redhat dot com>, "jh at suse dot cz" <jh at suse dot cz>
- Date: Thu, 7 Nov 2013 18:26:47 +0000
- Subject: Re: Implement C11 _Atomic
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1311052316480 dot 30260 at digraph dot polyomino dot org dot uk> <20131107164555 dot GI27813 at tucnak dot zalov dot cz> <CAFULd4bpn+rO=_i+CHAgjGF4i=hpf-6E-MHCTNFG-OQ09XHFAQ at mail dot gmail dot com>
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