This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR libstdc++/65883 missing unsigned in numeric_limits


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; 			\

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]