diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-03 17:33:54 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-03 17:33:54 +0000 |
| commit | d14ad2bf4a90a604386787dc04194e565917e636 (patch) | |
| tree | 67df1a4a2447adf81cc885a1bb33e8ad324da982 /libstdc++-v3/include/std/limits | |
| parent | 1729795338c551f7697f647d5f3a59dd0f547eb2 (diff) | |
| download | ppe42-gcc-d14ad2bf4a90a604386787dc04194e565917e636.tar.gz ppe42-gcc-d14ad2bf4a90a604386787dc04194e565917e636.zip | |
2010-11-03 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/limits (__glibcxx_digits10, __glibcxx_max_digits10):
Use 643L instead of 643 to avoid overflows on 16-bit machines.
* include/ext/numeric_traits.h (__glibcxx_max_digits10): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166261 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/limits')
| -rw-r--r-- | libstdc++-v3/include/std/limits | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits index ce557d6a76c..4594c93eb32 100644 --- a/libstdc++-v3/include/std/limits +++ b/libstdc++-v3/include/std/limits @@ -140,10 +140,10 @@ // The fraction 643/2136 approximates log10(2) to 7 significant digits. #define __glibcxx_digits10(T) \ - (__glibcxx_digits (T) * 643 / 2136) + (__glibcxx_digits (T) * 643L / 2136) #define __glibcxx_max_digits10(T) \ - (2 + (T) * 643 / 2136) + (2 + (T) * 643L / 2136) _GLIBCXX_BEGIN_NAMESPACE(std) |

