You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/09/13 01:49:07 UTC

svn commit: r575128 - /incubator/stdcxx/trunk/include/vector

Author: sebor
Date: Wed Sep 12 16:49:06 2007
New Revision: 575128

URL: http://svn.apache.org/viewvc?rev=575128&view=rev
Log:
2007-09-12  Martin Sebor  <se...@roguewave.com>

	STDCXX-545
	* vector (vector<bool>::_C_iter): Explicitly defined a copy ctor
	for the nested class to work around a Sun C++ optimizer (ube) ICE
	on x86_64.

Modified:
    incubator/stdcxx/trunk/include/vector

Modified: incubator/stdcxx/trunk/include/vector
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/vector?rev=575128&r1=575127&r2=575128&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/vector (original)
+++ incubator/stdcxx/trunk/include/vector Wed Sep 12 16:49:06 2007
@@ -23,7 +23,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2007 Rogue Wave Software, Inc.
  *
  ***************************************************************************
  *
@@ -843,10 +843,17 @@
         // On Sun, gcc 3.1 does generate an incorrect copy constructor
         // that has as an effect an incompletely/incorrectly initialized 
         // iterator.
-#if defined (__sun__) && defined (__GNUG__) 
+#if    defined (__sun__) && defined (__GNUG__) \
+    || defined (__SUNPRO_CC) && defined (__amd64__)
+
+        // working around a gcc 3.1 bug on Solaris where the compiler
+        // generates bad code for the implicitly defined copy ctor
+        // also working around a Sun C++ 5.9 optimizer ICE on x86_64
+        // in wide (64-bit) mode (see STDCXX-551)
+
         _C_iter (const _C_iter& __it)
             : _C_p (__it._C_p), _C_offset (__it._C_offset) {}
-#endif // __GNUG__
+#endif   // gcc 3.1/Solaris || Sun C++ 5.9/x86_64
 
         void operator++ () {
             if (_C_offset++ == _RWSTD_WORD_BIT - 1) {