lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Integer overflow warnings in bourn_cast with clang


From: Vadim Zeitlin
Subject: Re: [lmi] Integer overflow warnings in bourn_cast with clang
Date: Thu, 13 Apr 2017 01:01:58 +0200

On Wed, 12 Apr 2017 17:42:15 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2017-04-06 15:53, Vadim Zeitlin wrote:
GC> > [...] But this is because I'm running tests under x86_64 Linux while
GC> > you're probably testing under 32 bit MSW -- and I do see these failures
GC> > there (I also see 539 and not 540).
GC> 
GC> Whether the entire test suite reports 539 successes or 540 depends on
GC> whether 'wchar_t' is signed, because this test is run for all standard
GC> arithmetic types:
GC> 
GC> template<typename T>
GC> void test_same(char const* file, int line)
GC> {
GC> ...
GC>     if(limits::is_signed)
GC>         {
GC>         INVOKE_BOOST_TEST_EQUAL(T(-1), bourn_cast<T>(T(-1)), file, line);
GC>         }
GC> 
GC> Of course, it also depends on whether 'char' is signed, but 'wchar_t' is
GC> the cause of the difference between my 32-bit msw and 64-bit GNU/Linux
GC> builds.

 Ah, indeed, thanks for explaining this difference!
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]