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]

[patch for libstdc++] Re: g++, pthreads, -D__STL_PTHREADS, and link errors


On Mar 17, 1999, rgarabedian@tripod.com wrote:

> The new compiler produced an internal error when trying to build the
> test program that contained some "last ditch" efforts by me to get
> the mess to build.

Thanks for your report, fixed in the last development snapshots;

On Solaris 2.5/sparc, there's a minor #include nit, that should be
fixed with the attached patch (ok to install?), but after the patch it
reports that msg<...> is not a valid declarator in line:

>    string msg<char, string_char_traits<char>, pthread_alloc>;

The line should read:

     basic_string<char....> msg;

After this fix, the code compiles and runs successfully.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org,computer.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Instituto de Computação, Universidade Estadual de Campinas, SP, Brasil
*** E-mail about software projects will be forwarded to mailing lists
Index: libstdc++/stl/ChangeLog
from  Alexandre Oliva  <oliva@dcc.unicamp.br>
	
	* pthread_alloc: Solaris' ctype.h defines _U to 01; use _Up as
	template parameter instead
	
Index: libstdc++/stl/pthread_alloc
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libstdc++/stl/pthread_alloc,v
retrieving revision 1.3
diff -u -r1.3 pthread_alloc
--- libstdc++/stl/pthread_alloc	1998/09/02 17:24:37	1.3
+++ libstdc++/stl/pthread_alloc	1999/03/17 22:53:10
@@ -376,13 +376,13 @@
   typedef const _Tp& const_reference;
   typedef _Tp        value_type;
 
-  template <class _U> struct rebind {
-    typedef pthread_allocator<_U> other;
+  template <class _Up> struct rebind {
+    typedef pthread_allocator<_Up> other;
   };
 
   pthread_allocator() __STL_NOTHROW {}
   pthread_allocator(const pthread_allocator& a) __STL_NOTHROW {}
-  template <class _U> pthread_allocator(const pthread_allocator<_U>&)
+  template <class _Up> pthread_allocator(const pthread_allocator<_Up>&)
 		__STL_NOTHROW {}
   ~pthread_allocator() __STL_NOTHROW {}
 
@@ -416,8 +416,8 @@
   typedef const void* const_pointer;
   typedef void        value_type;
 
-  template <class _U> struct rebind {
-    typedef pthread_allocator<_U> other;
+  template <class _Up> struct rebind {
+    typedef pthread_allocator<_Up> other;
   };
 };
 
@@ -451,16 +451,16 @@
           allocator_type;
 };
 
-template <class _Tp, class _U, size_t _Max>
-struct _Alloc_traits<_Tp, __allocator<_U, _Pthread_alloc_template<_Max> > >
+template <class _Tp, class _Up, size_t _Max>
+struct _Alloc_traits<_Tp, __allocator<_Up, _Pthread_alloc_template<_Max> > >
 {
   static const bool _S_instanceless = true;
   typedef simple_alloc<_Tp, _Pthread_alloc_template<_Max> > _Alloc_type;
   typedef __allocator<_Tp, _Pthread_alloc_template<_Max> > allocator_type;
 };
 
-template <class _Tp, class _U>
-struct _Alloc_traits<_Tp, pthread_allocator<_U> >
+template <class _Tp, class _Up>
+struct _Alloc_traits<_Tp, pthread_allocator<_Up> >
 {
   static const bool _S_instanceless = true;
   typedef simple_alloc<_Tp, _Pthread_alloc_template<> > _Alloc_type;

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