Boost logo

Boost :

From: Chris Little (cslittle_at_[hidden])
Date: 2002-03-13 23:05:05


on 3/13/02 8:30 PM, Jeff Garland at jeff_at_[hidden] wrote:

> All -
>
> I have refreshed the date-time library submission. The new version (0.55)
> improves the portability of the library. Here is the current compiler status:
>
> CLEAN COMPILERS
> * BCC 5.1.1 (compiles with warnings -- passes all tests - examples
> work)
> * GCC 3.0.3 on Linux (compiles clean / passes all tests - examples work)
> * GCC 2.95.3-5 (cygwin) (compiles clean / passes all tests - examples work)
> * GCC 2.96 on Linux (compiles clean / passes all tests - examples work)
> * MSVC 7 RC2 (compiles clean / passes all tests - examples work)
> * MSVC 6 SP5 all ok except the 'ticks()' method on
> posix_time::time_duration
>
> This info can be found on the Wiki page:
>
> http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?GDTL/Build-Test
> -C
> ompiler_Info
>
> Jeff
>

Jeff,

I tried GDTL on Metrowerks CodeWarrior (MCW) 7.2.

CodeWarrior has a warning for empty declarations. I.e. Trailing semi-colons
after closing a namespace and a semi-colon after the closing brace on
function declarations. In GDTL's case it warns about:

Warning : illegal empty declaration
period.hpp line 90 {};

Warning : illegal empty declaration
period.hpp line 100 {};

Warning : illegal empty declaration
period.hpp line 191 };

Warning : illegal empty declaration
constrained_value.hpp line 88 }; //namespace CV

Warning : illegal empty declaration
date_generators.hpp line 234 };//namespace gdtl

Warning : illegal empty declaration
date_clock_device.hpp line 68 };

Warning : illegal empty declaration
time_defs.hpp line 33 }; //namespace timedate

Warning : illegal empty declaration
time.hpp line 141 }; //namespace time

Warning : illegal empty declaration
time_clock.hpp line 61 };

Also I get warnings about the unused argument in

Warning : variable / argument 'd' is not used in function
formatters.hpp line 70 inline std::string to_email_string(date d)

Besides these warnings, the tests and examples in the gregorian directory
compile and pass.

I am having problems with the posix_time tests.

When compiling testc_local_adjustor.cpp I get the following error:

Error : ambiguous access to overloaded function
'std::abs(long double)'
'std::abs(float)'
'std::abs(double)'
posix_time_duration.hpp line 146 double d = std::abs(ticks()) %
rep_type::res_adjust();

For MCW the long long overload of abs is found in cstdlib which hasn't been
included.

After this change I get an error

Error : undefined identifier 'INT64_C'
posix_time_system.hpp line 113 gdtl::wrapping_int<boost::int64_t,
INT64_C(86400) * INT64_C(1000000000) >

INT64_C fails to be defined because boost/cstdint.hpp and thus cstdint have
already been included before posix_time_system.hpp is read
(boost/cstdint.hpp was included by posix_time_duration.hpp). Since the
header has already been included the definition of __STDC_CONSTANT_MACROS
has no effect posix_time_system.hpp.

I'm not sure how to fix this. I suppose you could add
__STDC_CONSTANT_MACROS before every inclusion of boost/cstdint.hpp but there
is still no guarantee that user code won't have included cstdint before your
headers.

Adding #define __STDC_CONSTANT_MACROS to posix_time_duration.hpp fixed this
issue for the tests.

I had to add #include <string> to posix_time_system.hpp.

After these changes all of the tests pass. I will check the examples
tomorrow.

Chris


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