stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r651095 - in /stdcxx/branches/4.2.x/tests/localization: 22.locale.money.put.cpp 22.locale.moneypunct.cpp
Date Wed, 23 Apr 2008 22:50:34 GMT
Author: sebor
Date: Wed Apr 23 15:50:27 2008
New Revision: 651095

URL: http://svn.apache.org/viewvc?rev=651095&view=rev
Log:
2008-04-23  Martin Sebor  <sebor@roguewave.com>

	STDCXX-771
	* test/localization/22.locale.money.put.cpp (run_test): Used volatile
	to conceal division by zero from optimizers and to silence HP aCC 6
	warning #20010-D: Floating-point DIVIDE BY ZERO exception generated.
	* test/localization/22.locale.moneypunct.cpp (lconvdup): Used
	operator new instead of the new expression to allocate a type-less
	block of memory.
	(check_moneypunct): Deallocated the block of memory allocated in
	lconvdup() using the matching operator delete() to silence HP aCC
	warning #20210-D: Mismatch in allocation and deallocation.

Modified:
    stdcxx/branches/4.2.x/tests/localization/22.locale.money.put.cpp
    stdcxx/branches/4.2.x/tests/localization/22.locale.moneypunct.cpp

Modified: stdcxx/branches/4.2.x/tests/localization/22.locale.money.put.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/localization/22.locale.money.put.cpp?rev=651095&r1=651094&r2=651095&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/localization/22.locale.money.put.cpp (original)
+++ stdcxx/branches/4.2.x/tests/localization/22.locale.money.put.cpp Wed Apr 23 15:50:27 2008
@@ -833,7 +833,7 @@
 run_test (int, char*[])
 {
     // check to see if we can test -0.0
-    static double d = -0.0;
+    static volatile double d = -0.0;
     test_neg_zero = 1.0 / d < d;
     
     if (no_grouping)

Modified: stdcxx/branches/4.2.x/tests/localization/22.locale.moneypunct.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/localization/22.locale.moneypunct.cpp?rev=651095&r1=651094&r2=651095&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/localization/22.locale.moneypunct.cpp (original)
+++ stdcxx/branches/4.2.x/tests/localization/22.locale.moneypunct.cpp Wed Apr 23 15:50:27
2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1998-2006 Rogue Wave Software.
+ * Copyright 1998-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -75,7 +75,9 @@
         + positive_sign_sz
         + negative_sign_sz;
 
-    char *pbuf = new char [sizeof (std::lconv) + total_sz];
+    const std::size_t bufsize = sizeof (std::lconv) + total_sz;
+
+    char *pbuf = _RWSTD_STATIC_CAST (char*, operator new (bufsize));
 
     std::lconv *plconv2 = _RWSTD_REINTERPRET_CAST (std::lconv*, pbuf);
 
@@ -429,7 +431,7 @@
         check_format (*plconv);
 
         // cast away constness to work around compiler bugs (e.g., MSVC 6)
-        delete _RWSTD_CONST_CAST (std::lconv*, plconv);
+        operator delete (_RWSTD_CONST_CAST (std::lconv*, plconv));
     }
     _CATCH (...) {
         return false;



Mime
View raw message