stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r682837 - in /stdcxx/branches/4.3.x/tests: regress/21.string.append.stdcxx-438.cpp support/18.exception.cpp utilities/20.function.objects.cpp
Date Tue, 05 Aug 2008 17:56:58 GMT
Author: vitek
Date: Tue Aug  5 10:56:58 2008
New Revision: 682837

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

	Merge r682834, r682835 from branches/4.2.x:


	2008-08-05  Travis Vitek  <vitek@roguewave.com>

	STDCXX-772
	* tests/utilities/20.function.objects.cpp [__GNUG__]: Enable
	gcc specific workaround only for gcc-2.95 to silence bogus
	HP aCC 6/cadvise warning #20035-D.


	2008-08-05  Travis Vitek  <vitek@roguewave.com>

	* tests/regress/21.string.append.stdcxx-438.cpp: Check pointer
	to silence HP aCC 6/cadvise warning #20035-D.
	* tests/support/18.exception.cpp (induce_exception): Provide
	deallocation code to avoid HP aCC 6/cadvise warning #20201-D.


Modified:
    stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp
    stdcxx/branches/4.3.x/tests/support/18.exception.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.function.objects.cpp

Modified: stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp?rev=682837&r1=682836&r2=682837&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp (original)
+++ stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp Tue Aug  5 10:56:58
2008
@@ -39,6 +39,9 @@
 void* operator new (std::size_t n) throw (std::bad_alloc)
 {
     void* const ptr = std::malloc (n + sizeof n);
+    if (!ptr)
+        return 0;
+
     std::memset (ptr, -1, n);
     *(std::size_t*)ptr = n;
     return (std::size_t*)ptr + 1;

Modified: stdcxx/branches/4.3.x/tests/support/18.exception.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/support/18.exception.cpp?rev=682837&r1=682836&r2=682837&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/support/18.exception.cpp (original)
+++ stdcxx/branches/4.3.x/tests/support/18.exception.cpp Tue Aug  5 10:56:58 2008
@@ -803,7 +803,9 @@
             // try to allocate a huge amount of memory to induce bad_alloc
             const std::size_t huge_amount = _RWSTD_SIZE_MAX - 4096;
 
-            ::operator new (huge_amount);
+            void * const p = ::operator new (huge_amount);
+
+            ::operator delete (p);
 
 #  ifndef _RWSTD_NO_SETRLIMIT
 #    if !defined (__HP_aCC)

Modified: stdcxx/branches/4.3.x/tests/utilities/20.function.objects.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.function.objects.cpp?rev=682837&r1=682836&r2=682837&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.function.objects.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.function.objects.cpp Tue Aug  5 10:56:58 2008
@@ -501,12 +501,16 @@
 
 #undef CTOR_ARG_LIST
 
+#if defined __GNUG__ && __GNUG__ < 3 && __GNU_MINOR__ < 96
     // broken out of the macro definition to work around
     // a bug in g++ 2.95.2 parser
     std::minus<int> obj_minus;
 
-// use std::negate<> as an argument in negator ctors
-#define CTOR_ARG_LIST (obj_minus, 1)
+   // use std::negate<> as an argument in negator ctors
+#  define CTOR_ARG_LIST (obj_minus, 1)
+#else
+#  define CTOR_ARG_LIST (std::minus<int>(), 1)
+#endif
 
     // 20.3.6.1, p1 and p2
     TEST_UNARY_OP (binder1st<std::minus<int> >, 1 -, 0);



Mime
View raw message