diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2012-12-25 07:37:33 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2012-12-25 07:37:33 +0000 |
commit | b8d52352a7c7e8084524cf834aebf7d916f480c7 (patch) | |
tree | 0c659ee928c31b7dac32d611bc3d6baa26df576c /contrib/libstdc++ | |
parent | f7a17322045a321e9d6e04a56be983d8415206bf (diff) | |
download | src-test2-b8d52352a7c7e8084524cf834aebf7d916f480c7.tar.gz src-test2-b8d52352a7c7e8084524cf834aebf7d916f480c7.zip |
Notes
Diffstat (limited to 'contrib/libstdc++')
-rw-r--r-- | contrib/libstdc++/include/std/std_limits.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/libstdc++/include/std/std_limits.h b/contrib/libstdc++/include/std/std_limits.h index d1211fdb59eb..c4cfcb9f80db 100644 --- a/contrib/libstdc++/include/std/std_limits.h +++ b/contrib/libstdc++/include/std/std_limits.h @@ -134,10 +134,11 @@ #define __glibcxx_signed(T) ((T)(-1) < 0) #define __glibcxx_min(T) \ - (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0) + (__glibcxx_signed (T) ? (((T)1 << (__glibcxx_digits (T) - 1)) << 1) : (T)0) #define __glibcxx_max(T) \ - (__glibcxx_signed (T) ? ((T)1 << __glibcxx_digits (T)) - 1 : ~(T)0) + (__glibcxx_signed (T) ? \ + (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0) #define __glibcxx_digits(T) \ (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T)) |