From owner-cvs-all@FreeBSD.ORG Thu Jan 17 17:02:16 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FC6416A417; Thu, 17 Jan 2008 17:02:16 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AE9D613C4CE; Thu, 17 Jan 2008 17:02:16 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0HH2B9n002179; Thu, 17 Jan 2008 17:02:11 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0HH2BVf002173; Thu, 17 Jan 2008 17:02:11 GMT (envelope-from bde) Message-Id: <200801171702.m0HH2BVf002173@repoman.freebsd.org> From: Bruce Evans Date: Thu, 17 Jan 2008 17:02:11 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/msun/src math_private.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2008 17:02:16 -0000 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