diff options
author | sb <sb@openoffice.org> | 2009-10-29 15:48:48 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2009-10-29 15:48:48 +0100 |
commit | 925a3a281e9fe4bc6d1f62d8c1ade83e46bf87f9 (patch) | |
tree | c8cd9884bdd893f5f86bbe11affcd5fd95457a78 /sal/rtl/source/math.cxx | |
parent | 40a156995c9a39cd5de0efaa0ddcc163515bf70a (diff) |
sb116: #i106384# avoid GCC warnings produced if -fno-strict-aliasing were removed (patch by cmc)
Diffstat (limited to 'sal/rtl/source/math.cxx')
-rw-r--r-- | sal/rtl/source/math.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx index a255ca21b13a..012046c9e5c8 100644 --- a/sal/rtl/source/math.cxx +++ b/sal/rtl/source/math.cxx @@ -879,8 +879,13 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd, rtl::math::setNan( &fVal ); if (bSign) { - reinterpret_cast< sal_math_Double * >(&fVal)->w32_parts.msw - |= 0x80000000; // create negative NaN + union { + double sd; + sal_math_Double md; + } m; + m.sd = fVal; + m.md.w32_parts.msw |= 0x80000000; // create negative NaN + fVal = m.sd; bSign = false; // don't negate again } // Eat any further digits: |