Author: vitek
Date: Tue Aug  5 10:58:03 2008
New Revision: 682839

URL: http://svn.apache.org/viewvc?rev=682839&view=rev
Log:
2008-08-05  Travis Vitek  <[EMAIL PROTECTED]>

        Merge r682834, r682835 from branches/4.2.x:


        2008-08-05  Travis Vitek  <[EMAIL PROTECTED]>

        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  <[EMAIL PROTECTED]>

        * 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/trunk/tests/regress/21.string.append.stdcxx-438.cpp
    stdcxx/trunk/tests/support/18.exception.cpp
    stdcxx/trunk/tests/utilities/20.function.objects.cpp

Modified: stdcxx/trunk/tests/regress/21.string.append.stdcxx-438.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/tests/regress/21.string.append.stdcxx-438.cpp?rev=682839&r1=682838&r2=682839&view=diff
==============================================================================
--- stdcxx/trunk/tests/regress/21.string.append.stdcxx-438.cpp (original)
+++ stdcxx/trunk/tests/regress/21.string.append.stdcxx-438.cpp Tue Aug  5 
10:58:03 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/trunk/tests/support/18.exception.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/tests/support/18.exception.cpp?rev=682839&r1=682838&r2=682839&view=diff
==============================================================================
--- stdcxx/trunk/tests/support/18.exception.cpp (original)
+++ stdcxx/trunk/tests/support/18.exception.cpp Tue Aug  5 10:58:03 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/trunk/tests/utilities/20.function.objects.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.function.objects.cpp?rev=682839&r1=682838&r2=682839&view=diff
==============================================================================
--- stdcxx/trunk/tests/utilities/20.function.objects.cpp (original)
+++ stdcxx/trunk/tests/utilities/20.function.objects.cpp Tue Aug  5 10:58:03 
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);


Reply via email to