[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Make check on FreeBSD 10.x - Intel
From: |
Holger Freyther |
Subject: |
Re: [Help-smalltalk] Make check on FreeBSD 10.x - Intel |
Date: |
Fri, 22 May 2015 11:43:36 +0800 |
> On 22 May 2015, at 04:00, nicolas cellier <address@hidden> wrote:
>
> That's exactly it. Overflow is undefined behavior.
> The C compiler has a license to ignore undefined behavior because you are
> not suppose to rely on it.
Yes, but I couldn’t cite the relevant specification but you did in your blog
post. I had
pointed Esteban to use “-fsanitize=undefined” in the PharoVM. E.g. there are
more
issues with bitShift: in Pharo.
> And see a fix in
> http://smallissimo.blogspot.fr/2015/04/removing-ub-in-bytecodeprimmultiply.html.
oh, I think my preference is to go with __builtin_mul_overflow (or for clang
the smull
variant as it can’t derive the types itself). The benefit of these routines is
that one
passes plenty of semantics that the compiler can generate efficient code.
thanks for hanging out here and commenting!
holger