cvs commit: src/lib/msun/src math_private.h

Bruce Evans bde at FreeBSD.org
Thu Jan 17 09:02:16 PST 2008


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


More information about the cvs-src mailing list