You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by vi...@apache.org on 2008/06/07 03:06:19 UTC

svn commit: r664229 - in /stdcxx/branches/4.3.x: tests/algorithms/ tests/containers/ tests/include/ tests/regress/ tests/self/ tests/src/ tests/support/ util/

Author: vitek
Date: Fri Jun  6 18:06:19 2008
New Revision: 664229

URL: http://svn.apache.org/viewvc?rev=664229&view=rev
Log:
2008-06-06  Travis Vitek  <vi...@roguewave.com>

	Merged revisions 661873, 661898, 661910, 662096, 662468, 662491,
	662493, 662518, 662525, 662596 and 662614 from branches/4.2.x.

	2008-05-30  Travis Vitek  <vi...@roguewave.com>

	STDCXX-833
	* tests/regress/18.limits.traps.stdcxx-624.cpp: Add special
	handling for divide by zero on windows.

	2008-05-30  Eric Lemings <er...@roguewave.com>

	STDCXX-550
	* tests/containers/23.deque.modifiers.cpp: Use same `size_t'
	type of data sources rather than `int' type and resulting type
	casts for `n_copy' and `n_asgn' parameters and variables.

	2008-05-30  Travis Vitek  <vi...@roguewave.com>

	STDCXX-898
	* tests/support/18.numeric.special.int.cpp: Remove failing
	trap assertions as they are throughly and correctly tested
	in 18.limits.traps.cpp.

	2008-05-31  Martin Sebor  <se...@roguewave.com>

	* tests/support/18.numeric.special.int.cpp (run_test): Removed
	informational output (the same detail can be obtained by running
	the test with the --trace option).
	Replaced numeric references to clauses in the standard with their
	names that don't change from one version of the spec to the next.
	Documented why numeric_limits::traps is being exercised elsewhere
	(see rev 661910).
	(run_test): Replaced the use of "_RWSTD_LONG_LONG" with "long long"
	in diagnostic messages.

	2008-06-02  Travis Vitek  <vi...@roguewave.com>

	* tests/regress/18.limits.traps.stdcxx-624.cpp: Update comments to
	reflect expected test behavior.

	2008-06-02  Eric Lemings <er...@roguewave.com>

	STDCXX-550
	* tests/include/alg_test.h (Size): Add `IntegralType' typedef
	for casting values to same type used by template parameter.
	* tests/algorithms/25.fill.cpp (test_fill_n): Use `IntegralType'
	to cast integer value to exact integer type of Size constructor.
	* tests/algorithms/25.generate.cpp (test_generate_n): Likewise.
	* tests/src/23.containers.cpp (_rw_sigcat, _rw_argno): Cast
	entire expression to `int' type rather than just `which' enum.

	2008-06-02  Eric Lemings <er...@roguewave.com>

	STDCXX-550
	* util/cmdopt.cpp (get_long_val, eval_options): Change `offset'
	parameter type from `unsigned' to `size_t' type.  (Better fix
	for conversion warning than casting.)

	2008-06-02  Eric Lemings <er...@roguewave.com>

	STDCXX-550
	* tests/self/0.printf.cpp (user_fun_va): Cast `long' return type
	from `strtol' function to `int' return type.
	* tests/containers/23.bitset.cpp (compare): Cast result of
	pointer arithmetic to `int' return type.
	* tests/containers/23.vector.cons.cpp (test_ctors): Construct
	temporary reference variable with correct integer type from
	`size_type' of loop index.
	* tests/support/18.exception.cpp (test_rw_throw): Use `size_t'
	rather than `unsigned' type to store result of `sizeof' expression.
	* util/scanner.cpp (Scanner::next_token): Cast result of pointer
	arithmetic to `int' type of `column' member.
	* util/collate.cpp (Def::process_order_stmt): Cast return value
	of `std::list<T>::size()' function to `unsigned' type used by
	`num_weights' in LHS of assignment.
	(Def::preprocess_collation_definitions): Change `max_orders' type
	from `unsigned' to `std::list<T>::size_type' returned by `size()'
	function.

	2008-06-02  Eric Lemings <er...@roguewave.com>

	STDCXX-550
	* util/collate.cpp (Def::preprocess_collation_definitions):
	Remove `typename' keyword.  Some compilers don't like it outside
	of templates.	

	2008-06-02  Martin Sebor  <se...@roguewave.com>

	* tests/support/18.exception.cpp [!_RWSTD_NO_PURE_C_HEADERS &&
	_RWSTD_OS_LINUX](siglongjmp, sigsetjmp): Declared POSIX functions
	that aren't otherwise required or expected to be declared by
	strictly conforming standard C/C++ headers (such as those used
	when compiling with EDG eccp).
	(test_uncaught_exception): Silenced (bogus) EDG eccp remark 550
	about unused variable.

	2008-06-02  Martin Sebor  <se...@roguewave.com>

	* tests/regress/21.c.strings.stdcxx-843.cpp: Added a regression test
	for STDCXX-843.


Added:
    stdcxx/branches/4.3.x/tests/regress/21.c.strings.stdcxx-843.cpp
      - copied unchanged from r662614, stdcxx/branches/4.2.x/tests/regress/21.c.strings.stdcxx-843.cpp
Modified:
    stdcxx/branches/4.3.x/tests/algorithms/25.fill.cpp
    stdcxx/branches/4.3.x/tests/algorithms/25.generate.cpp
    stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp
    stdcxx/branches/4.3.x/tests/containers/23.deque.modifiers.cpp
    stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp
    stdcxx/branches/4.3.x/tests/include/alg_test.h
    stdcxx/branches/4.3.x/tests/regress/18.limits.traps.stdcxx-624.cpp
    stdcxx/branches/4.3.x/tests/self/0.printf.cpp
    stdcxx/branches/4.3.x/tests/src/23.containers.cpp
    stdcxx/branches/4.3.x/tests/support/18.exception.cpp
    stdcxx/branches/4.3.x/tests/support/18.numeric.special.int.cpp
    stdcxx/branches/4.3.x/util/cmdopt.cpp
    stdcxx/branches/4.3.x/util/collate.cpp
    stdcxx/branches/4.3.x/util/scanner.cpp

Modified: stdcxx/branches/4.3.x/tests/algorithms/25.fill.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/algorithms/25.fill.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/algorithms/25.fill.cpp (original)
+++ stdcxx/branches/4.3.x/tests/algorithms/25.fill.cpp Fri Jun  6 18:06:19 2008
@@ -146,7 +146,7 @@
         const OutputIterator begin =
             make_iter (buf, buf, buf_end, dummy_iter);
 
-        const Size n (i, 0 /* dummy */);
+        const Size n (typename Size::IntegralType (i), 0 /* dummy */);
         const T    value;
 
         // the number of invocations of the assignment operator

Modified: stdcxx/branches/4.3.x/tests/algorithms/25.generate.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/algorithms/25.generate.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/algorithms/25.generate.cpp (original)
+++ stdcxx/branches/4.3.x/tests/algorithms/25.generate.cpp Fri Jun  6 18:06:19 2008
@@ -186,7 +186,7 @@
         const ForwardIterator begin =
             make_iter (buf, buf, buf_end, gen_iter);
 
-        const Size n (i, 0);
+        const Size n (typename Size::IntegralType (i), 0);
         const Generator<T> gen (0, 0);
 
         // store the value of the next element

Modified: stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp (original)
+++ stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp Fri Jun  6 18:06:19 2008
@@ -825,7 +825,7 @@
             return int (s - beg);
     }
 
-    return *str ? s - beg : -1;
+    return *str ? int (s - beg) : -1;
 }
 
 // compare two strings, return the offset of the first mismatch
@@ -840,7 +840,7 @@
             return int (s - beg);
     }
 
-    return str->c ? s - beg : -1;
+    return str->c ? int (s - beg) : -1;
 }
 
 

Modified: stdcxx/branches/4.3.x/tests/containers/23.deque.modifiers.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/containers/23.deque.modifiers.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/containers/23.deque.modifiers.cpp (original)
+++ stdcxx/branches/4.3.x/tests/containers/23.deque.modifiers.cpp Fri Jun  6 18:06:19 2008
@@ -131,8 +131,8 @@
                      const UserClass *x /* pointer to an element or 0 */,
                      const Iterator  &first /* beginning of range */,
                      const Iterator  &last /* end of range to insert */,
-                     int             *n_copy /* number of copy ctors */,
-                     int             *n_asgn /* number of assignments */)
+                     std::size_t     *n_copy /* number of copy ctors */,
+                     std::size_t     *n_asgn /* number of assignments */)
 {
     std::size_t throw_after = 0;
 
@@ -359,8 +359,8 @@
                   nelems == -2, *ins, nelems == -1, 
                   int (inslen), -1, xins, nelems, *ins);
 
-    int n_copy = UserClass::n_total_copy_ctor_;
-    int n_asgn = UserClass::n_total_op_assign_;
+    std::size_t n_copy = UserClass::n_total_copy_ctor_;
+    std::size_t n_asgn = UserClass::n_total_op_assign_;
 
     if (-2 == nelems) {   // insert(iterator, const_reference)
 
@@ -429,8 +429,7 @@
     // of calls to the copy ctor and assignment operator on value_type
     const std::size_t expect_copy = nelems < 0 ? inslen : nelems;
 
-    rw_assert (n_copy == int (expect_copy),
-               __FILE__, line,
+    rw_assert (n_copy == expect_copy, __FILE__, line,
                "line %d: %s: expected %zu invocations "
                "of UserClass::UserClass(const UserClass&), got %d\n",
                __LINE__, funcall, expect_copy, n_copy);
@@ -439,8 +438,7 @@
     const std::size_t expect_asgn =
         insert_assignments (dummy, nelems, off, seqlen, inslen);
 
-    rw_assert (n_asgn == int (expect_asgn), 
-               __FILE__, line,
+    rw_assert (n_asgn == expect_asgn, __FILE__, line,
                "line %d: %s: expected %zu invocations "
                "of UserClass::operator=(const UserClass&), got %d\n",
                __LINE__, funcall, expect_asgn, n_asgn);
@@ -872,8 +870,8 @@
                   asnlen, -1, xasn, 
                   nelems, *asn);
 
-    int n_copy = UserClass::n_total_copy_ctor_;
-    int n_asgn = UserClass::n_total_op_assign_;
+    std::size_t n_copy = UserClass::n_total_copy_ctor_;
+    std::size_t n_asgn = UserClass::n_total_op_assign_;
 
     // create a dummy deque iterator to pass to exception_loop
     // (the object will not be used by the functiuon)
@@ -963,12 +961,12 @@
     const std::size_t expect_asgn = 0;
 #endif   // _RWSTD_NO_EXT_DEQUE_ASSIGN_IN_PLACE
 
-    rw_assert (n_copy == int (expect_copy), 0, line,
+    rw_assert (n_copy == expect_copy, __FILE__, line,
                "line %d: %s: expected %zu invocations "
                "of UserClass::UserClass(const UserClass&), got %d\n",
                __LINE__, funcall, expect_copy, n_copy);
 
-    rw_assert (n_asgn == int (expect_asgn), 0, line,
+    rw_assert (n_asgn == expect_asgn, __FILE__, line,
                "line %d: %s: expected %zu invocations "
                "of UserClass::operator=(const UserClass&), got %d\n",
                __LINE__, funcall, expect_asgn, n_asgn);
@@ -1074,8 +1072,8 @@
     Deque deq = seqlen ? Deque (xseq, xseq + seqlen) : Deque ();
     const Deque::iterator start = deq.begin () + begoff;
  
-    int n_copy = UserClass::n_total_copy_ctor_;
-    int n_asgn = UserClass::n_total_op_assign_;
+    std::size_t n_copy = UserClass::n_total_copy_ctor_;
+    std::size_t n_asgn = UserClass::n_total_op_assign_;
 
     char* funcall = 0;
     std::size_t buflen = 0;

Modified: stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp (original)
+++ stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp Fri Jun  6 18:06:19 2008
@@ -618,7 +618,7 @@
         for (typename Vector::size_type i = 0; i != rw_opt_nloops; ++i) {
 
             // construct an element at then end of array
-            alloc.construct (vals + i, i);
+            alloc.construct (vals + i, typename Alloc::value_type (i));
 
             // verify ctor with a strict InputIterator
             InputIter<T> first (vals,     vals,     vals + i);

Modified: stdcxx/branches/4.3.x/tests/include/alg_test.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/include/alg_test.h?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/include/alg_test.h (original)
+++ stdcxx/branches/4.3.x/tests/include/alg_test.h Fri Jun  6 18:06:19 2008
@@ -342,6 +342,8 @@
 template <class IntegralT>
 struct Size
 {
+    typedef IntegralT IntegralType;
+
     // dummy argument provided to prevent Size from being constructible
     // by conversion from IntegralT
     Size (IntegralT val, int /* dummy */ )

Modified: stdcxx/branches/4.3.x/tests/regress/18.limits.traps.stdcxx-624.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/18.limits.traps.stdcxx-624.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/regress/18.limits.traps.stdcxx-624.cpp (original)
+++ stdcxx/branches/4.3.x/tests/regress/18.limits.traps.stdcxx-624.cpp Fri Jun  6 18:06:19 2008
@@ -2,7 +2,7 @@
  *
  * 18.limits.traps.stdcxx-624.cpp - regression test for STDCXX-624
  *
- * $Id:$
+ * $Id$
  *
  ***************************************************************************
  *
@@ -50,6 +50,16 @@
 }   // extern "C"
 
 
+#ifdef _MSC_VER
+   // use Structured Exception Handling to detect arithmetic exceptions
+#  define TRY           __try
+#  define EXCEPT(arg)   __except (arg)
+#else
+#  define TRY              if (1)
+#  define EXCEPT(ignore)   else if (0)
+#endif   // _MSC_VER
+
+
 int main ()
 {
     // prevent clever optimizers from figuring out that (zero == 0)
@@ -66,14 +76,23 @@
     if (std::numeric_limits<int>::traps)
         std::signal (SIGFPE, handle_FPE);
 
+    bool trapped = false;
+
     // if this traps (generates SIGFPE), verify (in the signal handler)
-    // that integer arithmetic is expected to trap
-    result  = non_zero / zero;
-    result += non_zero % zero;
-
-    // if we get this far, verify that integer arithmetic is known not
-    // to trap
-    assert (!std::numeric_limits<int>::traps);
+    // that integer arithmetic is expected to trap. if this doesn't trap
+    // then we are either on windows, or traps are disabled.
+    TRY {
+        result  = non_zero / zero;
+        result += non_zero % zero;
+    }
+    EXCEPT (1) {
+        // windows structured exception caught
+        trapped = true;
+    }
+
+    // if we get this far, verify that we have caught a structured
+    // exception or integer arithmetic is known not to trap
+    assert (trapped == std::numeric_limits<int>::traps);
 
     (void)&result;
 

Modified: stdcxx/branches/4.3.x/tests/self/0.printf.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/self/0.printf.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/self/0.printf.cpp (original)
+++ stdcxx/branches/4.3.x/tests/self/0.printf.cpp Fri Jun  6 18:06:19 2008
@@ -2966,7 +2966,7 @@
     if (isdigit (*fmt)) {
         // process positional parameter
         char* end = 0;
-        arg = strtol (fmt, &end, 10);
+        arg = int (strtol (fmt, &end, 10));
         if ('$' != *end)
             arg = -1;
         else if (memcmp (fun_name, end + 1, funlen) || ':' != end [funlen + 1])

Modified: stdcxx/branches/4.3.x/tests/src/23.containers.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/23.containers.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/src/23.containers.cpp (original)
+++ stdcxx/branches/4.3.x/tests/src/23.containers.cpp Fri Jun  6 18:06:19 2008
@@ -174,7 +174,7 @@
     const bool is_member = 0 != (Ids::bit_member & which);
 
     // get the bitmap describing the function's argument types
-    int argmap = (which & ~Ids::bit_member) >> Ids::fid_bits;
+    int argmap = int ((which & ~Ids::bit_member) >> Ids::fid_bits);
 
     // determine whether the function is a const member function
     bool is_const_member =
@@ -327,7 +327,8 @@
 _rw_argno (size_t which, int arg)
 {
     // get the bitmap describing the function's argument types
-    int argmap = (which & ~ContainerIds::bit_member) >> ContainerIds::fid_bits;
+    int argmap = int ((which & ~ContainerIds::bit_member)
+                      >> ContainerIds::fid_bits);
 
     int argno = 0;
 

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=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/support/18.exception.cpp (original)
+++ stdcxx/branches/4.3.x/tests/support/18.exception.cpp Fri Jun  6 18:06:19 2008
@@ -54,11 +54,40 @@
 #ifdef _RWSTD_OS_LINUX
    // use siglongjmp() and sigsetjmp() on Linux to avoid
    // http://sourceware.org/bugzilla/show_bug.cgi?id=2351
-#  include <setjmp.h>    // for siglongjmp(), sigsetjmp()
 
-#  define RW_JMP_BUF             jmp_buf
-#  define RW_SETJMP(env)         sigsetjmp (env, 0)
-#  define RW_LONGJMP(env, val)   siglongjmp (env, val)
+#  ifndef _RWSTD_NO_PURE_C_HEADERS
+#    include <csetjmp>    // for jmp_buf
+
+// when using "pure C headers" on Linux (i.e., with EDG eccp)
+// declare POSIX functions that aren't otherwise required or
+// expected to be declared by strictly conforming standard
+// C/C++ headers
+
+extern "C" {
+
+typedef std::jmp_buf sigjmp_buf;
+
+// Linux/glibc-specific:
+int __sigsetjmp (sigjmp_buf, int);
+
+#    define sigsetjmp(env, savemask)   __sigsetjmp (env, savemask)
+
+void siglongjmp (sigjmp_buf, int);
+
+}   // extern "C"
+
+#    define RW_JMP_BUF             std::jmp_buf
+#    define RW_SETJMP(env)         sigsetjmp (env, 0)
+#    define RW_LONGJMP(env, val)   siglongjmp (env, val)
+
+#  else   // if defined _RWSTD_NO_PURE_C_HEADERS
+#    include <setjmp.h>    // for siglongjmp(), sigsetjmp()
+
+#    define RW_JMP_BUF             jmp_buf
+#    define RW_SETJMP(env)         sigsetjmp (env, 0)
+#    define RW_LONGJMP(env, val)   siglongjmp (env, val)
+#  endif   // _RWSTD_NO_PURE_C_HEADERS
+
 #else   // if !defined (_RWSTD_OS_LINUX)
 #  include <csetjmp>    // for longjmp(), setjmp()
 
@@ -407,6 +436,9 @@
 
         chk.presult_ = &uncaught;
 
+        // silence (bogus) EDG eccp unused variable remark 550
+        _RWSTD_UNUSED (chk);
+
         throw 0;
     }
     catch (...) {
@@ -668,7 +700,7 @@
         // exclude exception, bad_alloc, bad_cast, and bad_exception
         // they are typically generated by the compiler and their
         // what() strings are implementation-specific
-        unsigned en = j % ((sizeof expect / sizeof *expect) - 5);
+        size_t en = j % ((sizeof expect / sizeof *expect) - 5);
 
         // null-terminate str
         str [j] = '\0';

Modified: stdcxx/branches/4.3.x/tests/support/18.numeric.special.int.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/support/18.numeric.special.int.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/support/18.numeric.special.int.cpp (original)
+++ stdcxx/branches/4.3.x/tests/support/18.numeric.special.int.cpp Fri Jun  6 18:06:19 2008
@@ -487,109 +487,104 @@
 
     ASSERT (is_specialized, "%#b");
 
-    // 18.2.1.2, p1
-    rw_info (0, 0, __LINE__,
-             "std::numeric_limits<%s>::min() == %{@}",
-             tname, fmt, (Traits::min ()));
-
+    // [numeric.special], p1
     rw_assert ((limT::min)() == (Traits::min)(), 0, __LINE__,
                "std::numeric_limits<%s>::min() == %{@}, got %{@}",
                tname, fmt, (Traits::min)(), fmt, (limT::min)());
 
-    // 18.2.1.2, p4
-    rw_info (0, 0, __LINE__,
-             "std::numeric_limits<%s>::max() == %{@}",
-             tname, fmt, (Traits::max ()));
-
+    // [numeric.special], p4
     rw_assert ((limT::max)() == (Traits::max)(), 0, __LINE__,
                "std::numeric_limits<%s>::max() == %{@}, got %{@}",
                tname, fmt, (Traits::max)(), fmt, (limT::max)());
 
-    // 18.2.1.2, p6
+    // [numeric.special], p6
     ASSERT (digits, "%d");
 
-    // 18.2.1.2, p9
+    // [numeric.special], p9
     ASSERT (digits10, "%d");
 
     rw_assert (limT::digits10 == Traits::compute_digits10 (), 0, __LINE__,
                "std::numeric_limits<%s>::digits10 == %d (computed), got %d",
                tname, Traits::compute_digits10 (), limT::digits10);
 
-    // 18.2.1.2, p11
+    // [numeric.special], p11
     ASSERT (is_signed, "%b");
 
-    // 18.2.1.2, p13
+    // [numeric.special], p13
     ASSERT (is_integer, "%b");
 
-    // 18.2.1.2, p15
+    // [numeric.special], p15
     ASSERT (is_exact, "%b");
 
-    // 18.2.1.2, p17
+    // [numeric.special], p17
     ASSERT (radix, "%i");
 
-    // 18.2.1.2, p20
+    // [numeric.special], p20
     ASSERT_0 (epsilon (), fmt);
 
-    // 18.2.1.2, p22
+    // [numeric.special], p22
     ASSERT_0 (round_error (), fmt);
         
-    // 18.2.1.2, p23
+    // [numeric.special], p23
     ASSERT_0 (min_exponent, "%i");
 
-    // 18.2.1.2, p25
+    // [numeric.special], p25
     ASSERT_0 (min_exponent10, "%i");
 
-    // 18.2.1.2, p27
+    // [numeric.special], p27
     ASSERT_0 (max_exponent, "%i");
 
-    // 18.2.1.2, p29
+    // [numeric.special], p29
     ASSERT_0 (max_exponent10, "%i");
 
-    // 18.2.1.2, p31
+    // [numeric.special], p31
     ASSERT_0 (has_infinity, "%b");
 
-    // 18.2.1.2, p34
+    // [numeric.special], p34
     ASSERT_0 (has_quiet_NaN, "%b");
 
-    // 18.2.1.2, p37
+    // [numeric.special], p37
     ASSERT_0 (has_signaling_NaN, "%b");
 
-    // 18.2.1.2, p40
+    // [numeric.special], p40
     ASSERT_0 (has_denorm, "%b");
 
-    // 18.2.1.2, p42
+    // [numeric.special], p42
     ASSERT_0 (has_denorm_loss, "%b");
 
-    // 18.2.1.2, p43
+    // [numeric.special], p43
     ASSERT_0 (infinity (), fmt);
 
-    // 18.2.1.2, p45
+    // [numeric.special], p45
     ASSERT_0 (quiet_NaN (), fmt);
 
-    // 18.2.1.2, p47
+    // [numeric.special], p47
     ASSERT_0 (signaling_NaN (), fmt);
 
-    // 18.2.1.2, p49
+    // [numeric.special], p49
     ASSERT_0 (denorm_min (), fmt);
 
-    // 18.2.1.2, p52
+    // [numeric.special], p52
     ASSERT_0 (is_iec559, "%b");
 
-    // 18.2.1.2, p54
+    // [numeric.special], p54
     ASSERT (is_bounded, "%b");
 
-    // 18.2.1.2, p56
+    // [numeric.special], p56
     rw_assert (limT::is_modulo == Traits::is_modulo (), 0, __LINE__,
                "std::numeric_limits<%s>::is_modulo == %#b",
                tname, Traits::is_modulo ());
 
-    // 18.2.1.2, p59
-    ASSERT_0 (traps, "%b");
+    // [numeric.special], p59
+    // numeric_limits::traps exercised separately in 18.limits.traps.cpp
+    // to prevent runtime errors (SIGFPE) from hiding potential assertion
+    // failures in the rest of the test
+    // ASSERT_0 (traps, "%b");
 
-    // 18.2.1.2, p61
+    // [numeric.special], p61
     ASSERT_0 (tinyness_before, "%b");
         
-    // 18.2.1.2, p63
+    // [numeric.special], p63
     rw_assert (limT::round_style == int (std::round_toward_zero), 0, __LINE__,
                "std::numeric_limits<%s>::round_style == %d",
                tname, std::round_toward_zero);
@@ -624,8 +619,8 @@
 
 #ifdef _RWSTD_LONG_LONG
 
-    TEST (_RWSTD_LONG_LONG, "%lli");
-    TEST (unsigned _RWSTD_LONG_LONG, "%llu");
+    run_test ((_RWSTD_LONG_LONG*)0, "long long", "%lli");
+    run_test ((unsigned _RWSTD_LONG_LONG*)0, "unsigned long long", "%llu");
 
 #endif   // _RWSTD_LONG_LONG
 

Modified: stdcxx/branches/4.3.x/util/cmdopt.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/util/cmdopt.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/util/cmdopt.cpp (original)
+++ stdcxx/branches/4.3.x/util/cmdopt.cpp Fri Jun  6 18:06:19 2008
@@ -204,7 +204,7 @@
     @param offset length of option name (including leading --)
 */
 static char*
-get_long_val (char* const* argv, int* idx, unsigned offset)
+get_long_val (char* const* argv, int* idx, size_t offset)
 {
     assert (0 != argv);
     assert (0 != idx);

Modified: stdcxx/branches/4.3.x/util/collate.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/util/collate.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/util/collate.cpp (original)
+++ stdcxx/branches/4.3.x/util/collate.cpp Fri Jun  6 18:06:19 2008
@@ -125,7 +125,7 @@
 unsigned int Def::process_order_stmt (collate_section_t& section)
 {
     // number of orders in the section
-    collate_out_.num_weights = section.order.size ();
+    collate_out_.num_weights = unsigned (section.order.size ());
     if (collate_out_.num_weights == 0) {
         collate_out_.num_weights = 1;
         collate_out_.weight_type[0] = 0;
@@ -243,8 +243,6 @@
     std::string prev_elm;
     std::string next_elm;
 
-    static unsigned int max_orders = 0;
-
     token_list_t::iterator cs_it = sym_list_.begin ();
     for (; cs_it != sym_list_.end (); ++cs_it) {
         cs_map_iter csm_it = cs_map_.find (cs_it->name);
@@ -252,6 +250,8 @@
             csm_it->second = coll_value++;
     }
 
+    static token_list_t::size_type max_orders = 0;
+
     std::list<collate_section_t>::iterator s_it = section_list_.begin ();
 
     if (s_it != section_list_.end()) {

Modified: stdcxx/branches/4.3.x/util/scanner.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/util/scanner.cpp?rev=664229&r1=664228&r2=664229&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/util/scanner.cpp (original)
+++ stdcxx/branches/4.3.x/util/scanner.cpp Fri Jun  6 18:06:19 2008
@@ -384,7 +384,7 @@
         // iteration; the finding of a token breaks and next_tok leaves
         // this loop having the line/col info
         next_tok.line   = context_->line;
-        next_tok.column = context_->pos_ - context_->line_.c_str ();
+        next_tok.column = int (context_->pos_ - context_->line_.c_str ());
 
         // plug in the pointer to current position
         const char*& next = context_->pos_;