components/stdcxx/patches/077-7020671-18.numeric.special.patch
changeset 402 94ae4d75524c
equal deleted inserted replaced
401:bf52ef48020c 402:94ae4d75524c
       
     1 --- stdcxx-4.2.1/tests/support/18.numeric.special.int.cpp	2008-04-24 20:23:28.000000000 -0400
       
     2 +++ stdcxx-4.2.1/tests/support/18.numeric.special.int.cpp	2011-02-18 01:55:12.861052484 -0500
       
     3 @@ -49,6 +49,7 @@
       
     4      enum { is_exact };
       
     5      enum { radix };
       
     6      enum { is_bounded = false };
       
     7 +    enum { traps = std::numeric_limits<T>::traps };
       
     8  
       
     9      static bool is_modulo () { return false; }
       
    10  
       
    11 @@ -91,6 +92,7 @@
       
    12      enum { is_exact = true };
       
    13      enum { radix = 2 };
       
    14      enum { is_bounded = true };
       
    15 +    enum { traps = std::numeric_limits<int>::traps };
       
    16  
       
    17      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    18  
       
    19 @@ -116,6 +118,7 @@
       
    20      enum { is_exact = true };
       
    21      enum { radix =  2 };
       
    22      enum { is_bounded = true };
       
    23 +    enum { traps = std::numeric_limits<bool>::traps };
       
    24  
       
    25      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    26  
       
    27 @@ -144,6 +147,7 @@
       
    28      enum { is_exact = true };
       
    29      enum { radix =  2 };
       
    30      enum { is_bounded = true };
       
    31 +    enum { traps = std::numeric_limits<char>::traps };
       
    32  
       
    33      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    34          
       
    35 @@ -169,6 +173,7 @@
       
    36      enum { is_exact = true };
       
    37      enum { radix =  2 };
       
    38      enum { is_bounded = true };
       
    39 +    enum { traps = std::numeric_limits<signed char>::traps };
       
    40  
       
    41      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    42  
       
    43 @@ -194,6 +199,7 @@
       
    44      enum { is_exact = true };
       
    45      enum { radix =  2 };
       
    46      enum { is_bounded = true };
       
    47 +    enum { traps = std::numeric_limits<unsigned char>::traps };
       
    48  
       
    49      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    50  
       
    51 @@ -241,6 +247,7 @@
       
    52      enum { is_exact = true };
       
    53      enum { radix =  2 };
       
    54      enum { is_bounded = true };
       
    55 +    enum { traps = std::numeric_limits<wchar_t>::traps };
       
    56  
       
    57      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    58          
       
    59 @@ -267,6 +274,7 @@
       
    60      enum { is_exact = true };
       
    61      enum { radix =  2 };
       
    62      enum { is_bounded = true };
       
    63 +    enum { traps = std::numeric_limits<short>::traps };
       
    64  
       
    65      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    66  
       
    67 @@ -292,6 +300,7 @@
       
    68      enum { is_exact = true };
       
    69      enum { radix =  2 }; 
       
    70      enum { is_bounded = true };
       
    71 +    enum { traps = std::numeric_limits<long>::traps };
       
    72  
       
    73      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    74  
       
    75 @@ -316,6 +325,7 @@
       
    76      enum { is_exact = true };
       
    77      enum { radix =  2 };
       
    78      enum { is_bounded = true };
       
    79 +    enum { traps = std::numeric_limits<unsigned short>::traps };
       
    80  
       
    81      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    82  
       
    83 @@ -340,6 +350,7 @@
       
    84      enum { is_exact = true };
       
    85      enum { radix =  2 };
       
    86      enum { is_bounded = true };
       
    87 +    enum { traps = std::numeric_limits<unsigned int>::traps };
       
    88  
       
    89      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    90  
       
    91 @@ -365,6 +376,7 @@
       
    92      enum { is_exact = true };
       
    93      enum { radix =  2 };
       
    94      enum { is_bounded = true };
       
    95 +    enum { traps = std::numeric_limits<unsigned long>::traps };
       
    96  
       
    97      static bool is_modulo () { return ::is_modulo ((max)()); }
       
    98  
       
    99 @@ -402,6 +414,7 @@
       
   100      enum { is_exact = true };
       
   101      enum { radix =  2 };
       
   102      enum { is_bounded = true };
       
   103 +    enum { traps = std::numeric_limits<_RWSTD_LONG_LONG>::traps };
       
   104  
       
   105      static bool is_modulo () { return ::is_modulo ((max)()); }
       
   106  
       
   107 @@ -430,6 +443,7 @@
       
   108      enum { is_exact = true };
       
   109      enum { radix =  2 };
       
   110      enum { is_bounded = true };
       
   111 +    enum { traps = std::numeric_limits<unsigned _RWSTD_LONG_LONG>::traps };
       
   112  
       
   113      static bool is_modulo () { return ::is_modulo ((max)()); }
       
   114  
       
   115 @@ -584,7 +598,7 @@
       
   116                 tname, Traits::is_modulo ());
       
   117  
       
   118      // 18.2.1.2, p59
       
   119 -    ASSERT_0 (traps, "%b");
       
   120 +	ASSERT (traps, "%b");
       
   121  
       
   122      // 18.2.1.2, p61
       
   123      ASSERT_0 (tinyness_before, "%b");
       
   124 --- stdcxx-4.2.1/tests/support/18.numeric.special.float.cpp	2008-04-24 20:23:28.000000000 -0400
       
   125 +++ stdcxx-4.2.1/tests/support/18.numeric.special.float.cpp	2011-02-18 01:18:03.834115355 -0500
       
   126 @@ -453,7 +453,8 @@
       
   127  
       
   128  #if defined (_AIX) \
       
   129      || defined (__hpux) \
       
   130 -    || defined (__osf__)
       
   131 +    || defined (__osf__) \
       
   132 +    || defined (__SUNPRO_CC)
       
   133          return std::denorm_present;
       
   134  #else
       
   135          return std::denorm_indeterminate;
       
   136 @@ -720,7 +721,8 @@
       
   137      static std::float_denorm_style has_denorm () {
       
   138  #if defined (_AIX) \
       
   139      || defined (__hpux) \
       
   140 -    || defined (__osf__)
       
   141 +    || defined (__osf__) \
       
   142 +    || defined (__SUNPRO_CC)
       
   143          return std::denorm_present;
       
   144  #else
       
   145          return std::denorm_indeterminate;
       
   146 @@ -980,7 +982,8 @@
       
   147      static std::float_denorm_style has_denorm () {
       
   148  #if defined (_AIX) \
       
   149      || defined (__hpux) \
       
   150 -    || defined (__osf__)
       
   151 +    || defined (__osf__) \
       
   152 +    || defined (__SUNPRO_CC) 
       
   153          return std::denorm_present;
       
   154  #else
       
   155          return std::denorm_indeterminate;