stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r704438 - in /stdcxx/trunk: etc/config/xfail.txt include/rw/_select.h include/rw/_specialized.h src/time_put.cpp
Date Tue, 14 Oct 2008 10:30:17 GMT
Author: faridz
Date: Tue Oct 14 03:30:16 2008
New Revision: 704438

URL: http://svn.apache.org/viewvc?rev=704438&view=rev
Log:
2008-10-14  Farid Zaripov  <faridz@apache.org>

	Merged revs 687762, 694649, 694675, 694677, 697885, 700895,
	704366 from 4.2.x branch.


	2008-08-21  Farid Zaripov  <faridz@apache.org>
	STDCXX-976
	* include/rw/_specialized.h (uninitialized_copy) [!__HP_aCC]:
	Explicitly cast *__first into const reference to the
	iterator_traits<_InputIterator>::value_type type for accepting
	_InputIterator's with operator*() returning rvalue.


	2008-09-12  Farid Zaripov  <faridz@apache.org>
	* src/time_put.cpp (__rw_get_timepunct): Cast off to _RWSTD_UINT32_T
	to shut up conversion warnings on 64-bit MSVC.


	2008-09-12  Farid Zaripov  <faridz@apache.org>
	STDCXX-968
	STDCXX-1009
	* include/rw/_select.h: Use 1L for select discriminator to avoid
	64-bit migration warnings for converting the integer to pointer.


	2008-09-22  Farid Zaripov  <faridz@apache.org>
	STDCXX-976
	* include/rw/_specialized.h: Reverted r694675.
	(uninitialized_copy): Use ::new() instead of __rw::__rw_construct().


	2008-09-12  Farid Zaripov  <faridz@apache.org>
	STDCXX-976
	* include/rw/_specialized.h (uninitialized_copy): Reverted r687762.
	Added const _TypeU& overloads of the __rw_construct().


	2008-10-01  Farid Zaripov  <faridz@apache.org>
	* etc/config/xfail.txt: Removed lines, corresponding to
	recently resolved STDCXX-1009 issue.


	2008-10-14  Martin Sebor  <sebor@roguewave.com>
	* include/rw/_specialized.h (uninitialized_copy): avoid
	const-qualifying ptr to prevent an HP aCC 3 bug (see STDCXX-1021).

Modified:
    stdcxx/trunk/etc/config/xfail.txt
    stdcxx/trunk/include/rw/_select.h
    stdcxx/trunk/include/rw/_specialized.h
    stdcxx/trunk/src/time_put.cpp

Modified: stdcxx/trunk/etc/config/xfail.txt
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/xfail.txt?rev=704438&r1=704437&r2=704438&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/xfail.txt (original)
+++ stdcxx/trunk/etc/config/xfail.txt Tue Oct 14 03:30:16 2008
@@ -68,10 +68,8 @@
 2.smartptr.shared   hpux-*-*-acc-3.*-*              COMP      STDCXX-615
 19.exceptions.mt    aix-5.3-*-vacpp-9.0-{12,15}?    HUP       STDCXX-644
 21.string.assign.stdcxx-629    *-*-*-*-*            ABRT      STDCXX-629
-21.string.exceptions           *-*-*-*-*            COMP      STDCXX-1009
 21.string.insert.stdcxx-632    *-*-*-*-*            ABRT      STDCXX-632
 21.string.replace.stdcxx-170   *-*-*-*-*            ABRT      STDCXX-170
-21.string.stdcxx-1009          *-*-*-*-*            COMP      STDCXX-1009
 21.string.stdcxx-162  linux*-*-{amd64,em64t}-*-*-{12,15}{D,S} ABRT STDCXX-162
 23.vector.modifiers.stdcxx-495 *-*-*-*-*            ABRT      STDCXX-495
 25.uninitialized.copy.stdcxx-976 *-*-*-*-*          COMP      STDCXX-976

Modified: stdcxx/trunk/include/rw/_select.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_select.h?rev=704438&r1=704437&r2=704438&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_select.h (original)
+++ stdcxx/trunk/include/rw/_select.h Tue Oct 14 03:30:16 2008
@@ -89,7 +89,7 @@
 
 #if !defined (__SUNPRO_CC) || __SUNPRO_CC > 0x530
 #  define _RWSTD_DISPATCH(iter)   \
-       (typename _RW::__rw_select_int< iter >::_SelectT (0))
+       (typename _RW::__rw_select_int< iter >::_SelectT (1L))
 
 #else
    // working around a SunPro 5.3 a prior bug (PR #28739)

Modified: stdcxx/trunk/include/rw/_specialized.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_specialized.h?rev=704438&r1=704437&r2=704438&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_specialized.h (original)
+++ stdcxx/trunk/include/rw/_specialized.h Tue Oct 14 03:30:16 2008
@@ -52,6 +52,11 @@
 #endif   // _RWSTD_RW_NEW_H_INCLUDED
 
 
+#ifndef _RWSTD_RW_ITERBASE_H_INCLUDED
+#  include <rw/_iterbase.h>
+#endif   // _RWSTD_RW_ITERBASE_H_INCLUDED
+
+
 _RWSTD_NAMESPACE (__rw) { 
 
 
@@ -162,10 +167,15 @@
                     _ForwardIterator __res)
 {
     const _ForwardIterator __start = __res;
+    typedef typename iterator_traits<_ForwardIterator>::value_type _TypeT;
 
     _TRY {
-        for (; __first != __last; ++__first, ++__res)
-            _RW::__rw_construct (&*__res, *__first);
+        for (; __first != __last; ++__first, ++__res) {
+            // avoid const-qualifying ptr to prevent an HP aCC 3 bug
+            volatile void* /* const */ __ptr =
+                _RWSTD_STATIC_CAST (volatile void*, &*__res);
+            ::new (_RWSTD_CONST_CAST (void*, __ptr)) _TypeT (*__first);
+        }
     }
     _CATCH (...) {
         _RW::__rw_destroy (__start, __res);

Modified: stdcxx/trunk/src/time_put.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/time_put.cpp?rev=704438&r1=704437&r2=704438&view=diff
==============================================================================
--- stdcxx/trunk/src/time_put.cpp (original)
+++ stdcxx/trunk/src/time_put.cpp Tue Oct 14 03:30:16 2008
@@ -706,12 +706,14 @@
 
         len = strftime (pbuf + off, bufsize - off, "%a", &t);
 
-        pun->abday_off [0][t.tm_wday]  = off;
+        pun->abday_off [0][t.tm_wday]  =
+            _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
         off                           += len + 1;
 
         len = strftime (pbuf + off, bufsize - off, "%A", &t);
 
-        pun->day_off [0][t.tm_wday]  = off;
+        pun->day_off [0][t.tm_wday]  =
+            _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
         off                         += len + 1;
 
 #  ifndef _RWSTD_NO_WCHAR_T
@@ -726,13 +728,14 @@
         wchar_t *pwbuf = _RWSTD_REINTERPRET_CAST (wchar_t*, pbuf + off);
         len = wcsftime (pwbuf, (bufsize - off) / sizeof (*pwbuf), L"%a", &t);
 
-        pun->abday_off [1][t.tm_wday]  = off;
+        pun->abday_off [1][t.tm_wday]  =
+            _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
         off                           += (len + 1) * sizeof (wchar_t);
 
         pwbuf = _RWSTD_REINTERPRET_CAST (wchar_t*, pbuf + off);
         len   = wcsftime (pwbuf, (bufsize - off) / sizeof (*pwbuf), L"%A", &t);
 
-        pun->day_off [1][t.tm_wday]  = off;
+        pun->day_off [1][t.tm_wday] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
         off                         += (len + 1) * sizeof (wchar_t);
 
 #    else   // if defined (_RWSTD_NO_WCSFTIME)
@@ -786,12 +789,13 @@
 
         len = strftime (pbuf + off, bufsize - off, "%b", &t);
 
-        pun->abmon_off [0][t.tm_mon]  = off;
+        pun->abmon_off [0][t.tm_mon]  = 
+            _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
         off                          += len + 1;
 
         len = strftime (pbuf + off, bufsize - off, "%B", &t);
 
-        pun->mon_off [0][t.tm_mon]  = off;
+        pun->mon_off [0][t.tm_mon]  = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
         off                        += len + 1;
 
 #  ifndef _RWSTD_NO_WCHAR_T
@@ -806,13 +810,14 @@
         wchar_t *pwbuf = _RWSTD_REINTERPRET_CAST (wchar_t*, pbuf + off);
         len = wcsftime (pwbuf, (bufsize - off) / sizeof (*pwbuf), L"%b", &t);
 
-        pun->abmon_off [1][t.tm_mon]  = off;
+        pun->abmon_off [1][t.tm_mon]  =
+            _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
         off                          += (len + 1) * sizeof (wchar_t);
 
         pwbuf = _RWSTD_REINTERPRET_CAST (wchar_t*, pbuf + off);
         len   = wcsftime (pwbuf, (bufsize - off) / sizeof (*pwbuf), L"%B", &t);
 
-        pun->mon_off [1][t.tm_mon]  = off;
+        pun->mon_off [1][t.tm_mon]  = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
         off                        += (len + 1) * sizeof (wchar_t);
 
 #    else   // if defined (_RWSTD_NO_WCSFTIME)
@@ -863,22 +868,22 @@
     // copy AM/PM designations
     t.tm_hour = 1;
     len = strftime (pbuf + off, bufsize - off, "%p", &t);
-    pun->am_pm_off [0][0] = off;
+    pun->am_pm_off [0][0] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off += len + 1;
     
     t.tm_hour = 13;
     len = strftime (pbuf + off, bufsize - off, "%p", &t);
-    pun->am_pm_off [0][1] = off;
+    pun->am_pm_off [0][1] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off += len + 1;
 
     // determine the locale's "%x" format (date representation)
     len                 = __rw_get_date_fmat (pbuf + off);
-    pun->d_fmt_off [0]  = off;
+    pun->d_fmt_off [0]  = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off                += len + 1;
     
     // determine the locale's "%X" format (time representation)
     len                 = __rw_get_time_fmat (pbuf + off);
-    pun->t_fmt_off [0]  = off;
+    pun->t_fmt_off [0]  = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off                += len + 1;
 
     // FIXME: determine "%r" at runtime (just like "%x" and "%X")
@@ -889,7 +894,7 @@
 
     len = sizeof t_fmt_ampm_fmat;
     memcpy (pbuf + off, t_fmt_ampm_fmat, len);
-    pun->t_fmt_ampm_off [0]  = off;
+    pun->t_fmt_ampm_off [0]  = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off                     += len;
 
     // FIXME: determine "%c" at runtime (just like "%x" and "%X"),
@@ -899,14 +904,14 @@
     static const char d_t_fmat[] = "%a %b %e %H:%M:%S %Y";
     len                  = sizeof d_t_fmat;
     memcpy (pbuf + off, d_t_fmat, len);
-    pun->d_t_fmt_off [0]  = off;
+    pun->d_t_fmt_off [0]  = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off                  += len;
 
     // FIXME: determine "%Ec", "%EX", "%Ex"
     pbuf [off]               = '\0';
-    pun->era_d_t_fmt_off [0] = off;
-    pun->era_d_fmt_off [0]   = off;
-    pun->era_t_fmt_off [0]   = off;
+    pun->era_d_t_fmt_off [0] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
+    pun->era_d_fmt_off [0]   = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
+    pun->era_t_fmt_off [0]   = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off                     += 1;
 
 #  ifndef _RWSTD_NO_WCHAR_T
@@ -924,13 +929,13 @@
     t.tm_hour = 1;
     pwbuf     = _RWSTD_REINTERPRET_CAST (wchar_t*, pbuf + off);
     len       = wcsftime (pwbuf, (bufsize - off) / sizeof (*pwbuf), L"%p", &t);
-    pun->am_pm_off [1][0] = off;
+    pun->am_pm_off [1][0] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off += (len + 1) * sizeof (wchar_t);
     
     t.tm_hour = 13;
     pwbuf     = _RWSTD_REINTERPRET_CAST (wchar_t*, pbuf + off);
     len       = wcsftime (pwbuf, (bufsize - off) / sizeof (*pwbuf), L"%p", &t);
-    pun->am_pm_off [1][1] = off;
+    pun->am_pm_off [1][1] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off += (len + 1) * sizeof (wchar_t);
 
 #    else   // if defined (_RWSTD_NO_WCSFTIME)
@@ -986,7 +991,7 @@
         size += 1;
     }
 
-    pun->d_fmt_off [1] = off;
+    pun->d_fmt_off [1] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off               += size * sizeof (wchar_t);
     
     // convert "%X" to its wide equivalent
@@ -1004,7 +1009,7 @@
         size += 1;
     }
 
-    pun->t_fmt_off [1] = off;
+    pun->t_fmt_off [1] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off               += size * sizeof (wchar_t);
 
     // convert "%c" to its wide equivalent
@@ -1022,7 +1027,7 @@
         size += 1;
     }
 
-    pun->d_t_fmt_off [1] = off;
+    pun->d_t_fmt_off [1] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off                 += size * sizeof (wchar_t);
 
     // convert "%r" to its wide equivalent
@@ -1040,7 +1045,7 @@
         size += 1;
     }
 
-    pun->t_fmt_ampm_off [1] = off;
+    pun->t_fmt_ampm_off [1] = _RWSTD_STATIC_CAST (_RWSTD_UINT32_T, off);
     off                    += size * sizeof (wchar_t);
 
 #  endif   // _RWSTD_NO_WCHAR_T



Mime
View raw message