Date: Thu, 17 Jan 2008 17:02:11 +0000 (UTC) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/msun/src math_private.h Message-ID: <200801171702.m0HH2BVf002173@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bde 2008-01-17 17:02:11 UTC
FreeBSD src repository
Modified files:
lib/msun/src math_private.h
Log:
Add a macro STRICT_ASSIGN() to help avoid the compiler bug that
assignments and casts don't clip extra precision, if any. The
implementation is to assign to a temporary volatile variable and read
the result back to assign to the original lvalue.
lib/msun currently 2 different hard-coded hacks to avoid the problem
in just a few places and needs it in a few more places. One variant
uses volatile for the original lvalue. This works but is slower than
necessary. Another temporarily casts the lvalue to volatile. This
broke with gcc-4.2.1 or earlier (gcc now stores to the lvalue but
doesn't load from it).
Revision Changes Path
1.22 +16 -0 src/lib/msun/src/math_private.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801171702.m0HH2BVf002173>
