2001-04-25 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Apr 2001 02:23:52 +0000 (02:23 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Apr 2001 02:23:52 +0000 (02:23 +0000)
* include/c_std/bits/std_cmath.h (std): Explicitly inject c99 names.
* include/c_std/bits/std_cstdlib.h (std): Same, except for llabs.
* include/c_std/bits/std_cwchar.h (std): Same.
* acconfig.h (std): Remove c99 injection into std.
* config.h.in: Regenerate.

* testsuite/README: Fix typo.

* include/bits/codecvt.h: Remove warnings.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41568 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/acconfig.h
libstdc++-v3/config.h.in
libstdc++-v3/include/bits/codecvt.h
libstdc++-v3/include/c_std/bits/std_cmath.h
libstdc++-v3/include/c_std/bits/std_cstdlib.h
libstdc++-v3/include/c_std/bits/std_cwchar.h
libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc
libstdc++-v3/testsuite/README

index 02934ff..342c0be 100644 (file)
@@ -1,3 +1,15 @@
+2001-04-25  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/c_std/bits/std_cmath.h (std): Explicitly inject c99 names.
+       * include/c_std/bits/std_cstdlib.h (std): Same, except for llabs.
+       * include/c_std/bits/std_cwchar.h (std): Same.
+       * acconfig.h (std): Remove c99 injection into std.
+       * config.h.in: Regenerate.
+       
+       * testsuite/README: Fix typo.
+
+       * include/bits/codecvt.h: Remove warnings.
+       
 2001-04-24  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>
 
         * include/ext/slist: Include required header files. 
index 3c79c8c..d1c674a 100644 (file)
 // Systems that have certain non-standard functions prefixed with an
 // underscore, we'll handle those here. Must come after config.h.in.
 //
-
-#if defined(_GLIBCPP_USE_C99) && defined(__cplusplus)
-// Placeholder for declarations in c99 namespace.
-namespace std
-{
-  namespace c99 { }
-  using namespace c99;
-}
-#endif
-
 #if defined (HAVE__ISNAN) && ! defined (HAVE_ISNAN)
 # define HAVE_ISNAN 1
 # define isnan _isnan
index 51d0e74..4aef400 100644 (file)
 // Systems that have certain non-standard functions prefixed with an
 // underscore, we'll handle those here. Must come after config.h.in.
 //
-
-#if defined(_GLIBCPP_USE_C99) && defined(__cplusplus)
-// Placeholder for declarations in c99 namespace.
-namespace std
-{
-  namespace c99 { }
-  using namespace c99;
-}
-#endif
-
 #if defined (HAVE__ISNAN) && ! defined (HAVE_ISNAN)
 # define HAVE_ISNAN 1
 # define isnan _isnan
index 7f5df96..badc7fb 100644 (file)
            }
          else 
            {
-             if (__flen < __from_end - __from)
+             if (__flen < static_cast<size_t>(__from_end - __from))
                {
                  __from_next = reinterpret_cast<const intern_type*>(__cfrom);
                  __to_next = reinterpret_cast<extern_type*>(__cto);
            }
          else 
            {
-             if (__flen < __from_end - __from)
+             if (__flen < static_cast<size_t>(__from_end - __from))
                {
                  __from_next = reinterpret_cast<const extern_type*>(__cfrom);
                  __to_next = reinterpret_cast<intern_type*>(__cto);
   template<typename _InternT, typename _ExternT>
     int 
     codecvt<_InternT, _ExternT, __enc_traits>::
-    do_length(const state_type& __state, const extern_type* __from, 
+    do_length(const state_type&, const extern_type* __from, 
              const extern_type* __end, size_t __max) const
     { return min(__max, static_cast<size_t>(__end - __from)); }
 
index 9ec8284..d37f900 100644 (file)
@@ -722,13 +722,30 @@ namespace c99
 
   template<typename _Tp>
     int 
-    islessgreater(_Tp __f) { return __capture_islessgreater(__f); }
+    islessgreater(_Tp __f1, _Tp __f2) 
+    { return __capture_islessgreater(__f1, __f2); }
 
   template<typename _Tp>
     int 
     isunordered(_Tp __f1, _Tp __f2) 
     { return __capture_isunordered(__f1, __f2); }
 }
+
+namespace std
+{
+  using c99::fpclassify;
+  using c99::isfinite;
+  using c99::isinf;
+  using c99::isnan;
+  using c99::isnormal;
+  using c99::signbit;
+  using c99::isgreater;
+  using c99::isgreaterequal;
+  using c99::isless;
+  using c99::islessequal;
+  using c99::islessgreater;
+  using c99::isunordered;
+}
 #endif
   
 #ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
index b8365e0..50ef583 100644 (file)
@@ -152,6 +152,21 @@ namespace c99
   extern "C" long double strtold(const char*, char**); 
 #endif
 } // namespace c99
+
+namespace std
+{
+  using c99::lldiv_t;
+  using c99::abs;
+  //using c99::llabs; // XXX ???
+  using c99::div;
+  using c99::lldiv;
+  using c99::atoll;
+  using c99::strtoll;
+  using c99::strtoull;
+#ifdef _GLIBCPP_HAVE_STRTOLD
+  using c99::strtold;
+#endif
+}
 #endif
 
 #endif 
index 4bf8c83..0919ab0 100644 (file)
@@ -204,6 +204,13 @@ namespace c99
   extern "C" long long int wcstoll(const wchar_t*, wchar_t**, int); 
   extern "C" unsigned long long int wcstoull(const wchar_t*, wchar_t**, int); 
 }
+
+namespace std
+{
+  using c99::wcstold;
+  using c99::wcstoll;
+  using c99::wcstoull;
+}
 #endif
 
 #endif //_GLIBCPP_USE_WCHAR_T
index 4fa586e..132cebf 100644 (file)
@@ -59,26 +59,25 @@ void isunordered() { }
 template <typename _Tp>
   void test_c99_classify()
   {
-    using namespace std;
-    test = bool;
+    bool test = true;
 
     typedef _Tp fp_type;
     fp_type f1 = 1.0;
     fp_type f2 = 3.0;
     int res = 0;
     
-    res = fpclassify(f1);
-    res = isfinite(f2);
-    res = isinf(f1);
-    res = isnan(f2);
-    res = isnormal(f1);
-    res = signbit(f2);
-    res = isgreater(f1, f2);
-    res = isgreaterequal(f1, f2);
-    res = isless(f1, f2);
-    res = islessequal(f1,f2);
-    res = islessgreater(f1, f2);
-    res = isunordered(f1, f2);
+    res = std::fpclassify(f1);
+    res = std::isfinite(f2);
+    res = std::isinf(f1);
+    res = std::isnan(f2);
+    res = std::isnormal(f1);
+    res = std::signbit(f2);
+    res = std::isgreater(f1, f2);
+    res = std::isgreaterequal(f1, f2);
+    res = std::isless(f1, f2);
+    res = std::islessequal(f1,f2);
+    res = std::islessgreater(f1, f2);
+    res = std::isunordered(f1, f2);
   }
 #endif
 
@@ -86,7 +85,7 @@ int main()
 {
 #if _GLIBCPP_USE_C99
   test_c99_classify<float>();
-  test_c99_classify<double>();
+  //test_c99_classify<double>();
 #endif
   return 0;
 }
index c48f4db..61c6bd2 100644 (file)
@@ -8,7 +8,7 @@ testcases should be written with the new style DejaGnu framework in
 mind.
 
 To ease transition, here is the list of dg-keyword documentation
-lifted from dg.exp -- eventuaklly we should improve DejaGnu
+lifted from dg.exp -- eventually we should improve DejaGnu
 documentation, but getting checkin account currently demands Pyrrhic
 effort.