|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-12-20 23:51:33
Regex generates warnings with GCC which can be avoided as follows. John,
please let me know if you'd like me to apply this patch.
--- c:/boost/libs/regex/src/c_regex_traits.cpp Wed Nov 29 08:39:26 2000
+++ e:/manhat/boost/libs/regex/src/c_regex_traits.cpp Wed Dec 20 19:40:58
2000
@@ -701,7 +701,7 @@
// if radix is less than zero, then restrict
// return value to charT. NB assumes sizeof(charT) <= sizeof(int)
radix *= -1;
- maxval = 1 << (sizeof(*first) * CHAR_BIT - 1);
+ maxval = 1u << (sizeof(*first) * CHAR_BIT - 1);
maxval /= radix;
maxval *= 2;
maxval -= 1;
@@ -954,7 +954,7 @@
// if radix is less than zero, then restrict
// return value to charT. NB assumes sizeof(charT) <= sizeof(int)
radix *= -1;
- maxval = 1 << (sizeof(*first) * CHAR_BIT - 1);
+ maxval = 1u << (sizeof(*first) * CHAR_BIT - 1);
maxval /= radix;
maxval *= 2;
maxval -= 1;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk