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]

V3 PATCH: Re: namespace c99


Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr> writes:

| However, I'm wondering why we don't just use the extension namespace
| __gnu_cxx in place of std::c99. (Yes, I know I'm the original proposer
| of c99; sorry for the flip-flop).

I finally committed this.

Bootstraped and tested on an i686-pc-linux.  No regressions.

-- Gaby

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/ChangeLog,v
retrieving revision 1.452.2.77
diff -p -r1.452.2.77 ChangeLog
*** ChangeLog	2001/05/30 07:13:22	1.452.2.77
--- ChangeLog	2001/05/30 10:11:23
***************
*** 1,3 ****
--- 1,14 ----
+ 2001-05-29  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
+ 
+ 	* include/c_std/bits/std_cstdlib.h:: Move C99 thingies to __gnu_cxx::. 
+ 	* include/c_std/bits/std_cwchar.h (__gnu_cxx): Likewise.
+ 
+ 2001-05-27  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
+ 
+ 	* include/c_std/bits/std_cmath.h: Move C99 functions in __gnu_cxx::.
+ 	* include/c_std/bits/std_cstdlib.h: Same.
+ 	* include/c_std/bits/std_cwchar.h: Same.
+ 
  2001-05-30  Hans-Peter Nilsson  <hp@axis.com>
  
  	* src/Makefile.am (VPATH): Delimit with ":", not space.
Index: include/c_std/bits/std_cmath.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_std/bits/std_cmath.h,v
retrieving revision 1.6.2.5
diff -p -r1.6.2.5 std_cmath.h
*** std_cmath.h	2001/05/28 08:33:39	1.6.2.5
--- std_cmath.h	2001/05/30 10:11:23
*************** namespace std 
*** 572,580 ****
  
  #if _GLIBCPP_USE_C99
  // These are possible macros imported from C99-land. For strict
! // conformance, remove possible C99-injected names from the
! // global namespace, and sequester them in the c99 namespace. 
! namespace c99
  {
    template<typename _Tp>
      int 
--- 572,580 ----
  
  #if _GLIBCPP_USE_C99
  // These are possible macros imported from C99-land. For strict
! // conformance, remove possible C99-injected names from the global
! // namespace, and sequester them in the __gnu_cxx extension namespace. 
! namespace __gnu_cxx
  {
    template<typename _Tp>
      int 
*************** namespace c99
*** 602,633 ****
  
    template<typename _Tp>
      int 
!     __capture_isgreater(_Tp __f1, _Tp __f2) { return isgreater(__f1, __f2); }
  
!  template<typename _Tp>
!     int 
!     __capture_isgreaterequal(_Tp __f1, _Tp __f2) 
!     { return isgreaterequal(__f1, __f2); }
  
!  template<typename _Tp>
!     int 
!     __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); }
  
!  template<typename _Tp>
!     int 
!     __capture_islessequal(_Tp __f1, _Tp __f2) 
!     { return islessequal(__f1, __f2); }
  
!  template<typename _Tp>
!     int 
!     __capture_islessgreater(_Tp __f1, _Tp __f2) 
!     { return islessgreater(__f1, __f2); }
  
!  template<typename _Tp>
!     int 
!     __capture_isunordered(_Tp __f1, _Tp __f2) 
!     { return isunordered(__f1, __f2); }
! } // namespace c99
  #endif
  
  #undef fpclassify
--- 602,634 ----
  
    template<typename _Tp>
      int 
!     __capture_isgreater(_Tp __f1, _Tp __f2)
!     { return isgreater(__f1, __f2); }
  
!   template<typename _Tp>
!      int 
!      __capture_isgreaterequal(_Tp __f1, _Tp __f2) 
!      { return isgreaterequal(__f1, __f2); }
  
!   template<typename _Tp>
!      int 
!      __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); }
  
!   template<typename _Tp>
!      int 
!      __capture_islessequal(_Tp __f1, _Tp __f2) 
!      { return islessequal(__f1, __f2); }
  
!   template<typename _Tp>
!      int 
!      __capture_islessgreater(_Tp __f1, _Tp __f2) 
!      { return islessgreater(__f1, __f2); }
  
!   template<typename _Tp>
!      int 
!      __capture_isunordered(_Tp __f1, _Tp __f2) 
!      { return isunordered(__f1, __f2); }
! } // namespace __gnu_cxx
  #endif
  
  #undef fpclassify
*************** namespace c99
*** 644,650 ****
  #undef isunordered
  
  #if _GLIBCPP_USE_C99
! namespace c99
  {
    template<typename _Tp>
      int
--- 645,651 ----
  #undef isunordered
  
  #if _GLIBCPP_USE_C99
! namespace __gnu_cxx
  {
    template<typename _Tp>
      int
*************** namespace c99
*** 701,718 ****
  
  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
    
--- 702,719 ----
  
  namespace std
  {
!   using __gnu_cxx::fpclassify;
!   using __gnu_cxx::isfinite;
!   using __gnu_cxx::isinf;
!   using __gnu_cxx::isnan;
!   using __gnu_cxx::isnormal;
!   using __gnu_cxx::signbit;
!   using __gnu_cxx::isgreater;
!   using __gnu_cxx::isgreaterequal;
!   using __gnu_cxx::isless;
!   using __gnu_cxx::islessequal;
!   using __gnu_cxx::islessgreater;
!   using __gnu_cxx::isunordered;
  }
  #endif
    
Index: include/c_std/bits/std_cstdlib.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_std/bits/std_cstdlib.h,v
retrieving revision 1.7.2.1
diff -p -r1.7.2.1 std_cstdlib.h
*** std_cstdlib.h	2001/05/14 19:49:07	1.7.2.1
--- std_cstdlib.h	2001/05/30 10:11:23
*************** namespace std 
*** 126,132 ****
  } // namespace std
  
  #if _GLIBCPP_USE_C99
! namespace c99
  {
    using ::lldiv_t;
  
--- 126,132 ----
  } // namespace std
  
  #if _GLIBCPP_USE_C99
! namespace __gnu_cxx
  {
    using ::lldiv_t;
  
*************** namespace c99
*** 151,170 ****
  #ifdef _GLIBCPP_HAVE_STRTOLD
    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
--- 151,170 ----
  #ifdef _GLIBCPP_HAVE_STRTOLD
    extern "C" long double strtold(const char*, char**); 
  #endif
! } // namespace __gnu_cxx
  
  namespace std
  {
!   using __gnu_cxx::lldiv_t;
!   using __gnu_cxx::abs;
!   //using __gnu_cxx::llabs; // XXX ???
!   using __gnu_cxx::div;
!   using __gnu_cxx::lldiv;
!   using __gnu_cxx::atoll;
!   using __gnu_cxx::strtoll;
!   using __gnu_cxx::strtoull;
  #ifdef _GLIBCPP_HAVE_STRTOLD
!   using __gnu_cxx::strtold;
  #endif
  }
  #endif
Index: include/c_std/bits/std_cwchar.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_std/bits/std_cwchar.h,v
retrieving revision 1.5.2.2
diff -p -r1.5.2.2 std_cwchar.h
*** std_cwchar.h	2001/05/22 05:02:58	1.5.2.2
--- std_cwchar.h	2001/05/30 10:11:23
*************** namespace std
*** 205,211 ****
  }
  
  #if _GLIBCPP_USE_C99
! namespace c99
  {
    extern "C" long double wcstold(const wchar_t*, wchar_t**); 
    extern "C" long long int wcstoll(const wchar_t*, wchar_t**, int); 
--- 205,211 ----
  }
  
  #if _GLIBCPP_USE_C99
! namespace __gnu_cxx
  {
    extern "C" long double wcstold(const wchar_t*, wchar_t**); 
    extern "C" long long int wcstoll(const wchar_t*, wchar_t**, int); 
*************** namespace c99
*** 214,222 ****
  
  namespace std
  {
!   using c99::wcstold;
!   using c99::wcstoll;
!   using c99::wcstoull;
  }
  #endif
  
--- 214,222 ----
  
  namespace std
  {
!   using __gnu_cxx::wcstold;
!   using __gnu_cxx::wcstoll;
!   using __gnu_cxx::wcstoull;
  }
  #endif
  


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