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: Greg Chicares
Subject: Re: [lmi] Integer overflow warnings in bourn_cast with clang
Date: Wed, 12 Apr 2017 17:42:15 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

On 2017-04-06 15:53, Vadim Zeitlin wrote:
> [...] But this is because I'm running tests under x86_64 Linux while
> you're probably testing under 32 bit MSW -- and I do see these failures
> there (I also see 539 and not 540).

Whether the entire test suite reports 539 successes or 540 depends on
whether 'wchar_t' is signed, because this test is run for all standard
arithmetic types:

template<typename T>
void test_same(char const* file, int line)
{
...
    if(limits::is_signed)
        {
        INVOKE_BOOST_TEST_EQUAL(T(-1), bourn_cast<T>(T(-1)), file, line);
        }

Of course, it also depends on whether 'char' is signed, but 'wchar_t' is
the cause of the difference between my 32-bit msw and 64-bit GNU/Linux
builds.




reply via email to

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