stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elemi...@apache.org
Subject svn commit: r662518 - in /stdcxx/branches/4.2.x: tests/containers/23.bitset.cpp tests/containers/23.vector.cons.cpp tests/self/0.printf.cpp tests/support/18.exception.cpp util/collate.cpp util/scanner.cpp
Date Mon, 02 Jun 2008 18:59:25 GMT
Author: elemings
Date: Mon Jun  2 11:59:24 2008
New Revision: 662518

URL: http://svn.apache.org/viewvc?rev=662518&view=rev
Log:
2008-06-02  Eric Lemings <eric.lemings@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.


Modified:
    stdcxx/branches/4.2.x/tests/containers/23.bitset.cpp
    stdcxx/branches/4.2.x/tests/containers/23.vector.cons.cpp
    stdcxx/branches/4.2.x/tests/self/0.printf.cpp
    stdcxx/branches/4.2.x/tests/support/18.exception.cpp
    stdcxx/branches/4.2.x/util/collate.cpp
    stdcxx/branches/4.2.x/util/scanner.cpp

Modified: stdcxx/branches/4.2.x/tests/containers/23.bitset.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/containers/23.bitset.cpp?rev=662518&r1=662517&r2=662518&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/containers/23.bitset.cpp (original)
+++ stdcxx/branches/4.2.x/tests/containers/23.bitset.cpp Mon Jun  2 11:59:24 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.2.x/tests/containers/23.vector.cons.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/containers/23.vector.cons.cpp?rev=662518&r1=662517&r2=662518&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/containers/23.vector.cons.cpp (original)
+++ stdcxx/branches/4.2.x/tests/containers/23.vector.cons.cpp Mon Jun  2 11:59:24 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.2.x/tests/self/0.printf.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/self/0.printf.cpp?rev=662518&r1=662517&r2=662518&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/self/0.printf.cpp (original)
+++ stdcxx/branches/4.2.x/tests/self/0.printf.cpp Mon Jun  2 11:59:24 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.2.x/tests/support/18.exception.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/support/18.exception.cpp?rev=662518&r1=662517&r2=662518&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/support/18.exception.cpp (original)
+++ stdcxx/branches/4.2.x/tests/support/18.exception.cpp Mon Jun  2 11:59:24 2008
@@ -668,7 +668,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.2.x/util/collate.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/util/collate.cpp?rev=662518&r1=662517&r2=662518&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/util/collate.cpp (original)
+++ stdcxx/branches/4.2.x/util/collate.cpp Mon Jun  2 11:59:24 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 typename 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.2.x/util/scanner.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/util/scanner.cpp?rev=662518&r1=662517&r2=662518&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/util/scanner.cpp (original)
+++ stdcxx/branches/4.2.x/util/scanner.cpp Mon Jun  2 11:59:24 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_;



Mime
View raw message