stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r681826 [1/2] - in /stdcxx/trunk: ./ etc/config/ examples/manual/ include/ include/ansi/ include/loc/ include/rw/ src/ tests/containers/ tests/include/ tests/localization/ tests/regress/ tests/src/ tests/strings/ tests/utilities/ util/
Date Fri, 01 Aug 2008 21:09:47 GMT
Author: vitek
Date: Fri Aug  1 14:09:45 2008
New Revision: 681826

URL: http://svn.apache.org/viewvc?rev=681826&view=rev
Log:
2008-08-01  Travis Vitek  <vitek@roguewave.com>

	Merge r666742, r666829, r668632, r673164, r673573, r673978, r674008,
	r674023, r674069, r674236, r674441, r674550, r675269, r675315, r676077,
	r677756, r677764, r677770, r677777, r677789, r677783, r677791, r677800,
	r677810, r678003, r678239, r678483, r678619, r678905, r679241, r679246,
	r679601, r680049, r680050, r680051, r680545, r680756, r680775, r680791,
	r681102 from branches/4.2.x:


	2008-06-11  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-871
	* tests/include/rw_driver.h (rw_fatal):
	* tests/include/rw_printf.h (rw_sprintfa, rw_snprintfa): Add
	link to page containing specifications for formatting directives.
	* tests/include/rw_printf.h (rw_asnprintf): Removed old list of
	formatting directives.  Added more specifications for formatting
	directives to rwtest-fmtspec page and listed undocumented (i.e.
	complicated) formatting directives in a separate section so all
	directives are at least accounted for.


	2008-06-11  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-488
	* etc/config/gcc.config: Use rpath on Darwin 9 OR LATER VERSION.
	Do not use rpath on Darwin 8.


	2008-06-17  Farid Zaripov  <farid_zaripov@epam.com>

	* GNUmakefile: Add "narrow" mode to the build mode in 15d builds.


	2008-07-01  Travis Vitek  <vitek@roguewave.com>

	STDCXX-670
	* include/ansi/setjmp.h [!setjmp]: Define function macro setjmp.


	2008-07-02  Martin Sebor  <sebor@roguewave.com>

	STDCXX-986
	* doc/stdlibug/2-3.html (2.3.1 Input Stream Iterators): Corrected
	a typo in example code.


	2008-07-04  Farid Zaripov  <faridz@apache.com>

	* etc/config/makefile.rules: Define local shell variable
	TZ to export its value (to complete changes in rev. 561060).


	2008-07-04  Farid Zaripov  <faridz@apache.com>

	* tests/include/rw_file.h: Replaced _MSC_VER to _WIN32 in
	preprocessor directive to use correct file name on MinGW.


	2008-07-04  Farid Zaripov  <faridz@apache.com>

	* tests/src/printf.cpp (_rw_fmtfloating): Use workaround for
	MSVC on MinGW too since MinGW uses MSVC's runtime.


	2008-07-04  Farid Zaripov  <faridz@apache.com>

	* include/rw/_config-gcc.h [__MINGW32__]: Add MinGW specific defines.
	* tests/localization/22.locale.cons.mt.cpp (test_ctors): Use MSVC
	specific workarounds on MinGW too.
	* tests/localization/22.locale.time.put.cpp (rw_strftime): Ditto.
	* util/gencat.cpp [__MINGW32__] (main): Create message catalog dll's
	independent on cygwin1.dll.


	2008-07-05  Martin Sebor  <sebor@roguewave.com>

	* include/rw/_config-gcc.h: Corrected typos in comments.
	Added comments to clearly separate sections dealing with
	individual operating environments.


	2008-07-07  Farid Zaripov  <faridz@apache.com>

	* etc/config/makefile.rules: Added comment about TZ variable.


	2008-07-07  Martin Sebor  <sebor@roguewave.com>

	STDCXX-988
	* include/ansi/limits.h [__GNUG__]: Used #include_next twice to coax
	gcc's <limits.h> to pull in the system <limits.h> in order to #define
	POSIX and system macros.
	* tests/regress/18.c.limits.stdcxx-988.cpp: Regression test for
	STDCXX-988. Tested with gcc 4.1.2 and EDG eccp 3.9 on Fedora 8.


	2008-07-09  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-550
	* tests/utilities/20.operators.cpp (test_random_access_iterators):
	Account for debug iterators on HP-UX platforms.


	2008-07-09  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-550
	* tests/utilities/20.operators.cpp (test_random_access_iterator):
	Oops.  Should be `!defined' in #if directive.


	2008-07-11  Martin Sebor  <sebor@roguewave.com>

	* src/wcodecvt.cpp (size_t): Used type throughout in place of
	the _RWSTD_SIZE_T macro which is necessary in library headers.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	STDCXX-494
	* include/vector (vector): Removed Allocator base class, replacing
	it (in a binary compatible way) with a new member, _C_alloc, instead.
	(_C_value_alloc_type): Removed member typedef.
	(vector): Initialized the _C_alloc member instead of allocator_type
	in all class ctors.
	(~vector, begin, end, size, max_size, empty, swap): Referenced
	_C_begin, _C_end, and _C_bufend indirectly, via the new _C_alloc
	member.
	(pop_back, push_back): Used the new _C_alloc member to destroy
	and construct elements.
	* include/vector.cc (_C_realloc, _C_destroy, _C_insert_1,
	_C_insert_n, _C_insert_range): Same as above.
	* tests/regress/23.vector.stdcxx-494: Added regression test for
	the vector part of the issue.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* tests/regress/18.c.limits.stdcxx-988.cpp (main): Avoided testing
	macros for specific values to prevent failures on non-conforming
	systems.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* etc/config/xfail.txt: Copied from trunk.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* tests/regress/18.c.limits.stdcxx-988.cpp [HP aCC] (main): Avoided
	testing LLONG_MAX and LLONG_MIN unless 199901L <= __STDC_VERSION__
	(otherwise the macros are deliberately not defined).


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* test/strings/21.string.erase.cpp (test_erase): Cast actual
	function arguments to the target type to silence HP aCC 6.16
	remarks #4271-D: type conversion may lose sign.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	STDCXX-780
	* tests/include/rw_streambuf.h (test): Aasserted a precondition
	to silence HP aCC 6/cadvise warning #20206-D: Out of bound access.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* tests/containers/23.deque.modifiers.cpp (exception_loop): Converted
	a signed int to size_type to silence HP aCC 6 remark #4271-D: type
	conversion may lose sign.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	STDCXX-896
	* tests/containers/23.deque.modifiers.cpp (test_insert, test_assign):
	Cast away the constness of the target type before deleting a pointer
	to work around an HP aCC 6.16 bug.


	2008-07-18  Martin Sebor  <sebor@roguewave.com>

	* examples/manual/wctype.cpp: New example showcasing the wchar_t
	specialization of the std::ctype_byname facet along with the wide
	character classification functions, inspired by the following post
	to the Sun C++ discussion forum:
	http://forums.sun.com/thread.jspa?threadID=5315069.


	2008-07-19  Martin Sebor  <sebor@roguewave.com>

	STDCXX-997
	* src/strtol.cpp [__SUNPRO_CC] (__rw_strtol, __rw_strtoul): Used
	#pragma no_side_effects to help Sun C++ optimizer generate better
	code (about 5% improvement was measured).
	[__SUNPRO_CC && _RWSTD_LONG_LONG] (__rw_strtoll, __rw_strtoull):
	Same.


	2008-07-21  Eric Lemings  <eric.lemings@roguewave.com>

	STDCXX-808
	* tests/regress/27.streambuf.buffer.stdcxx-808.cpp: Add
	regression test case that has failed in previous releases.


	2008-07-21  Martin Sebor  <sebor@roguewave.com>

	STDCXX-999
	* NOTICE.txt: Updated year of copyright.


	2008-07-22  Eric Lemings  <eric.lemings@roguewave.com>

	STDCXX-808
	* tests/regress/27.streambuf.buffer.stdcxx-808.cpp: Add file
	header comment.


	2008-07-23  Martin Sebor  <sebor@roguewave.com>

	STDCXX-997
	* include/bitset [__SUNPRO_CC] (__rw_bitset, __rw_bit_count,
	__rw_shl, __rw_shr): Used #pragma no_side_effects to help the
	optimizer generate better code.


	2008-07-23  Martin Sebor  <sebor@roguewave.com>

	* include/bitset [__SUNPRO_CC] Spelled #pragma no_side_effect
	the same as in the manual (even if the compiler seems to grok
	it both ways).


	2008-07-26  Martin Sebor  <sebor@roguewave.com>

	STDCXX-998
	* include/rw/_defs.h [_RWSTD_ATTRIBUTE_NOTHROW] (_RWSTD_DECLARE_NOTHROW,
	_RWSTD_DEFINE_NOTHROW): Defined new helper macros to make it possible to
	declare functions with the attribute((nothrow)) when it's available and
	to use the empty exception specification to emulate the same feature
	when it isn't.
	(__rw_assert_fail): Used _RWSTD_DECLARE_NOTHROW.
	* include/rw/_config-gcc.h [gcc >= 3.3] (RWSTD_ATTRIBUTE_NOTHROW):
	Defined.


	2008-07-26  Martin Sebor  <sebor@roguewave.com>

	STDCXX-998
	* src/assert.cpp (U_STACK_TRACE, __rw_stack_trace, printstack,
	__rw_assert_fail): Declared nothrow.


	2008-07-26  Martin Sebor  <sebor@roguewave.com>

	STDCXX-998
	* src/strtol.h (__rw_strtol, __rw_strtoll): Declared nothrow.
	(__rw_strtoul, __rw_strtoull): Same.
	* src/strtol.cpp: Same.


	2008-07-28  Travis Vitek  <vitek@roguewave.com>

	* include/rw/_defs.h: Use _RWSTD_DECLARE_NOTHROW macro only after
	definition of _THROWS to avoid compile errors.


	2008-07-29  Martin Sebor  <sebor@roguewave.com>

	* include/loc/_moneypunct.h (~moneypunct): Explicitly declared
	to prevent the compiler from generating a definition (and vtable)
	in every translation unit that uses the class. Pursuant to
	STDCXX-998, made use of attribute((nothrow)) where available.
	* include/loc/_codecvt.h (~codecvt, ~codecvt_byname): Same.
	* include/loc/_collate.h (~collate, ~collate_byname): Same.
	* include/loc/_codecvt.cc (~codecvt, ~codecvt_byname): Defined.
	* include/loc/_moneypunct.cc (~moneypunct): Same.
	* include/loc/_collate.cc (~collate, ~collate_byname): Same.
	* src/collate.cpp (~collate, ~collate_byname): Same.
	* src/codecvt.cpp (~codecvt): Same.
	* src/wcodecvt.cpp (~codecvt, ~codecvt_byname): Defined.


	2008-07-29  Martin Sebor  <sebor@roguewave.com>

	* include/loc/_messages.h (~messages, ~messages_byname): Explicitly
	declared dtors to prevent the compiler from emitting function and
	vtable definition in every translation unit that uses the class.
	* include/loc/_money_put.h (~money_put): Same.
	* include/loc/_moneypunct.h (~moneypunct_byname): Same.
	* include/loc/_numpunct.h (~numpunct_byname): Same.
	* include/loc/_time_get.h (~time_get, ~time_get_byname): Same.
	* include/loc/_time_put.h (~time_put, ~time_put_byname): Same.
	* include/loc/_money_put.cc (~money_put): Defined.
	* include/loc/_time_get.cc (~time_get, ~time_get_byname): Same.
	* include/loc/_moneypunct.cc (~moneypunct_byname): Same.
	* include/loc/_messages.cc (~messages, ~messages_byname): Same.
	* include/loc/_numpunct.cc (~numpunct_byname): Same.
	* include/loc/_time_put.cc (~time_put, ~time_put_byname): Same.


	2008-07-29  Martin Sebor  <sebor@roguewave.com>

	* include/loc/_codecvt.h (codecvt_byname<char, char>): Added
	an explicit specialization to avoid having to explicitly
	instanting the primary template in order to emit the definition
	of (the now explicitly defined out-of-line, since rev 680756)
	virtual dtor needed in __rw::__rw_ct_codecvt().
	* src/codecvt.cpp (codecvt_byname<char, char>): Defined ctor
	and dtor.


	2008-07-30  Martin Sebor  <sebor@roguewave.com>

	* include/rw/_defs.h (_RWSTD_ATTRIBUTE_NOTHROW): Defined as a no-op
	when the attribute isn't supported by the compiler to make the macro
	portably usable.
	(__rw_assert_fail): Inverted the order of the function attribute
	and exception specification to prevent compiler errors.


Added:
    stdcxx/trunk/examples/manual/wctype.cpp
      - copied unchanged from r681237, stdcxx/branches/4.3.x/examples/manual/wctype.cpp
    stdcxx/trunk/tests/regress/18.c.limits.stdcxx-988.cpp
      - copied unchanged from r681237, stdcxx/branches/4.3.x/tests/regress/18.c.limits.stdcxx-988.cpp
    stdcxx/trunk/tests/regress/23.vector.stdcxx-494.cpp
      - copied unchanged from r681237, stdcxx/branches/4.3.x/tests/regress/23.vector.stdcxx-494.cpp
Modified:
    stdcxx/trunk/NOTICE.txt
    stdcxx/trunk/etc/config/gcc.config
    stdcxx/trunk/etc/config/makefile.rules
    stdcxx/trunk/include/ansi/limits.h
    stdcxx/trunk/include/ansi/setjmp.h
    stdcxx/trunk/include/bitset
    stdcxx/trunk/include/loc/_codecvt.cc
    stdcxx/trunk/include/loc/_codecvt.h
    stdcxx/trunk/include/loc/_collate.cc
    stdcxx/trunk/include/loc/_collate.h
    stdcxx/trunk/include/loc/_messages.cc
    stdcxx/trunk/include/loc/_messages.h
    stdcxx/trunk/include/loc/_money_put.cc
    stdcxx/trunk/include/loc/_money_put.h
    stdcxx/trunk/include/loc/_moneypunct.cc
    stdcxx/trunk/include/loc/_moneypunct.h
    stdcxx/trunk/include/loc/_numpunct.cc
    stdcxx/trunk/include/loc/_numpunct.h
    stdcxx/trunk/include/loc/_time_get.cc
    stdcxx/trunk/include/loc/_time_get.h
    stdcxx/trunk/include/loc/_time_put.cc
    stdcxx/trunk/include/loc/_time_put.h
    stdcxx/trunk/include/rw/_config-gcc.h
    stdcxx/trunk/include/rw/_defs.h
    stdcxx/trunk/include/vector
    stdcxx/trunk/include/vector.cc
    stdcxx/trunk/src/assert.cpp
    stdcxx/trunk/src/codecvt.cpp
    stdcxx/trunk/src/collate.cpp
    stdcxx/trunk/src/strtol.cpp
    stdcxx/trunk/src/strtol.h
    stdcxx/trunk/src/wcodecvt.cpp
    stdcxx/trunk/tests/containers/23.deque.modifiers.cpp
    stdcxx/trunk/tests/include/rw_driver.h
    stdcxx/trunk/tests/include/rw_file.h
    stdcxx/trunk/tests/include/rw_printf.h
    stdcxx/trunk/tests/include/rw_streambuf.h
    stdcxx/trunk/tests/localization/22.locale.cons.mt.cpp
    stdcxx/trunk/tests/localization/22.locale.time.put.cpp
    stdcxx/trunk/tests/src/printf.cpp
    stdcxx/trunk/tests/strings/21.string.erase.cpp
    stdcxx/trunk/tests/utilities/20.operators.cpp
    stdcxx/trunk/util/gencat.cpp

Modified: stdcxx/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/stdcxx/trunk/NOTICE.txt?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/NOTICE.txt (original)
+++ stdcxx/trunk/NOTICE.txt Fri Aug  1 14:09:45 2008
@@ -1,12 +1,12 @@
 Apache C++ Standard Library - stdcxx
 
-Copyright 2005-2007 The Apache Software Foundation.
+Copyright 2005-2008 The Apache Software Foundation.
 
 This product includes software developed at The Apache Software Foundation
 (http://www.apache.org/).
 
 Portions of this software were developed at Rogue Wave Software, Inc.,
-Copyright (c) 1994-2007.
+Copyright (c) 1994-2008.
 
 This software contains code derived from the HP Standard Template Library,
 Copyright (c) 1994 Hewlett-Packard Company.

Modified: stdcxx/trunk/etc/config/gcc.config
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/gcc.config?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/gcc.config (original)
+++ stdcxx/trunk/etc/config/gcc.config Fri Aug  1 14:09:45 2008
@@ -106,7 +106,7 @@
 -compatibility_version 4 -current_version $(LIBVER)
 
     # use appropriate install_name
-    ifeq ($(shell [ $(OS_MAJOR) -eq 9 ] && echo 1), 1)
+    ifeq ($(shell [ $(OS_MAJOR) -ge 9 ] && echo 1), 1)
         LDSOFLAGS += -install_name @rpath/$(LIBNAME)
     else
         LDSOFLAGS += -install_name $(LIBNAME)
@@ -207,7 +207,9 @@
 endif
 
 ifeq ($(OSNAME),Darwin)
-    RPATH = -Wl,-rpath,
+    ifeq ($(shell [ $(OS_MAJOR) -ge 9 ] && echo 1), 1)
+        RPATH = -Wl,-rpath,
+    endif
 endif
 
 # debug/optimization options

Modified: stdcxx/trunk/etc/config/makefile.rules
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/makefile.rules?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/makefile.rules (original)
+++ stdcxx/trunk/etc/config/makefile.rules Fri Aug  1 14:09:45 2008
@@ -158,6 +158,9 @@
 # creates and sets the POSIX TMPDIR environment variable to a temporary
 # directory before running the programs which is then removed when done
 #
+# The variable TZ is used in examples and initialized in GNUmakefile.exm
+# (see rev.561060)
+#
 # PlumHall specific:
 # for all "top level" tests that failed to build, find and build all
 # subtests (the little tests the main test consists of)
@@ -168,6 +171,7 @@
         PATH=$$PATH:.;                                                    \
         TOPDIR=$(TOPDIR);                                                 \
         TMPDIR=$${TMPDIR:-/tmp}/stdcxx-run-$$$$;                          \
+        TZ=$(TZ);                                                         \
         export LD_LIBRARY_PATH PATH TMPDIR TOPDIR TZ;                     \
         trap "rm -rf $$TMPDIR" HUP INT QUIT TERM EXIT;                    \
         mkdir -p $$TMPDIR;                                                \
@@ -181,6 +185,7 @@
         PATH=$$PATH:$(LIBDIR):$(BINDIR):.;                                \
         TOPDIR=$(TOPDIR);                                                 \
         TMPDIR=$${TMPDIR:-/tmp}/stdcxx-run-$$$$;                          \
+        TZ=$(TZ);                                                         \
         export LD_LIBRARY_PATH PATH TMPDIR TOPDIR TZ;                     \
         trap "rm -rf $$TMPDIR" HUP INT QUIT TERM EXIT;                    \
         mkdir -p $$TMPDIR;                                                \

Modified: stdcxx/trunk/include/ansi/limits.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/ansi/limits.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/ansi/limits.h (original)
+++ stdcxx/trunk/include/ansi/limits.h Fri Aug  1 14:09:45 2008
@@ -107,7 +107,12 @@
 #  endif
 
 #  ifdef __GNUC__
-     // use the gcc extension to #include the compiler's limits.h
+     // use the gcc extension to #include the compiler's <limits.h>
+#    include_next <limits.h>
+
+     // include the same file again to get it to #include the system
+     // <limits.h> (presumably residing /usr/include/)
+#    define _GCC_NEXT_LIMITS_H
 #    include_next <limits.h>
 #  else
 #    include _RWSTD_ANSI_C_LIMITS_H

Modified: stdcxx/trunk/include/ansi/setjmp.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/ansi/setjmp.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/ansi/setjmp.h (original)
+++ stdcxx/trunk/include/ansi/setjmp.h Fri Aug  1 14:09:45 2008
@@ -48,4 +48,8 @@
 #  include _RWSTD_ANSI_C_SETJMP_H
 #endif   // _RWSTD_NO_DEPRECATED_C_HEADERS
 
+#ifndef setjmp
+#  define setjmp(env) setjmp (env)
+#endif
+
 #endif   // _RWSTD_SETJMP_H_INCLUDED

Modified: stdcxx/trunk/include/bitset
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/bitset?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/bitset (original)
+++ stdcxx/trunk/include/bitset Fri Aug  1 14:09:45 2008
@@ -58,6 +58,10 @@
              _RWSTD_SIZE_T, _RWSTD_SIZE_T,
              const char*, const char*);
 
+#ifdef __SUNPRO_CC
+#  pragma no_side_effect (__rw_bitset)
+#endif   // Sun C++
+
 #ifndef _RWSTD_NO_WCHAR_T
 
 _RWSTD_SPECIALIZED_FUNCTION
@@ -68,6 +72,9 @@
              _RWSTD_SIZE_T, _RWSTD_SIZE_T,
              const char*, const char*);
 
+#  ifdef __SUNPRO_CC
+#    pragma no_side_effect (__rw_bitset)
+#  endif   // Sun C++
 #endif   // _RWSTD_NO_WCHAR_T
 
 // helper, implements bitset::count()
@@ -81,6 +88,10 @@
 _RWSTD_EXPORT void
 __rw_shr (unsigned long*, _RWSTD_SIZE_T, _RWSTD_SIZE_T) _THROWS (());
 
+#ifdef __SUNPRO_CC
+#  pragma no_side_effect (__rw_bit_count, __rw_shl, __rw_shr)
+#endif   // Sun C++
+
 }   // namespace __rw
 
 

Modified: stdcxx/trunk/include/loc/_codecvt.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_codecvt.cc?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_codecvt.cc (original)
+++ stdcxx/trunk/include/loc/_codecvt.cc Fri Aug  1 14:09:45 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -35,7 +35,26 @@
 template <class _InternT, class _ExternT, class _StateT>
 _RW::__rw_facet_id codecvt<_InternT, _ExternT, _StateT>::id;
 
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _InternT, class _ExternT, class _StateT>
+/* virtual */ codecvt<_InternT, _ExternT, _StateT>::
+~codecvt () /* nothrow */
+{
+    // no-op
+}
+
 #endif   // _RWSTD_NO_EXT_CODECVT_PRIMARY
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _InternT, class _ExternT, class _StateT>
+/* virtual */ codecvt_byname<_InternT, _ExternT, _StateT>::
+~codecvt_byname () /* nothrow */
+{
+    // no-op
+}
+
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_codecvt.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_codecvt.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_codecvt.h (original)
+++ stdcxx/trunk/include/loc/_codecvt.h Fri Aug  1 14:09:45 2008
@@ -120,6 +120,8 @@
 
     explicit codecvt (_RWSTD_SIZE_T __ref = 0): _RW::__rw_facet (__ref) { }
 
+    virtual ~codecvt () _RWSTD_ATTRIBUTE_NOTHROW;
+
     // 22,2,1,5,1, p1
     result out (state_type& __state,
                 const intern_type* __from, const intern_type* __from_end,
@@ -188,7 +190,7 @@
 
     explicit codecvt (_RWSTD_SIZE_T = 0);
 
-    virtual ~codecvt ();
+    virtual ~codecvt () _RWSTD_ATTRIBUTE_NOTHROW;
 
     result out (state_type &__state,
                 const intern_type *__from, const intern_type* __from_end,
@@ -332,6 +334,8 @@
 
     explicit codecvt (_RWSTD_SIZE_T = 0);
 
+    virtual ~codecvt () _RWSTD_ATTRIBUTE_NOTHROW;
+
     result out (state_type& __state,
                 const intern_type *__from, const intern_type *__from_end,
                 const intern_type *&__from_next,
@@ -398,9 +402,26 @@
         : codecvt <_InternT, _ExternT, _StateT> (__ref) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
+
+    virtual ~codecvt_byname () _RWSTD_ATTRIBUTE_NOTHROW;
+};
+
+
+_RWSTD_SPECIALIZED_CLASS
+class _RWSTD_EXPORT codecvt_byname<char, char, _RWSTD_MBSTATE_T>
+    : public codecvt<char, char, _RWSTD_MBSTATE_T>
+{
+    char _C_namebuf [32];
+
+public:
+
+    explicit codecvt_byname (const char*, _RWSTD_SIZE_T = 0);
+
+    virtual ~codecvt_byname () _RWSTD_ATTRIBUTE_NOTHROW;
 };
 
 
+
 #ifndef _RWSTD_NO_WCHAR_T
 
 _RWSTD_SPECIALIZED_CLASS
@@ -415,6 +436,8 @@
 
     explicit codecvt_byname (const char*, _RWSTD_SIZE_T = 0);
 
+    virtual ~codecvt_byname () _RWSTD_ATTRIBUTE_NOTHROW;
+
 protected:
 
     virtual codecvt_base::result

Modified: stdcxx/trunk/include/loc/_collate.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_collate.cc?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_collate.cc (original)
+++ stdcxx/trunk/include/loc/_collate.cc Fri Aug  1 14:09:45 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -35,6 +35,16 @@
 template <class _CharT>
 _RW::__rw_facet_id collate<_CharT>::id;
 
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT>
+/* virtual */ collate<_CharT>::
+~collate () /* nothrow */
+{
+    // no-op
+}
+
 #endif   // _RWSTD_NO_EXT_COLLATE_PRIMARY
 
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_collate.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_collate.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_collate.h (original)
+++ stdcxx/trunk/include/loc/_collate.h Fri Aug  1 14:09:45 2008
@@ -25,7 +25,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -66,6 +66,8 @@
     explicit collate (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~collate () _RWSTD_ATTRIBUTE_NOTHROW;
+
     int
     compare (const char_type* __low1, const char_type* __high1,
              const char_type* __low2, const char_type* __high2) const {
@@ -113,6 +115,8 @@
     explicit collate (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~collate () _RWSTD_ATTRIBUTE_NOTHROW;
+
     int
     compare (const char_type* __low1, const char_type* __high1,
              const char_type* __low2, const char_type* __high2) const {
@@ -156,9 +160,11 @@
                          allocator<char_type> >
     string_type;
 
-    explicit collate (_RWSTD_SIZE_T __refs = 0)
+    explicit collate (_RWSTD_SIZE_T __refs = 0) _THROWS (())
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~collate () _RWSTD_ATTRIBUTE_NOTHROW;
+
     int
     compare (const char_type* __low1, const char_type* __high1,
              const char_type* __low2, const char_type* __high2) const {
@@ -182,7 +188,7 @@
     virtual int
     do_compare (const char_type*, const char_type*,
                 const char_type*, const char_type*) const;
-        
+
     virtual string_type
     do_transform (const char_type*, const char_type*) const;
 
@@ -218,6 +224,8 @@
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
 
+    virtual ~collate_byname () _RWSTD_ATTRIBUTE_NOTHROW;
+
 protected:
 
     virtual int
@@ -242,6 +250,8 @@
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
 
+    virtual ~collate_byname () _RWSTD_ATTRIBUTE_NOTHROW;
+
 protected:
 
     virtual int

Modified: stdcxx/trunk/include/loc/_messages.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_messages.cc?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_messages.cc (original)
+++ stdcxx/trunk/include/loc/_messages.cc Fri Aug  1 14:09:45 2008
@@ -36,6 +36,16 @@
 _RW::__rw_facet_id messages<_CharT>::id;
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT>
+/* virtual */ messages<_CharT>::
+~messages ()
+{
+    // no-op
+}
+
+
 template <class _CharT>
 messages_base::catalog
 messages<_CharT>::
@@ -141,4 +151,14 @@
 }
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT>
+/* virtual */ messages_byname<_CharT>::
+~messages_byname ()
+{
+    // no-op
+}
+
+
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_messages.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_messages.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_messages.h (original)
+++ stdcxx/trunk/include/loc/_messages.h Fri Aug  1 14:09:45 2008
@@ -84,6 +84,7 @@
     explicit messages (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~messages () _RWSTD_ATTRIBUTE_NOTHROW;
 
     catalog open (const string& __fun, const locale& __loc) const {
         return do_open (__fun, __loc);
@@ -136,6 +137,8 @@
         : messages<_CharT>(__refs) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
+
+    virtual ~messages_byname () _RWSTD_ATTRIBUTE_NOTHROW;
 };
 
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_money_put.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_money_put.cc?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_money_put.cc (original)
+++ stdcxx/trunk/include/loc/_money_put.cc Fri Aug  1 14:09:45 2008
@@ -51,6 +51,16 @@
 _RW::__rw_facet_id money_put<_CharT, _OutputIter>::id;
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT, class _OutputIter>
+/* virtual */ money_put<_CharT, _OutputIter>::
+~money_put () /* nothrow */
+{
+    // no-op
+}
+
+
 template <class _CharT, class _OutputIter>
 /* private */ typename money_put<_CharT, _OutputIter>::iter_type
 money_put<_CharT, _OutputIter>::

Modified: stdcxx/trunk/include/loc/_money_put.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_money_put.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_money_put.h (original)
+++ stdcxx/trunk/include/loc/_money_put.h Fri Aug  1 14:09:45 2008
@@ -63,6 +63,8 @@
     explicit money_put (_RWSTD_SIZE_T __ref = 0)
         : _RW::__rw_facet (__ref) { }
 
+    virtual ~money_put () _RWSTD_ATTRIBUTE_NOTHROW;
+
     // 22.2.6.2.1, p1
     iter_type put (iter_type __it, bool __intl, ios_base &__flags,
                    char_type __fill, long double __val) const {

Modified: stdcxx/trunk/include/loc/_moneypunct.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_moneypunct.cc?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_moneypunct.cc (original)
+++ stdcxx/trunk/include/loc/_moneypunct.cc Fri Aug  1 14:09:45 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -40,4 +40,25 @@
 
 #endif   // _RWSTD_NO_STATIC_CONST_MEMBER_INIT
 
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT, bool _Intl>
+/* virtual */ moneypunct<_CharT, _Intl>::
+~moneypunct () /* nothrow */
+{
+    // no-op
+}
+
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT, bool _Intl>
+/* virtual */ moneypunct_byname<_CharT, _Intl>::
+~moneypunct_byname () /* nothrow */
+{
+    // no-op
+}
+
+
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_moneypunct.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_moneypunct.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_moneypunct.h (original)
+++ stdcxx/trunk/include/loc/_moneypunct.h Fri Aug  1 14:09:45 2008
@@ -25,7 +25,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -68,6 +68,8 @@
     explicit moneypunct (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~moneypunct () _RWSTD_ATTRIBUTE_NOTHROW;
+
     char_type decimal_point () const {
         return do_decimal_point ();
     }
@@ -211,6 +213,8 @@
         : moneypunct<_CharT, _Intl>(__ref) {
             this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
         }
+
+    virtual ~moneypunct_byname () _RWSTD_ATTRIBUTE_NOTHROW;
 };
 
 

Modified: stdcxx/trunk/include/loc/_numpunct.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_numpunct.cc?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_numpunct.cc (original)
+++ stdcxx/trunk/include/loc/_numpunct.cc Fri Aug  1 14:09:45 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -36,8 +36,11 @@
 _RW::__rw_facet_id numpunct<_CharT>::id;
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
 template <class _CharT>
-/* virtual */ numpunct<_CharT>::~numpunct ()
+/* virtual */ numpunct<_CharT>::
+~numpunct () /* nothrow */
 {
     // no-op
 }
@@ -45,4 +48,14 @@
 // #endif   // _RWSTD_NO_EXT_NUMPUNCT_PRIMARY
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT>
+/* virtual */ numpunct_byname<_CharT>::
+~numpunct_byname () /* nothrow */
+{
+    // no-op
+}
+
+
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_numpunct.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_numpunct.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_numpunct.h (original)
+++ stdcxx/trunk/include/loc/_numpunct.h Fri Aug  1 14:09:45 2008
@@ -238,6 +238,8 @@
         : numpunct<_CharT>(__refs) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
+
+    virtual ~numpunct_byname () _RWSTD_ATTRIBUTE_NOTHROW;
 };
 
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_time_get.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_time_get.cc?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_time_get.cc (original)
+++ stdcxx/trunk/include/loc/_time_get.cc Fri Aug  1 14:09:45 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -50,6 +50,16 @@
 _RW::__rw_facet_id time_get<_CharT, _InputIter>::id;
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT, class _InputIter>
+/* virtual */ time_get<_CharT, _InputIter>::
+~time_get ()
+{
+    // no-op
+}
+
+
 template <class _CharT, class _InputIter>
 typename time_get<_CharT, _InputIter>::iter_type
 time_get<_CharT, _InputIter>::
@@ -356,4 +366,14 @@
 }
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT, class _InputIter>
+/* virtual */ time_get_byname<_CharT, _InputIter>::
+~time_get_byname ()
+{
+    // no-op
+}
+
+
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_time_get.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_time_get.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_time_get.h (original)
+++ stdcxx/trunk/include/loc/_time_get.h Fri Aug  1 14:09:45 2008
@@ -75,6 +75,8 @@
     explicit time_get (_RWSTD_SIZE_T __ref = 0)
         : _RW::__rw_facet (__ref) { }
 
+    virtual ~time_get () _RWSTD_ATTRIBUTE_NOTHROW;
+
     dateorder date_order() const { 
         return do_date_order(); 
     }
@@ -207,6 +209,8 @@
         : time_get<_CharT, _InputIter>(__ref) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
+
+    virtual ~time_get_byname () _RWSTD_ATTRIBUTE_NOTHROW;
 };
 
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_time_put.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_time_put.cc?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_time_put.cc (original)
+++ stdcxx/trunk/include/loc/_time_put.cc Fri Aug  1 14:09:45 2008
@@ -60,6 +60,16 @@
 _RW::__rw_facet_id time_put<_CharT, _OutputIter>::id;
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT, class _InputIter>
+/* virtual */ time_put<_CharT, _InputIter>::
+~time_put ()
+{
+    // no-op
+}
+
+
 template <class _CharT, class _OutputIter /* = ostreambuf_iterator<_CharT> */ >
 /* virtual */ typename time_put<_CharT, _OutputIter>::iter_type
 time_put<_CharT, _OutputIter>::
@@ -173,4 +183,14 @@
 }
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT, class _OutputIter>
+/* virtual */ time_put_byname<_CharT, _OutputIter>::
+~time_put_byname ()
+{
+    // no-op
+}
+
+
 }   // namespace std

Modified: stdcxx/trunk/include/loc/_time_put.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/loc/_time_put.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/loc/_time_put.h (original)
+++ stdcxx/trunk/include/loc/_time_put.h Fri Aug  1 14:09:45 2008
@@ -61,6 +61,8 @@
     explicit time_put (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~time_put () _RWSTD_ATTRIBUTE_NOTHROW;
+
     // 22.2.5.3.1, p1
     iter_type put (iter_type, ios_base&, char_type, const tm*,
                    const char_type*, const char_type*) const;
@@ -106,6 +108,8 @@
         : time_put<_CharT, _OutputIter>(__ref) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
+
+    virtual ~time_put_byname () _RWSTD_ATTRIBUTE_NOTHROW;
 };
 
 }   // namespace std

Modified: stdcxx/trunk/include/rw/_config-gcc.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_config-gcc.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_config-gcc.h (original)
+++ stdcxx/trunk/include/rw/_config-gcc.h Fri Aug  1 14:09:45 2008
@@ -88,6 +88,13 @@
 // (it may still exit by throwing an exception or by calling longjmp)
 #define _RWSTD_ATTRIBUTE_NORETURN   _RWSTD_GNUC_ATTRIBUTE ((noreturn))
 
+#if __GNUG__ > 3 || __GNUG__ == 3 && __GNUC_MINOR__ >= 3
+  // gcc attribute((nothrow)) to indicate that a function doesn't throw
+  // exceptions; unlike the emtpy exception specification the attribute
+  // avoids the cost of checking for exceptions and calling unexpected()
+#  define _RWSTD_ATTRIBUTE_NOTHROW   _RWSTD_GNUC_ATTRIBUTE ((nothrow))
+#endif   // gcc >= 3.3
+
 #ifdef _RWSTD_OS_LINUX
 
 #  ifdef _RWSTD_NO_NEW_HEADER
@@ -123,6 +130,7 @@
 
 #undef _RWSTD_NO_DEPRECATED_LIBC_IN_STD
 
+/*** CygWin ***************************************************************/
 #ifdef __CYGWIN__
      // use our own C++ libc headers
 #  undef _RWSTD_NO_NEW_HEADER
@@ -134,7 +142,7 @@
 #  endif
 
 #  ifdef _RWSHARED
-     // disabe exporting timeplate instantations in shared builds
+     // disable exporting tmeplate instantiations in shared builds
      // see STDCXX-507
 #    define _RWSTD_NO_EXTERN_TEMPLATE
 
@@ -145,6 +153,22 @@
 #  endif
 #endif   // __CYGWIN__
 
+/*** MinGW ****************************************************************/
+#ifdef __MINGW32__
+#  ifdef _RWSHARED
+     // disable exporting temeplate instantiations in shared builds
+     // see STDCXX-507
+#    define _RWSTD_NO_EXTERN_TEMPLATE
+#  endif
+
+   // operator new and delete is not reliably replaceable across
+   // shared library boundaries, which includes the shared library
+   // version of the language support library
+   // on MinGW the language support library is always shared
+#  define _RWSTD_NO_REPLACEABLE_NEW_DELETE
+#endif   // __MINGW32__
+
+/*** Tru64 UNIX ***********************************************************/
 #ifdef _RWSTD_OS_OSF1
       // sizeof (long double) == sizeof (double), 'L' causes SIGSEGV
 #   define _RWSTD_LDBL_PRINTF_PREFIX   ""
@@ -152,6 +176,7 @@
 
 #endif   // _RWSTD_OS_OSF1
 
+/*** Solaris **************************************************************/
 #ifdef _RWSTD_OS_SUNOS
 
      // _SOLARIS_THREADS #defined when the -threads option is used on SunOS

Modified: stdcxx/trunk/include/rw/_defs.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_defs.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_defs.h (original)
+++ stdcxx/trunk/include/rw/_defs.h Fri Aug  1 14:09:45 2008
@@ -1113,40 +1113,6 @@
 #  define _RWSTD_ASSUME(expr)   _RWSTD_ASSERT (expr)
 #endif   // _RWSTD_ASSUME
 
-#ifndef _RWSTD_ATTRIBUTE_NORETURN
-   // gcc (and others) __attribute__ ((noreturn))
-#  define _RWSTD_ATTRIBUTE_NORETURN   /* empty */
-#endif   // _RWSTD_ATTR_NORETURN
-
-
-// compile-time assertion - asserts constant expressions during
-// compilation with no runtime overhead; failed assertions are reported
-// as compilation errors
-
-_RWSTD_NAMESPACE (__rw) { 
-
-// file may be #included from within an extern "C" block
-extern "C++" {
-
-template <bool __b>
-struct __rw_compile_assert;
-
-_RWSTD_SPECIALIZED_CLASS
-struct __rw_compile_assert<true> { enum { _C_ok }; };
-
-#define _RWSTD_COMPILE_ASSERT(const_expr) \
-        ((void)_RW::__rw_compile_assert<(const_expr)>::_C_ok)
-
-// called for failed assertions
-void _RWSTD_EXPORT
-__rw_assert_fail (const char*, const char*, int, const char*)
-    _RWSTD_ATTRIBUTE_NORETURN;
-
-}   // extern "C++"
-
-}   // namespace __rw
-
-
 #define _RWSTD_STR(x)       #x
 #define _RWSTD_STRSTR(x)    _RWSTD_STR(x)
 
@@ -1197,6 +1163,62 @@
 #endif   // _RWSTD_NO_EXCEPTION_SPECIFICATION_ON_NEW
 
 
+#ifndef _RWSTD_ATTRIBUTE_NORETURN
+   // gcc (and others) __attribute__ ((noreturn))
+#  define _RWSTD_ATTRIBUTE_NORETURN   /* empty */
+#endif   // _RWSTD_ATTR_NORETURN
+
+
+#ifdef _RWSTD_ATTRIBUTE_NOTHROW
+   // gcc (and others) __attribute__ ((nothrow))
+#  define _RWSTD_DECLARE_NOTHROW  _RWSTD_ATTRIBUTE_NOTHROW
+   // attributes cannot appear on function definitions
+#  define _RWSTD_DEFINE_NOTHROW   /* empty */
+#else
+   // make the macro usable even when it doesn't do anything
+#  define _RWSTD_ATTRIBUTE_NOTHROW /* empty */
+   // emulate using empty exception specifications which must
+   // be specified for both declarations and definitions
+#  define _RWSTD_DECLARE_NOTHROW  _THROWS(())
+#  define _RWSTD_DEFINE_NOTHROW   _THROWS(())
+#endif   // _RWSTD_ATTR_NORETURN
+
+
+// compile-time assertion - asserts constant expressions during
+// compilation with no runtime overhead; failed assertions are reported
+// as compilation errors
+
+_RWSTD_NAMESPACE (__rw) { 
+
+// file may be #included from within an extern "C" block
+extern "C++" {
+
+template <bool __b>
+struct __rw_compile_assert;
+
+_RWSTD_SPECIALIZED_CLASS
+struct __rw_compile_assert<true> { enum { _C_ok }; };
+
+#define _RWSTD_COMPILE_ASSERT(const_expr) \
+        ((void)_RW::__rw_compile_assert<(const_expr)>::_C_ok)
+
+// called for failed assertions
+void _RWSTD_EXPORT
+__rw_assert_fail (const char*, const char*, int, const char*)
+    _RWSTD_DECLARE_NOTHROW _RWSTD_ATTRIBUTE_NORETURN;
+
+
+
+#ifdef __SUNPRO_CC
+   // help Sun C++ optimizer generate better code
+#  pragma does_not_return (__rw_assert_fail)
+#endif   // __SUNPRO_CC
+
+}   // extern "C++"
+
+}   // namespace __rw
+
+
 // for convenience
 #if    !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)          \
     && (!defined (__SUNPRO_CC) || __SUNPRO_CC > 0x540)

Modified: stdcxx/trunk/include/vector
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/vector?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/vector (original)
+++ stdcxx/trunk/include/vector Fri Aug  1 14:09:45 2008
@@ -84,7 +84,7 @@
 
 _EXPORT
 template <class _TypeT, class _Allocator>
-class vector: private _Allocator
+class vector
 {
 public:
 
@@ -96,7 +96,6 @@
     typedef typename allocator_type::const_reference  const_reference;
     typedef typename allocator_type::pointer          pointer;
     typedef typename allocator_type::const_pointer    const_pointer;
-    typedef _RWSTD_ALLOC_TYPE (allocator_type, value_type) _C_value_alloc_type;
 
 public:
 
@@ -153,33 +152,32 @@
 
     explicit
     vector (const allocator_type &__alloc = allocator_type ())
-        : allocator_type (__alloc), _C_begin (), _C_end (), _C_bufend () { }
+        : _C_alloc (__alloc) { }
 
     explicit
     vector (size_type __n, const_reference __x = value_type (),
             const allocator_type &__alloc = allocator_type ())
-        : allocator_type (__alloc), _C_begin (), _C_end (), _C_bufend () {
+        : _C_alloc (__alloc) {
         assign (__n, __x);
     }
 
     template <class _InputIter>
     vector (_InputIter __first, _InputIter __last,
             const allocator_type &__alloc = allocator_type ())
-        : allocator_type (__alloc), _C_begin (), _C_end (), _C_bufend () {
+        : _C_alloc (__alloc) {
         assign (__first, __last);
     }
 
     vector (const vector &__rhs)
-        : allocator_type (__rhs.get_allocator ()),
-          _C_begin (), _C_end (), _C_bufend () {
+        : _C_alloc (__rhs.get_allocator ()) {
         assign (__rhs.begin (), __rhs.end ());
     }
     
     
     ~vector () { 
-        _C_destroy (begin ()); 
-        _RWSTD_VALUE_ALLOC (_C_value_alloc_type, *this,
-                            deallocate (_C_begin, _C_bufend - _C_begin));
+        _C_destroy (begin ());
+        _C_alloc.deallocate (_C_alloc._C_begin,
+                             _C_alloc._C_bufend - _C_alloc._C_begin);
     }
     
     vector& operator= (const vector&);
@@ -195,23 +193,23 @@
     }
 
     allocator_type get_allocator () const {
-        return *this;
+        return _C_alloc;
     }
     
     iterator begin () {
-        return _C_make_iter (_C_begin);
+        return _C_make_iter (_C_alloc._C_begin);
     }
 
     const_iterator begin () const {
-        return _C_make_iter (_C_begin);
+        return _C_make_iter (_C_alloc._C_begin);
     }
 
     iterator end () {
-        return _C_make_iter (_C_end);
+        return _C_make_iter (_C_alloc._C_end);
     }
 
     const_iterator end () const {
-        return _C_make_iter (_C_end);
+        return _C_make_iter (_C_alloc._C_end);
     }
     
     reverse_iterator rbegin () { 
@@ -231,21 +229,21 @@
     }
 
     size_type size () const {
-        return size_type (_C_end - _C_begin);
+        return size_type (_C_alloc._C_end - _C_alloc._C_begin);
     }
 
     size_type max_size () const {
-        return _RWSTD_VALUE_ALLOC (_C_value_alloc_type, *this, max_size ());
+        return _C_alloc.max_size ();
     }
     
     void resize (size_type, value_type = value_type ());
 
     size_type capacity () const {
-        return _C_bufend - _C_begin;
+        return _C_alloc._C_bufend - _C_alloc._C_begin;
     }
     
     bool empty () const {
-        return _C_begin == _C_end;
+        return _C_alloc._C_begin == _C_alloc._C_end;
     }
     
     void reserve (size_type);
@@ -282,8 +280,8 @@
     
     void pop_back () {
         _RWSTD_ASSERT (!empty ());
-        _RWSTD_VALUE_ALLOC (_C_value_alloc_type, *this, destroy (_C_end - 1));
-        --_C_end;
+        _C_alloc.destroy (_C_alloc._C_end - 1);
+        --_C_alloc._C_end;
     }
 
     iterator insert (iterator, const_reference);
@@ -381,11 +379,9 @@
 
     // constructs a copy at the end and grows the size of container
     void _C_push_back (const_reference __x) {
-        _RWSTD_ASSERT (_C_end != _C_bufend);
-
-        _RWSTD_VALUE_ALLOC (_C_value_alloc_type, *this,
-                            construct (_C_end, __x));
-        ++_C_end;
+        _RWSTD_ASSERT (_C_alloc._C_end != _C_alloc._C_bufend);
+        _C_alloc.construct (_C_alloc._C_end, __x);
+        ++_C_alloc._C_end;
     }
 
     // destroys elements from the iterator to the end of the vector
@@ -395,9 +391,16 @@
     // implements swap for objects with unequal allocator
     void _C_unsafe_swap (vector&);
 
-    pointer _C_begin;
-    pointer _C_end;
-    pointer _C_bufend;
+    struct _C_VectorAlloc: allocator_type {
+
+        _C_VectorAlloc (const allocator_type &__alloc)
+            : allocator_type (__alloc), _C_begin (), _C_end (), _C_bufend ()
+            { /* empty */}
+
+        pointer _C_begin;
+        pointer _C_end;
+        pointer _C_bufend;
+    } _C_alloc;
 };
 
 
@@ -495,12 +498,10 @@
 vector<_TypeT, _Allocator>::
 push_back (const_reference __x)
 {
-    if (_C_end == _C_bufend) {
+    if (_C_alloc._C_end == _C_alloc._C_bufend)
         _C_insert_1 (end (), __x);
-    }
-    else {
+    else
         _C_push_back (__x);
-    }
 }
 
 
@@ -535,8 +536,8 @@
     if (__next != end ()) 
         _STD::copy (__next, end (), __it);
 
-    _RWSTD_VALUE_ALLOC (_C_value_alloc_type, *this, destroy (_C_end - 1));
-    --_C_end;
+    _C_alloc.destroy (_C_alloc._C_end - 1);
+    --_C_alloc._C_end;
 
     return __it;
 }
@@ -572,15 +573,15 @@
 swap (vector &__other)
 {
     if (get_allocator () == __other.get_allocator ()) {
-        pointer __tmp    = _C_begin;
-        _C_begin         = __other._C_begin;
-        __other._C_begin = __tmp;
-        __tmp            = _C_end;
-        _C_end           = __other._C_end;
-        __other._C_end   = __tmp;
-        __tmp            = _C_bufend;
-        _C_bufend        = __other._C_bufend;
-        __other._C_bufend = __tmp;
+        pointer __tmp             = _C_alloc._C_begin;
+        _C_alloc._C_begin         = __other._C_alloc._C_begin;
+        __other._C_alloc._C_begin = __tmp;
+        __tmp                     = _C_alloc._C_end;
+        _C_alloc._C_end           = __other._C_alloc._C_end;
+        __other._C_alloc._C_end   = __tmp;
+        __tmp                     = _C_alloc._C_bufend;
+        _C_alloc._C_bufend        = __other._C_alloc._C_bufend;
+        __other._C_alloc._C_bufend = __tmp;
     }
     else {
         // not exception-safe

Modified: stdcxx/trunk/include/vector.cc
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/vector.cc?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/include/vector.cc (original)
+++ stdcxx/trunk/include/vector.cc Fri Aug  1 14:09:45 2008
@@ -82,20 +82,19 @@
     vector __tmp (get_allocator ());
 
     // allocate storage of requested capacity
-    __tmp._C_begin =
-        _RWSTD_VALUE_ALLOC (_C_value_alloc_type, __tmp,
-                            allocate (__cap, this));
+    __tmp._C_alloc._C_begin = _C_alloc.allocate (__cap, this);
 
     // initialize pointers
-    __tmp._C_end    = __tmp._C_begin;
-    __tmp._C_bufend = __tmp._C_begin + __cap;
+    __tmp._C_alloc._C_end    = __tmp._C_alloc._C_begin;
+    __tmp._C_alloc._C_bufend = __tmp._C_alloc._C_begin + __cap;
 
     // copy *this into the temporary one element at a time, as if
     // by calling std::unitialized_copy(), growing the temporary
     // at each iteration so that an exception thrown by the copy
     // ctor will cause the destruction of all already constructed
     // elements (by invoking the temporary's dtor)
-    for (pointer __ptr = _C_begin; !(__ptr == _C_end); ++__ptr) {
+    for (pointer __ptr = _C_alloc._C_begin; !(__ptr == _C_alloc._C_end);
+         ++__ptr) {
         __tmp._C_push_back (*__ptr);
     }
 
@@ -110,10 +109,8 @@
 {
     _RWSTD_ASSERT_RANGE (__first, end ());
 
-    _C_value_alloc_type __alloc = _RWSTD_VALUE_ALLOC_CAST (*this);
-
     for (size_type __n = end () - __first; !(0 == __n); --__n)
-        __alloc.destroy (--_C_end);
+        _C_alloc.destroy (--_C_alloc._C_end);
 }
 
 
@@ -170,12 +167,12 @@
 
         if (__it < end ()) {
 
-            const pointer __end = _C_end;
+            const pointer __end = _C_alloc._C_end;
 
             // construct a copy of the last element in the range [it, end)
             // in the uninitialized slot just past the end of the range
             // and bump up end()
-            _C_push_back (*(_C_end - difference_type (1)));
+            _C_push_back (*(_C_alloc._C_end - difference_type (1)));
 
             // move the remaining elements from the range above one slot
             // toward the end starting with the last element
@@ -218,36 +215,40 @@
         vector __tmp (get_allocator ());
         __tmp.reserve (__size2);
 
-        _RWSTD_ASSERT (!(pointer () == __tmp._C_end));
+        _RWSTD_ASSERT (!(pointer () == __tmp._C_alloc._C_end));
 
         iterator __i;
 
         // copy the initial range prior to `it' as if by a call to
-        // std::uninitialized_copy (begin (), __it, __tmp._C_begin);
+        // uninitialized_copy (begin (), __it, __tmp._C_alloc._C_begin);
         for (__i = begin (); !(__i == __it); ++__i) {
 
-            _RWSTD_ASSERT (!(__tmp._C_end == __tmp._C_bufend));
+            _RWSTD_ASSERT (!(   __tmp._C_alloc._C_end
+                             == __tmp._C_alloc._C_bufend));
 
             __tmp._C_push_back (*__i);
         }
 
         // construct `n' copies of `x' just past the initial range,
         // as if by a call to
-        // std::uninitialized_fill_n (__tmp._C_begin + __size1, __n, __x);
+        // uninitialized_fill_n (__tmp._C_aloc._C_begin + __size1, __n, __x);
         for ( ; __n; --__n) {
 
-            _RWSTD_ASSERT (!(__tmp._C_end == __tmp._C_bufend));
+            _RWSTD_ASSERT (!(   __tmp._C_alloc._C_end
+                             == __tmp._C_alloc._C_bufend));
 
             __tmp._C_push_back (__x);
         }
 
         // copy the final range of elements starting with `it'
         // as if by a call to
-        // uninitialized_copy (__it, end (), __tmp._C_begin + __size1 + __n);
+        // uninitialized_copy (__it, end (),
+        //                     __tmp._C_alloc._C_begin + __size1 + __n);
 
         for (__i = __it; !(__i == end ()); ++__i) {
 
-            _RWSTD_ASSERT (!(__tmp._C_end == __tmp._C_bufend));
+            _RWSTD_ASSERT (!(   __tmp._C_alloc._C_end
+                             == __tmp._C_alloc._C_bufend));
 
             __tmp._C_push_back (*__i);
         }
@@ -262,14 +263,12 @@
     // controlled by *this that need to be moved (copy contructed past
     // the end of the end of the sequence or assigned over existing
     // elements)
-    const pointer __movbeg = _C_begin + __size1;
+    const pointer __movbeg = _C_alloc._C_begin + __size1;
     const pointer __movend = __movbeg + __n;
 
     _RWSTD_ASSERT (_C_make_iter (__movbeg) == __it);
 
-    _C_value_alloc_type __alloc = _RWSTD_VALUE_ALLOC_CAST (*this);
-
-    if (__movend <= _C_end) {
+    if (__movend <= _C_alloc._C_end) {
 
         // the end of the range of existing elements after being
         // moved to make room for the elements to be inserted is
@@ -277,15 +276,16 @@
 
         // compute the beginning of the range of elements whose copies
         // will be constructed just past the current end of the sequence
-        const pointer __ucpbeg = _C_end - __n;
-        const pointer __ucpend = _C_end;
+        const pointer __ucpbeg = _C_alloc._C_end - __n;
+        const pointer __ucpend = _C_alloc._C_end;
 
         // construct copies of elements that will be moved beyond
         // the current end of the sequence controlled by *this
-        _STD::uninitialized_copy (__ucpbeg, _C_end, _C_end, __alloc);
+        _STD::uninitialized_copy (__ucpbeg, _C_alloc._C_end,
+                                  _C_alloc._C_end, _C_alloc);
 
         // advance end to maintain consistent state
-        _C_end += __n;
+        _C_alloc._C_end += __n;
 
         // copy elements the will be overwritten below
         // over the range of elements moved above
@@ -299,17 +299,17 @@
         const size_type __n1 = size () - __size1;
         const size_type __n2 = __n - __n1;
 
-        _STD::uninitialized_fill_n (_C_end, __n2, __x, __alloc);
+        _STD::uninitialized_fill_n (_C_alloc._C_end, __n2, __x, _C_alloc);
 
-        const pointer __end = _C_end;
+        const pointer __end = _C_alloc._C_end;
 
-        _C_end += __n2;
+        _C_alloc._C_end += __n2;
 
         // construct copies of the range of elements [pos, end)
         // past the end of the range of elements inserted above
-        _STD::uninitialized_copy (__movbeg, __end, _C_end, __alloc);
+        _STD::uninitialized_copy (__movbeg, __end, _C_alloc._C_end, _C_alloc);
 
-        _C_end += __end - __movbeg;
+        _C_alloc._C_end += __end - __movbeg;
 
         __n = __n1;
     }
@@ -323,8 +323,6 @@
 void vector<_TypeT, _Allocator>::
 _C_assign_range (_InputIter __first, _InputIter __last, input_iterator_tag)
 {
-    vector* const __self = this;
-
     _RWSTD_ASSERT_RANGE (__first, __last);
 
 #ifndef _RWSTD_NO_EXT_VECTOR_ASSIGN_IN_PLACE
@@ -343,17 +341,17 @@
     //    assignment operator and iterator operations do not throw
     // -- basic otherwise
 
-    const iterator __end = __self->end ();
+    const iterator __end = this->end ();
 
-    for (iterator __it = __self->begin (); __it != __end; ++__it, ++__first) {
+    for (iterator __it = this->begin (); __it != __end; ++__it, ++__first) {
         if (__first == __last) {
-            __self->erase (__it, __end);
+            this->erase (__it, __end);
             return;
         }
         *__it = *__first;
     }
 
-    __self->insert (__end, __first, __last);
+    this->insert (__end, __first, __last);
 
 #else   // if defined (_RWSTD_NO_EXT_VECTOR_ASSIGN_IN_PLACE)
 
@@ -363,8 +361,8 @@
     //    exactly distance(first, last) calls to value_type's copy ctor
     // exception safety: basic
 
-    __self->clear ();
-    __self->insert (__self->begin (), __first, __last);
+    this->clear ();
+    this->insert (this->begin (), __first, __last);
 
 #endif   // _RWSTD_NO_EXT_VECTOR_ASSIGN_IN_PLACE
 
@@ -376,8 +374,6 @@
 void vector<_TypeT, _Allocator>::
 _C_assign_range (_FwdIter __first, _FwdIter __last, forward_iterator_tag)
 {
-    vector* const __self = this;
-
     _RWSTD_ASSERT_RANGE (__first, __last);
 
 #ifndef _RWSTD_NO_EXT_VECTOR_ASSIGN_IN_PLACE
@@ -393,13 +389,13 @@
     // -- basic otherwise
 
     const size_type __size1 = _DISTANCE (__first, __last, size_type);
-    const size_type __size2 = __self->size () + __size1;
+    const size_type __size2 = this->size () + __size1;
 
-    if (__self->capacity () < __size2) {
+    if (this->capacity () < __size2) {
 
         // exception safety: strong
 
-        vector<value_type, allocator_type> __tmp (__self->get_allocator ());
+        vector<value_type, allocator_type> __tmp (this->get_allocator ());
         __tmp.reserve (__size2);
 
         // copy elements in the range [first, last) into the temporary
@@ -412,22 +408,22 @@
             __tmp._C_push_back (*__first);
 
         // swap *this with the temporary, having its dtor clean up
-        __self->swap (__tmp);
+        this->swap (__tmp);
     }
     else {
         // exception safety: nothrow or basic
 
-        const iterator __end = __self->end ();
+        const iterator __end = this->end ();
 
-        for (iterator __i = __self->begin (); __i != __end; ++__i, ++__first) {
+        for (iterator __i = this->begin (); __i != __end; ++__i, ++__first) {
             if (__first == __last) {
-                __self->erase (__i, __end);
+                this->erase (__i, __end);
                 return;
             }
             *__i = *__first;
         }
 
-        __self->insert (__end, __first, __last);
+        this->insert (__end, __first, __last);
     }
 
 #else   // if defined (_RWSTD_NO_EXT_VECTOR_ASSIGN_IN_PLACE)
@@ -437,8 +433,8 @@
     // complexity: linear in distance(first, last)
     // exception safety: basic
 
-    __self->clear ();
-    __self->insert (__self->begin (), __first, __last);
+    this->clear ();
+    this->insert (this->begin (), __first, __last);
 
 #endif   // _RWSTD_NO_EXT_VECTOR_ASSIGN_IN_PLACE
 
@@ -451,8 +447,6 @@
 _C_insert_range (iterator __it, _InputIter __first, _InputIter __last,
                  input_iterator_tag)
 {
-    vector* const __self = this;
-
     _RWSTD_ASSERT_RANGE (__it, end ());
     _RWSTD_ASSERT_RANGE (__first, __last);
 
@@ -467,34 +461,34 @@
     // append one element at a time to prevent the loss of data
     // from the input sequence in the case of an exception
 
-    const size_type __size = __self->size ();
-    const size_type __inx  = _DISTANCE (__self->begin (), __it, size_type);
+    const size_type __size = this->size ();
+    const size_type __inx  = _DISTANCE (this->begin (), __it, size_type);
 
     _RWSTD_ASSERT (__inx <= __size);
 
     for (; !(__first == __last); ++__first)
-        __self->push_back (*__first);
+        this->push_back (*__first);
 
     if (__inx < __size) {
         // swap the inserted elements with the elements before which
         // they should be inserted, as if by calling
-        // std::rotate (__beg, __mid, _C_end)
-        const pointer __beg = __self->_C_begin + __inx;
-        const pointer __mid = __self->_C_begin + __size;
+        // std::rotate (__beg, __mid, _C_alloc._C_end)
+        const pointer __beg = this->_C_alloc._C_begin + __inx;
+        const pointer __mid = this->_C_alloc._C_begin + __size;
 
         if (__beg < __mid) {
             for (pointer __p0 = __beg, __p1 = __mid; __p0 < --__p1; ++__p0)
                 _STD::iter_swap (__p0, __p1);
         }
 
-        if (__mid < __self->_C_end) {
-            for (pointer __p0 = __mid, __p1 = __self->_C_end;
+        if (__mid < this->_C_alloc._C_end) {
+            for (pointer __p0 = __mid, __p1 = this->_C_alloc._C_end;
                  __p0 < --__p1; ++__p0)
                 _STD::iter_swap (__p0, __p1);
         }
 
-        if (__beg < __self->_C_end) {
-            for (pointer __p0 = __beg, __p1 = __self->_C_end;
+        if (__beg < this->_C_alloc._C_end) {
+            for (pointer __p0 = __beg, __p1 = this->_C_alloc._C_end;
                  __p0 < --__p1; ++__p0)
                 _STD::iter_swap (__p0, __p1);
         }
@@ -515,14 +509,14 @@
     // insert input range into a temporary sequence rather than into *this
     // to coid modifying *this in case an exception (e.g., bad_alloc) is
     // thrown
-    vector<value_type, allocator_type> __tmp (__self->get_allocator ());
+    vector<value_type, allocator_type> __tmp (this->get_allocator ());
 
     for ( ; !(__first == __last); ++__first)
         __tmp.push_back (*__first);
 
     // insert into *this using a more efficient algorithm optimized
     // for BidirectionalIterator (and better)
-    __self->insert (__it, __tmp.begin (), __tmp.end ());
+    this->insert (__it, __tmp.begin (), __tmp.end ());
 
 #endif   // _RWSTD_NO_EXT_VECTOR_INSERT_IN_PLACE
 
@@ -535,8 +529,6 @@
 _C_insert_range (iterator __it, _FwdIter __first, _FwdIter __last,
                  forward_iterator_tag)
 {
-    vector* const __self = this;
-
     _RWSTD_ASSERT_RANGE (__it, end ());
     _RWSTD_ASSERT_RANGE (__first, __last);
 
@@ -544,7 +536,7 @@
     // unless the new size of the container would exceed its capacity
 
     // compute the sizes of the ranges of elements to be copied    
-    const size_type __size1 = _DISTANCE (__self->begin (), __it, size_type);
+    const size_type __size1 = _DISTANCE (this->begin (), __it, size_type);
     const size_type __size2 = _DISTANCE (__first, __last, size_type);
 
     if (!__size2)
@@ -552,7 +544,7 @@
 
 #ifndef _RWSTD_NO_EXT_VECTOR_INSERT_IN_PLACE
     const bool __insert_in_place =
-        __self->size () + __size2 <= __self->capacity ();
+        this->size () + __size2 <= this->capacity ();
 #else   // if defined (_RWSTD_NO_EXT_VECTOR_INSERT_IN_PLACE)
     const bool __insert_in_place = false;
 #endif   // _RWSTD_NO_EXT_VECTOR_INSERT_IN_PLACE
@@ -563,12 +555,12 @@
         // in the sequence controlled by *this that need to be moved
         // (copy contructed past the end of the end of the sequence
         // or assigned over existing elements)
-        const pointer __movbeg = __self->_C_begin + __size1;
+        const pointer __movbeg = this->_C_alloc._C_begin + __size1;
         const pointer __movend = __movbeg + __size2;
 
-        _RWSTD_ASSERT (__self->_C_make_iter (__movbeg) == __it);
+        _RWSTD_ASSERT (this->_C_make_iter (__movbeg) == __it);
 
-        const pointer __end = __self->_C_end;
+        const pointer __end = this->_C_alloc._C_end;
 
         if (__movend <= __end) {
             // compute the beginning of the range of elements whose copies
@@ -579,7 +571,7 @@
             // construct copies of elements that will be moved beyond
             // the current end of the sequence controlled by *this
             for (pointer __p = __ucpbeg; !(__p == __end); ++__p)
-                __self->_C_push_back (*__p);
+                this->_C_push_back (*__p);
 
             // over the range of elements moved above
             for (pointer __q = __end; __movend < __q; ) {
@@ -591,24 +583,24 @@
             // compute the length of the initial subsequence of the range
             // of elements being inserted that overlaps the end of the
             // sequence being inserted into
-            const size_type __size2a = __self->size () - __size1;
+            const size_type __size2a = this->size () - __size1;
             _FwdIter __mid = __first;
             _STD::advance (__mid, __size2a);
 
             // construct copies of the trailing subsequence of the range
             // of elements being inserted, as if by a call to
-            // std::uninitialized_copy (__mid, __last, _C_end);
+            // std::uninitialized_copy (__mid, __last, _C_alloc._C_end);
 
             for (_FwdIter __m = __mid ; !(__m == __last); ++__m)
-                __self->_C_push_back (*__m);
+                this->_C_push_back (*__m);
 
             // construct copies of the range of elements [pos, end)
             // past the end of the range of elements inserted above,
             // as if by a call to 
-            // std::uninitialized_copy (__movbeg, __end, _C_end);
+            // std::uninitialized_copy (__movbeg, __end, _C_alloc._C_end);
 
             for (pointer __p = __movbeg; !(__p == __end); ++__p)
-                __self->_C_push_back (*__p);
+                this->_C_push_back (*__p);
 
             __last = __mid;
         }
@@ -620,9 +612,9 @@
         // constructor or assignment operator of T there are no effects.
 
         // create a temporary vector and reserve sufficient space
-        vector<value_type, allocator_type> __tmp (__self->get_allocator ());
+        vector<value_type, allocator_type> __tmp (this->get_allocator ());
 
-        __tmp.reserve (__self->size () + __size2);
+        __tmp.reserve (this->size () + __size2);
 
         // avoid using the name __i or __it below so as not to trigger
         // a (bogus) gcc 2.95.2 -Wshadow warning: declaration of `__i'
@@ -635,7 +627,7 @@
         // iteration so that an exception thrown by the copy ctor
         // will cause the destruction of all already constructed
         // elements (by invoking the temporary's dtor)
-        for (__ix = __self->begin (); __ix != __it; ++__ix) {
+        for (__ix = this->begin (); __ix != __it; ++__ix) {
             __tmp._C_push_back (*__ix);
         }
 
@@ -647,12 +639,12 @@
         }
 
         // copy the remaining elements from *this
-        for ( ; __ix != __self->end (); ++__ix) {
+        for ( ; __ix != this->end (); ++__ix) {
             __tmp._C_push_back (*__ix);
         }
 
         // swap *this with the temporary, having its dtor clean up
-        __self->swap (__tmp);
+        this->swap (__tmp);
     }
 }
 

Modified: stdcxx/trunk/src/assert.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/assert.cpp?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/src/assert.cpp (original)
+++ stdcxx/trunk/src/assert.cpp Fri Aug  1 14:09:45 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -37,7 +37,7 @@
 
 #ifdef __HP_aCC
 
-extern "C" void U_STACK_TRACE ();
+extern "C" void U_STACK_TRACE () _RWSTD_DECLARE_NOTHROW;
 
 #  define STACK_TRACE   U_STACK_TRACE
 
@@ -47,8 +47,14 @@
 
 _RWSTD_NAMESPACE (__rw) {
 
+// declare with attribute((nothrow)) since the function calls
+// others that may not be declared nothrow
 static void
-__rw_stack_trace (int fd)
+__rw_stack_trace (int fd) _RWSTD_DECLARE_NOTHROW;
+
+
+static void
+__rw_stack_trace (int fd) _RWSTD_DEFINE_NOTHROW
 {
     // limit stacktrace to the depth of 256 calls
     void* array [256];
@@ -70,7 +76,7 @@
 // having to #define enabling macros (i.e., __EXTENSIONS__) and deal
 // with the breakage when using a strict compiler such as EDG eccp
 // with the long long extension (used in some system headers) disabled
-extern "C" int printstack (int);
+extern "C" int printstack (int) _RWSTD_DECLARE_NOTHROW;
 
 #    define STACK_TRACE()   printstack (2)
 #endif
@@ -86,6 +92,7 @@
 _RWSTD_EXPORT void
 __rw_assert_fail (const char *expr,
                   const char *file, int line, const char *func)
+     _RWSTD_DEFINE_NOTHROW
 {
     // func may be 0 if the compiler doesn't support the ANSI C predefined
     // identifier `__func__' (see 6.4.2.2 of ISO/IEC 9899:1999) or an

Modified: stdcxx/trunk/src/codecvt.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/codecvt.cpp?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/src/codecvt.cpp (original)
+++ stdcxx/trunk/src/codecvt.cpp Fri Aug  1 14:09:45 2008
@@ -105,7 +105,10 @@
 }
 
 
-/* virtual */ codecvt<char, char, _RWSTD_MBSTATE_T>::~codecvt ()
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ codecvt<char, char, _RWSTD_MBSTATE_T>::
+~codecvt ()
 {
     // no-op
 }
@@ -265,6 +268,23 @@
 }
 
 
+codecvt_byname<char, char, _RWSTD_MBSTATE_T>::
+codecvt_byname (const char *name, size_t ref)
+    : codecvt <intern_type, extern_type, state_type> (ref)
+{
+    _C_set_name (name, _C_namebuf, sizeof _C_namebuf);
+}
+
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ codecvt_byname<char, char, _RWSTD_MBSTATE_T>::
+~codecvt_byname ()
+{
+    // no-op
+}
+
+
 }   // namespace std
 
 #define TARGS_C   <char, char, _RWSTD_MBSTATE_T>

Modified: stdcxx/trunk/src/collate.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/collate.cpp?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/src/collate.cpp (original)
+++ stdcxx/trunk/src/collate.cpp Fri Aug  1 14:09:45 2008
@@ -787,7 +787,7 @@
 
 
 template <class _CharT>
-long __rw_hash (const _CharT *lo, const _CharT *hi)
+long __rw_hash (const _CharT *lo, const _CharT *hi) _THROWS (())
 {
     // Peter Weinberger's generic hashing algorithm, adapted by Andrew
     // Binstock from a version by Allen Holub (see Andrew Binstock,
@@ -843,6 +843,15 @@
 _RW::__rw_facet_id collate<char>::id;
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ collate<char>::
+~collate () /* nothrow */
+{
+    // no-op
+}
+
+
 int collate<char>::
 do_compare (const char_type *__lo1, const char_type *__hi1,
             const char_type *__lo2, const char_type *__hi2) const
@@ -888,6 +897,15 @@
 }
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ collate_byname<char>::
+~collate_byname () /* nothrow */
+{
+    // no-op
+}
+
+
 int collate_byname<char>::
 do_compare (const char* low1, const char* high1,
             const char* low2, const char* high2) const
@@ -996,6 +1014,15 @@
 _RW::__rw_facet_id collate<wchar_t>::id;
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ collate<wchar_t>::
+~collate () /* nothrow */
+{
+    // no-op
+}
+
+
 int collate<wchar_t>::
 do_compare (const char_type *__lo1, const char_type *__hi1,
             const char_type *__lo2, const char_type *__hi2) const
@@ -1062,6 +1089,15 @@
 }
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ collate_byname<wchar_t>::
+~collate_byname () /* nothrow */
+{
+    // no-op
+}
+
+
 int collate_byname<wchar_t>::
 do_compare (const wchar_t* low1, const wchar_t* high1,
             const wchar_t* low2, const wchar_t* high2) const

Modified: stdcxx/trunk/src/strtol.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/strtol.cpp?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/src/strtol.cpp (original)
+++ stdcxx/trunk/src/strtol.cpp Fri Aug  1 14:09:45 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -192,7 +192,7 @@
 
 
 unsigned long
-__rw_strtoul (const char *nptr, int *errptr, int base)
+__rw_strtoul (const char *nptr, int *errptr, int base) _THROWS (())
 {
     _RWSTD_ASSERT (0 != nptr);
     _RWSTD_ASSERT (0 != errptr);
@@ -395,7 +395,7 @@
 
 
 long
-__rw_strtol (const char *nptr, int *errptr, int base)
+__rw_strtol (const char *nptr, int *errptr, int base) _THROWS (())
 {
     _RWSTD_ASSERT (0 != nptr);
     _RWSTD_ASSERT (0 != errptr);
@@ -626,7 +626,7 @@
 #  if (_RWSTD_LONG_SIZE < _RWSTD_LLONG_SIZE)
 
 ULLong
-__rw_strtoull (const char *nptr, int *errptr, int base)
+__rw_strtoull (const char *nptr, int *errptr, int base) _THROWS (())
 {
     _RWSTD_ASSERT (0 != nptr);
     _RWSTD_ASSERT (0 != errptr);
@@ -813,7 +813,7 @@
 
 
 LLong
-__rw_strtoll (const char *nptr, int *errptr, int base)
+__rw_strtoll (const char *nptr, int *errptr, int base) _THROWS (())
 {
     _RWSTD_ASSERT (0 != nptr);
     _RWSTD_ASSERT (0 != errptr);

Modified: stdcxx/trunk/src/strtol.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/strtol.h?rev=681826&r1=681825&r2=681826&view=diff
==============================================================================
--- stdcxx/trunk/src/strtol.h (original)
+++ stdcxx/trunk/src/strtol.h Fri Aug  1 14:09:45 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -35,11 +35,14 @@
 _RWSTD_EXPORT extern const unsigned char
 __rw_digit_map[];
 
+
+// same as strtoul() except that the source sequence must start
+// with a sign (either '+' or '-')
 unsigned long
- __rw_strtoul (const char*, int*, int);
+__rw_strtoul (const char*, int*, int) _THROWS (());
 
 long
- __rw_strtol (const char*, int*, int);
+__rw_strtol (const char*, int*, int) _THROWS (());
 
 
 #ifdef _RWSTD_LONG_LONG
@@ -49,7 +52,7 @@
 #  if (_RWSTD_LLONG_SIZE <= _RWSTD_LONG_SIZE)
 
 inline unsigned _RWSTD_LONG_LONG
-__rw_strtoull (const char *nptr, int *errptr, int base)
+__rw_strtoull (const char *nptr, int *errptr, int base) _THROWS (())
 {
     _RWSTD_ASSERT (sizeof (_RWSTD_LONG_LONG) == sizeof (long));
 
@@ -58,7 +61,7 @@
 
 
 inline _RWSTD_LONG_LONG
-__rw_strtoll (const char *nptr, int *errptr, int base)
+__rw_strtoll (const char *nptr, int *errptr, int base) _THROWS (())
 {
     _RWSTD_ASSERT (sizeof (_RWSTD_LONG_LONG) == sizeof (long));
 
@@ -68,13 +71,29 @@
 #  else   // if (_RWSTD_LLONG_SIZE > _RWSTD_LONG_SIZE)
 
 unsigned _RWSTD_LONG_LONG
-__rw_strtoull (const char*, int*, int);
+__rw_strtoull (const char*, int*, int) _THROWS (());
 
 _RWSTD_LONG_LONG
-__rw_strtoll (const char*, int*, int);
+__rw_strtoll (const char*, int*, int) _THROWS (());
 
 #  endif   // _RWSTD_LLONG_SIZE <= _RWSTD_LONG_SIZE
 #endif   // _RWSTD_LONG_LONG
 
 
+#ifdef __SUNPRO_CC
+
+   // tell the Sun C++ optimizer that the functions do not access
+   // for reading or writing any part of the program state (either
+   // visible at in the caller at the point of the call, or not)
+#  pragma no_side_effect (__rw_strtoul)
+#  pragma no_side_effect (__rw_strtol)
+
+#  ifdef _RWSTD_LONG_LONG
+#    pragma no_side_effect (__rw_strtoull)
+#    pragma no_side_effect (__rw_strtoll)
+#  endif   // _RWSTD_LONG_LONG
+
+#endif   // Sun C++
+
+
 }   // namespace __rw



Mime
View raw message