This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR libstdc++/65883 missing unsigned in numeric_limits
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 28 Apr 2015 14:47:41 +0200 (CEST)
- Subject: PR libstdc++/65883 missing unsigned in numeric_limits
- Authentication-results: sourceware.org; auth=none
Hello,
this patch fixes an obvious typo. Regtested without problem, and I
manually checked that the new return value of max() makes more sense.
2015-04-28 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/65883
* include/std/limits (numeric_limits): Add missing unsigned.
--
Marc Glisse
Index: include/std/limits
===================================================================
--- include/std/limits (revision 222524)
+++ include/std/limits (working copy)
@@ -1483,21 +1483,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
\
template<> \
struct numeric_limits<unsigned TYPE> \
{ \
static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \
\
static _GLIBCXX_CONSTEXPR unsigned TYPE \
min() _GLIBCXX_USE_NOEXCEPT { return 0; } \
\
static _GLIBCXX_CONSTEXPR unsigned TYPE \
- max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max_b (TYPE, BITSIZE); } \
+ max() _GLIBCXX_USE_NOEXCEPT \
+ { return __glibcxx_max_b (unsigned TYPE, BITSIZE); } \
\
UEXT \
\
static _GLIBCXX_USE_CONSTEXPR int digits \
= BITSIZE; \
static _GLIBCXX_USE_CONSTEXPR int digits10 \
= BITSIZE * 643L / 2136; \
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; \
static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \
static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \