Author: sebor
Date: Mon Mar 31 16:27:56 2008
New Revision: 643207
URL: http://svn.apache.org/viewvc?rev=643207&view=rev
Log:
2008-03-31 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-818
* tests/iostream/27.objects.cpp (operator new): Avoid calling rw_warn()
except when it has something to warn about in case operator new() is
being called by the compiler's C++ runtime (e.g., HP aCC 6.16) before
the driver has been initialized (otherwise the driver aborts).
Modified:
stdcxx/trunk/tests/iostream/27.objects.cpp
Modified: stdcxx/trunk/tests/iostream/27.objects.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/trunk/tests/iostream/27.objects.cpp?rev=643207&r1=643206&r2=643207&view=diff
==============================================================================
--- stdcxx/trunk/tests/iostream/27.objects.cpp (original)
+++ stdcxx/trunk/tests/iostream/27.objects.cpp Mon Mar 31 16:27:56 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 2000-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -363,8 +363,16 @@
rw_note (noted++, 0, __LINE__,
"test of replacement operator new disabled");
}
- else if (rw_warn (1 == recursion, 0, __LINE__,
- "recursive call to replacement operator new()")) {
+ else if (1 != recursion) {
+ // avoid calling rw_warn() except when it has something
+ // to warn about in case operator new() is being called
+ // by the compiler's C++ runtime (e.g., HP aCC 6.16)
+ // when the driver hasn't been initialized yet (otherwise
+ // the driver aborts)
+ rw_warn (1 == recursion, 0, __LINE__,
+ "recursive call to replacement operator new()");
+ }
+ else {
// initialize iostreams (verifies that initialization
// succeeds and is complete even if it occurs recursively)
static std::ios_base::Init io_initializer;