[Top][All Lists]

[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: Fri, 7 Apr 2017 15:50:00 +0200

On Fri, 7 Apr 2017 13:31:25 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2017-04-06 15:53, Vadim Zeitlin wrote:
GC> > -- and I do see these failures
GC> > there (I also see 539 and not 540). So this is clearly because int64_t can
GC> > represent something not representable in an int32_t.
GC> But I don't see how the errors can involve only 32-bit integers

 I don't really see it neither, which is why I used weasel word "something"
above. I could debug it, of course, but I didn't think it was worth doing
it considering the code was going to change anyhow.

GC> Let me decompose the implementation into four separate function templates
GC> so that clang can compile it and we can then reexamine this.

 Just to be clear: the difference in test results is due solely to
architecture, not compiler. I.e. it's not clang-specific, all versions of
g++ (4, 5, 6) also pass the tests with my original "fix" in 64 bits but
fail them in 32 bits.


reply via email to

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