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]

Some more 2.95.3 patches


This contains the libstdc++ patches recommended by Joe Buck, a NLS
documentation update by Philipp Thomas, and a PPC patch recommended
by Geoff Keating and David Edelsohn.


Bernd

Index: gcc/ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.3667.4.314
diff -u -p -r1.3667.4.314 ChangeLog
--- gcc/ChangeLog	2000/12/29 16:30:35	1.3667.4.314
+++ gcc/ChangeLog	2001/01/01 17:15:46
@@ -1,3 +1,16 @@
+2001-01-01  Bernd Schmidt  <bernds@redhat.co.uk>
+
+	2000-12-27  Geoffrey Keating  <geoffk@redhat.com>
+	* config/rs6000/rs6000.md (define_attr "length"): Correct
+	calculation.
+
+2001-01-01  Philipp Thomas <pthomas@suse.de>
+
+	* configure.in: Make the help for --enable-nls make it
+	clear that this is an experimental feature.
+	* configure: Regenerate.
+	* ABOUT-GCC-NLS: Explain why NLS support is buggy.
+
 2000-12-29  Bernd Schmidt  <bernds@redhat.co.uk>

 	* version.c: Bump.
Index: gcc/ABOUT-GCC-NLS
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ABOUT-GCC-NLS,v
retrieving revision 1.1
diff -u -p -r1.1 ABOUT-GCC-NLS
--- gcc/ABOUT-GCC-NLS	1998/12/17 06:40:55	1.1
+++ gcc/ABOUT-GCC-NLS	2001/01/01 17:15:41
@@ -1,10 +1,26 @@
 Notes on GCC's Native Language Support

 GCC's Native Language Support (NLS) is relatively new and
-experimental, so NLS is currently disabled by default.  Use
-configure's --enable-nls option to enable it.  Eventually, NLS will be
-enabled by default, and you'll need --disable-nls to disable it.  You
-must enable NLS in order to make a GCC distribution.
+experimental, so NLS is currently disabled by default.
+
+The main reason for it being buggy is, that GCC does not set the
+locale categories correctly. Currently only LC_MESSAGES is set if the
+system supports it and else nothing.  To work correctly, GCC would have
+to also set the character set used by the terminal by either setting
+LC_CTYPE together with LC_MESSAGES or LC_ALL if LC_MESSAGES is
+not supported.
+
+This would change the behaviour of GCC in quite a few places because
+a number of standard C functions and macros change their behaviour
+depending on the locale.  These necessary changes have been done in the
+development version, but these changes are beyond the scope
+of a maintenance release such as this.  It is therefore recommended that
+you leave it disabled.
+
+If you still want to enable the feature, use configure's --enable-nls
+option to enable it.  Eventually, NLS will be enabled by default, and
+you'll need --disable-nls to disable it.  You must enable NLS in order
+to make a GCC distribution.

 By and large, only diagnostic messages have been internationalized.
 Some work remains in other areas; for example, GCC does not yet allow
Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.246.4.15
diff -u -p -r1.246.4.15 configure.in
--- gcc/configure.in	2000/12/22 14:31:25	1.246.4.15
+++ gcc/configure.in	2001/01/01 17:15:49
@@ -3747,7 +3747,8 @@ ALL_LINGUAS="en_UK"

 # NLS support is still experimental, so disable it by default for now.
 AC_ARG_ENABLE(nls,
-  [  --enable-nls            use Native Language Support (disabled by default)],
+[  --enable-nls            use Native Language Support (disabled by default).
+                          EXPERIMENTAL, see ABOUT-GCC-NLS.],
   , enable_nls=no)

 AM_GNU_GETTEXT
Index: libstdc++/ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++/ChangeLog,v
retrieving revision 1.72.4.18
diff -u -p -r1.72.4.18 ChangeLog
--- libstdc++/ChangeLog	2000/04/24 17:34:25	1.72.4.18
+++ libstdc++/ChangeLog	2001/01/01 17:16:07
@@ -1,3 +1,15 @@
+2001-01-01  Bernd Schmidt  <bernds@redhat.co.uk>
+
+	1999-12-07  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
+	* stl_deque.h (_Deque_base::const_iterator): Change third
+	template argument to pointer type.
+	Reported by Carlo Wood <carlo@node1500a.a2000.nl>
+
+	1999-11-10  Benjamin Kosnik  <bkoz@haight.constant.com>
+		    Matthias Klose  <doko@cs.tu-berlin.de>
+	* stl_rope.h: Fix initialization order.
+	* stl_deque.h: Use static_casts<size_type>(signed_type).
+
 2000-04-24  Magnus Fromreide  <magfr@lysator.liu.se>

 	* sstream: New file.
Index: libstdc++/stl/stl_deque.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++/stl/stl_deque.h,v
retrieving revision 1.3
diff -u -p -r1.3 stl_deque.h
--- libstdc++/stl/stl_deque.h	1998/09/02 17:24:47	1.3
+++ libstdc++/stl/stl_deque.h	2001/01/01 17:16:07
@@ -342,7 +342,7 @@ public:
           _Base;
   typedef typename _Base::allocator_type allocator_type;
   typedef _Deque_iterator<_Tp,_Tp&,_Tp*,__bufsiz>              iterator;
-  typedef _Deque_iterator<_Tp,const _Tp&,const _Tp&, __bufsiz> const_iterator;
+  typedef _Deque_iterator<_Tp,const _Tp&,const _Tp*, __bufsiz> const_iterator;

   _Deque_base(const allocator_type& __a, size_t __num_elements)
     : _Base(__a), _M_start(), _M_finish()
@@ -815,7 +815,7 @@ public:                         // Erase
     iterator __next = __pos;
     ++__next;
     difference_type __index = __pos - _M_start;
-    if (__index < (size() >> 1)) {
+    if (static_cast<size_type>(__index) < (size() >> 1)) {
       copy_backward(_M_start, __pos, __next);
       pop_front();
     }
@@ -1048,7 +1048,7 @@ deque<_Tp,_Alloc,__bufsize>::erase(itera
   else {
     difference_type __n = __last - __first;
     difference_type __elems_before = __first - _M_start;
-    if (__elems_before < (size() - __n) / 2) {
+    if (static_cast<size_type>(__elems_before) < (size() - __n) / 2) {
       copy_backward(_M_start, __first, __last);
       iterator __new_start = _M_start + __n;
       destroy(_M_start, __new_start);
@@ -1282,7 +1282,7 @@ deque<_Tp,_Alloc,__bufsize>::_M_insert_a
 {
   difference_type __index = __pos - _M_start;
   value_type __x_copy = __x;
-  if (__index < size() / 2) {
+  if (static_cast<size_type>(__index) < size() / 2) {
     push_front(front());
     iterator __front1 = _M_start;
     ++__front1;
@@ -1311,7 +1311,7 @@ typename deque<_Tp,_Alloc,__bufsize>::it
 deque<_Tp,_Alloc,__bufsize>::_M_insert_aux(iterator __pos)
 {
   difference_type __index = __pos - _M_start;
-  if (__index < size() / 2) {
+  if (static_cast<size_type>(__index) < size() / 2) {
     push_front(front());
     iterator __front1 = _M_start;
     ++__front1;
@@ -1344,7 +1344,7 @@ deque<_Tp,_Alloc,__bufsize>::_M_insert_a
   const difference_type __elems_before = __pos - _M_start;
   size_type __length = size();
   value_type __x_copy = __x;
-  if (__elems_before < __length / 2) {
+  if (static_cast<size_type>(__elems_before) < __length / 2) {
     iterator __new_start = _M_reserve_elements_at_front(__n);
     iterator __old_start = _M_start;
     __pos = _M_start + __elems_before;
@@ -1403,7 +1403,7 @@ deque<_Tp,_Alloc,__bufsize>::_M_insert_a
 {
   const difference_type __elemsbefore = __pos - _M_start;
   size_type __length = size();
-  if (__elemsbefore < __length / 2) {
+  if (static_cast<size_type>(__elemsbefore) < __length / 2) {
     iterator __new_start = _M_reserve_elements_at_front(__n);
     iterator __old_start = _M_start;
     __pos = _M_start + __elemsbefore;
Index: libstdc++/stl/stl_rope.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++/stl/stl_rope.h,v
retrieving revision 1.3
diff -u -p -r1.3 stl_rope.h
--- libstdc++/stl/stl_rope.h	1998/09/02 17:25:05	1.3
+++ libstdc++/stl/stl_rope.h	2001/01/01 17:16:08
@@ -386,8 +386,8 @@ struct _Rope_RopeRep : public _Rope_rep_
     typedef _Rope_rep_base<_CharT,_Alloc>::allocator_type allocator_type;
     _Rope_RopeRep(_Tag __t, int __d, bool __b, size_t __size,
                   allocator_type __a)
-        : _M_tag(__t), _M_depth(__d), _M_is_balanced(__b), _M_c_string(0),
-          _Rope_rep_base<_CharT,_Alloc>(__size, __a)
+        : _Rope_rep_base<_CharT,_Alloc>(__size, __a),
+          _M_tag(__t), _M_depth(__d), _M_is_balanced(__b), _M_c_string(0)
     {
 #       ifndef __GC
             _M_refcount = 1;
@@ -562,8 +562,8 @@ struct _Rope_RopeLeaf : public _Rope_Rop
                                 /* doesn't matter.               */
     typedef _Rope_rep_base<_CharT,_Alloc>::allocator_type allocator_type;
     _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t __size, allocator_type __a)
-        : _M_data(__d)
-        , _Rope_RopeRep<_CharT,_Alloc>(_S_leaf, 0, true, __size, __a)
+        : _Rope_RopeRep<_CharT,_Alloc>(_S_leaf, 0, true, __size, __a),
+	  _M_data(__d)
         {
         __stl_assert(__size > 0);
         if (_S_is_basic_char_type((_CharT *)0)) {
@@ -593,10 +593,10 @@ struct _Rope_RopeConcatenation : public
     _Rope_RopeConcatenation(_Rope_RopeRep<_CharT,_Alloc>* __l,
                              _Rope_RopeRep<_CharT,_Alloc>* __r,
                              allocator_type __a)
-      : _M_left(__l), _M_right(__r)
-      , _Rope_RopeRep<_CharT,_Alloc>(
+      : _Rope_RopeRep<_CharT,_Alloc>(
           _S_concat, max(__l->_M_depth, __r->_M_depth) + 1, false,
-          __l->_M_size + __r->_M_size, __a)
+          __l->_M_size + __r->_M_size, __a),
+      _M_left(__l), _M_right(__r)
       {}
 # ifndef __GC
     ~_Rope_RopeConcatenation() {
@@ -629,11 +629,12 @@ struct _Rope_RopeFunction : public _Rope
     typedef _Rope_rep_base<_CharT,_Alloc>::allocator_type allocator_type;
     _Rope_RopeFunction(char_producer<_CharT>* __f, size_t __size,
                         bool __d, allocator_type __a)
-      : _M_fn(__f)
+      :_Rope_RopeRep<_CharT,_Alloc>(_S_function, 0, true, __size, __a),
+       _M_fn(__f)
 #       ifndef __GC
       , _M_delete_when_done(__d)
 #       endif
-      , _Rope_RopeRep<_CharT,_Alloc>(_S_function, 0, true, __size, __a) {
+          {
         __stl_assert(__size > 0);
 #       ifdef __GC
             if (__d) {
@@ -693,9 +694,8 @@ struct _Rope_RopeSubstring : public _Rop
     typedef _Rope_rep_base<_CharT,_Alloc>::allocator_type allocator_type;
     _Rope_RopeSubstring(_Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
                           size_t __l, allocator_type __a)
-      : _M_base(__b)
+      : _Rope_RopeFunction<_CharT,_Alloc>(this, __l, false, __a), _M_base(__b)
       , _M_start(__s)
-      , _Rope_RopeFunction<_CharT,_Alloc>(this, __l, false, __a)
     {
         __stl_assert(__l > 0);
         __stl_assert(__s + __l <= __b->_M_size);
@@ -766,16 +766,16 @@ class _Rope_char_ref_proxy {
     _My_rope* _M_root;     // The whole rope.
   public:
     _Rope_char_ref_proxy(_My_rope* __r, size_t __p) :
-        _M_pos(__p), _M_root(__r), _M_current_valid(false) {}
+        _M_pos(__p), _M_current_valid(false), _M_root(__r) {}
     _Rope_char_ref_proxy(const _Rope_char_ref_proxy& __x) :
-        _M_pos(__x._M_pos), _M_root(__x._M_root), _M_current_valid(false) {}
+        _M_pos(__x._M_pos), _M_current_valid(false), _M_root(__x._M_root) {}
         // Don't preserve cache if the reference can outlive the
         // expression.  We claim that's not possible without calling
         // a copy constructor or generating reference to a proxy
         // reference.  We declare the latter to have undefined semantics.
     _Rope_char_ref_proxy(_My_rope* __r, size_t __p,
                     _CharT __c) :
-        _M_pos(__p), _M_root(__r), _M_current(__c), _M_current_valid(true) {}
+        _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {}
     inline operator _CharT () const;
     _Rope_char_ref_proxy& operator= (_CharT __c);
     _Rope_char_ptr_proxy<_CharT,_Alloc> operator& () const;


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