|
Boost : |
Subject: Re: [boost] [chrono] New Features + Bug fixes + Updateddocumentation
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-12-12 05:22:17
Hi,
----- Original Message -----
From: "vicente.botet" <vicente.botet_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, December 11, 2009 11:34 PM
Subject: Re: [boost] [chrono] New Features + Bug fixes + Updateddocumentation
>
>
> ----- Original Message -----
> From: "Howard Hinnant" <howard.hinnant_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Friday, December 11, 2009 6:21 PM
> Subject: Re: [boost] [chrono] New Features + Bug fixes + Updateddocumentation
>
>
>> Try a preprocess (-E) and make sure system_clock looks the way you think it should. This could be a configuration error. I just copy/pasted your sandbox chrono.hpp into a test file and compiled it fine using gcc-4.4.0.
>
> Oh, I see. Tom Tam could be building on MinGW with gcc-4.4.0. I have sent him a mail to request your suggestion.
>
> BTW, gcc-4.3.4 didn't had the error on cygwin.
>
> Thanks,
> Vicente
>
> P.S. I think that I will need to install MinGW on my PC.
Hi,
I have installed MinGW with gcc4.4.0 and you were right. You suggestion solve the issue. I suppose that gcc_4.4.0 report an error that preceding version should report before, and that this is not a gcc-4.4.0 regression.
I have also installed MSVC and I have an issue with the ratio_fail_test1.cpp test. MSVC report a warning instead of an error.
compile-c-c++ ..\..\..\bin.v2\libs\chrono\test\ratio_fail_test1.test\msvc-9.0express\debug\asynch-exceptions-on\ratio_fail_test1.obj
ratio_fail_test1.cpp
C:\cygwin\boost_1_41_0\boost/ratio.hpp(217) : warning C4307: '*' : integral constant overflow
C:\cygwin\boost_1_41_0\boost/ratio.hpp(394) : see reference to class template instantiation 'boost::detail::ll_mul<X,Y>' being compiled
with
[
X=0x7fffffffffffffff,
Y=0x3fffffffffffffff
]
ratio_fail_test1.cpp(12) : see reference to class template instantiation 'boost::ratio_multiply<R1,R2>' being compiled
with
[
R1=R1,
R2=R2
]
C:\cygwin\boost_1_41_0\boost/ratio.hpp(217) : warning C4307: '*' : integral constant overflow
C:\cygwin\boost_1_41_0\boost/ratio.hpp(395) : see reference to class template instantiation 'boost::detail::ll_mul<X,Y>' being compiled
with
[
X=0x3ffffffffffffff8,
Y=0x7ffffffffffffff0
]
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"..\..\..\bin.v2\libs\chrono\test\ratio_fail_test1.test\msvc-9.0express\debug\asynch-exceptions-on\ratio_fail_test1.obj.rsp"
...failed compile-c-c++ ..\..\..\bin.v2\libs\chrono\test\ratio_fail_test1.test\msvc-9.0express\debug\asynch-exceptions-on\ratio_fail_test1.obj...
...removing ..\..\..\bin.v2\libs\chrono\test\ratio_fail_test1.test\msvc-9.0express\debug\asynch-exceptions-on\ratio_fail_test1.obj
...removing outdated ..\..\..\bin.v2\libs\chrono\test\ratio_fail_test1.test\msvc-9.0express\debug\asynch-exceptions-on\ratio_fail_test1.test
I have added
[ compile-fail ratio_fail_test1.cpp : <warnings-as-errors>on ]
and all is right.
Is there another way to make MSVC report an error when there is an integral constant overflow?
Thanks a lot Howard for your help,
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk