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] simple -fno-for-scope fixups



2001-03-12  Benjamin Kosnik  <bkoz@redhat.com>

	Fixups for -fno-for-scope
	* include/bits/locale_facets.tcc (__match_parallel): Fixup.
	* src/valarray-inst.cc (__gslice_to_index): Same.

Index: include/bits/locale_facets.tcc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/locale_facets.tcc,v
retrieving revision 1.10
diff -c -p -r1.10 locale_facets.tcc
*** locale_facets.tcc	2001/02/23 07:12:03	1.10
--- locale_facets.tcc	2001/03/12 21:42:02
*************** namespace std
*** 110,156 ****
        size_t __pos = 0;
        do
          {
!           {
!             int __ti = 0;
!             for (;__ti < __remain &&
!                    __pos == __targets[__matches[__ti]].size(); ++__ti)
!               { }
!             if (__ti == __remain)
!               {
!                 if (__pos == 0) __remain = 0;
!                 return __s;
!               }
!           }
            if (__s == __end)
              __eof = true;
            bool __matched = false;
!           for (int __ti = 0; __ti < __remain; )
              {
!               const __string_type& __target = __targets[__matches[__ti]];
                if (__pos < __target.size())
                  {
                    if (__eof || __target[__pos] != *__s)
                      {
!                       __matches[__ti] = __matches[--__remain];
                        continue;
                      }
                    __matched = true;
                  }
!               ++__ti;
              }
            if (__matched)
              {
                ++__s;
                ++__pos;
              }
!           for (int __ti = 0; __ti < __remain;)
              {
!               if (__pos > __targets[__matches[__ti]].size())
                  {
!                   __matches[__ti] = __matches[--__remain];
                    continue;
                  }
!               ++__ti;
              }
          }
        while (__remain);
--- 110,153 ----
        size_t __pos = 0;
        do
          {
! 	  int __ti = 0;
! 	  while (__ti < __remain && __pos == __targets[__matches[__ti]].size())
! 	    ++__ti;
! 	  if (__ti == __remain)
! 	    {
! 	      if (__pos == 0) __remain = 0;
! 	      return __s;
! 	    }
            if (__s == __end)
              __eof = true;
            bool __matched = false;
!           for (int __ti2 = 0; __ti2 < __remain; )
              {
!               const __string_type& __target = __targets[__matches[__ti2]];
                if (__pos < __target.size())
                  {
                    if (__eof || __target[__pos] != *__s)
                      {
!                       __matches[__ti2] = __matches[--__remain];
                        continue;
                      }
                    __matched = true;
                  }
!               ++__ti2;
              }
            if (__matched)
              {
                ++__s;
                ++__pos;
              }
!           for (int __ti3 = 0; __ti3 < __remain;)
              {
!               if (__pos > __targets[__matches[__ti3]].size())
                  {
!                   __matches[__ti3] = __matches[--__remain];
                    continue;
                  }
!               ++__ti3;
              }
          }
        while (__remain);
Index: src/valarray-inst.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/valarray-inst.cc,v
retrieving revision 1.5
diff -c -p -r1.5 valarray-inst.cc
*** valarray-inst.cc	2001/03/04 21:34:02	1.5
--- valarray-inst.cc	2001/03/12 21:42:02
*************** namespace std
*** 96,108 ****
  
          // Process the next multi-index.  The loop ought to be
          // backward since we're making a lexicagraphical visit.
!         ++__t[__n-1];
!         for (size_t __k=__n-1; __k; --__k)
            {
!             if (__t[__k] >= __l[__k])
                {
!                 __t[__k] = 0;
!                 ++__t[__k-1];
                }
            }
        }
--- 96,108 ----
  
          // Process the next multi-index.  The loop ought to be
          // backward since we're making a lexicagraphical visit.
!         ++__t[__n - 1];
!         for (size_t __k2 = __n - 1; __k2; --__k2)
            {
!             if (__t[__k2] >= __l[__k2])
                {
!                 __t[__k2] = 0;
!                 ++__t[__k2 - 1];
                }
            }
        }


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