Boost logo

Boost :

From: larsbj_at_[hidden]
Date: 2001-11-13 19:56:50


Currently I have to change some small things to compile without
warnings on GCC 3.0.x (x=3 really.).

It seems that the checks for sstream of lexical_cast became a little
bit to strong. (GCC 3 has a good sstream.) This:

+++ remote-ipzone/boost/boost/lexical_cast.hpp Tue Nov 13 00:55:08 2001
@@ -15,7 +15,7 @@
 #include <boost/config.hpp>

 // The GNU sstream implementation is broken for the purposes of lexical cast.
-# if defined(BOOST_NO_STRINGSTREAM) || (defined(__GNUC__) && !defined(__STL_USE_NEW_IOSTREAMS) || defined(__APPLE_CC__))
+# if defined(BOOST_NO_STRINGSTREAM)
 # define BOOST_LEXICAL_CAST_USE_STRSTREAM
 # endif

is the change I use. But I have not checked if gcc < 3 handles this
ok, but I would guess so since previous gcc's came with the SGI STL.
Supposedly the "!defined(__STL_USE_NEW_IOSTREAMS)" should make
lexical_cast use sstream, but that does not happen.

Also in regex_traits.hpp I have to do this change:

+++ remote-ipzone/boost/boost/regex/regex_traits.hpp Tue Nov 13 01:03:15 2001@@ -733,7 +733,7 @@
          return true;
       if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
          return true;
- if((f & char_class_unicode) && (c > (size_type)(uchar_type)255))
+ if((f & char_class_unicode) && (c > (uchar_type)255))
          return true;
       return false;
    }

It seems that this code does not handle a wchar_t that is unsigned.

With Boost.Thread I did these changes to avoid some signed/unsigned
warnings:

+++ remote-ipzone/boost/libs/thread/src/timeconv.inl Sat Nov 10 02:16:37 2001@@ -35,7 +35,7 @@
     {
         ts.tv_sec = static_cast<int>(xt.sec);
         ts.tv_nsec = static_cast<int>(xt.nsec);
- if(ts.tv_nsec > NANOSECONDS_PER_SECOND)
+ if(ts.tv_nsec > static_cast<const int>(NANOSECONDS_PER_SECOND))
         {
             ts.tv_sec += ts.tv_nsec / NANOSECONDS_PER_SECOND;
             ts.tv_nsec %= NANOSECONDS_PER_SECOND;
@@ -71,7 +71,7 @@
                 ts.tv_sec -= 1;
                 ts.tv_nsec += NANOSECONDS_PER_SECOND;
             }
- if(ts.tv_nsec > NANOSECONDS_PER_SECOND)
+ if(ts.tv_nsec > static_cast<const int>(NANOSECONDS_PER_SECOND))
            {
                ts.tv_sec += ts.tv_nsec / NANOSECONDS_PER_SECOND;
                ts.tv_nsec %= NANOSECONDS_PER_SECOND;

-- 
	Lgb

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk