[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work1) now available
- From: Miles Bader <miles@...>
- Date: Tue, 09 Jul 2013 10:29:29 +0900
William Ahern <william@25thandClement.com> writes:
> Why even bother with the explicit conversions? If you're relying on
> two's-complement behavior, it's unnecessary. If you're not, it's
> insufficient. Am I missing something?
Without the casts, you might get signed overflow, and signed overflow
has undefined results in C. Real compilers take advantage of this
during optimization (it's not just a theoretical issue), meaning that
the result may not be what you wanted, even when the hardware itself
uses a straightforward twos-complement representation...
-miles
--
I'm beginning to think that life is just one long Yoko Ono album; no rhyme
or reason, just a lot of incoherent shrieks and then it's over. --Ian Wolff
- References:
- [ANN] Lua 5.3.0 (work1) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.3.0 (work1) now available, liam mail
- Re: [ANN] Lua 5.3.0 (work1) now available, Miles Bader
- Re: [ANN] Lua 5.3.0 (work1) now available, liam mail
- Re: [ANN] Lua 5.3.0 (work1) now available, Miles Bader
- Re: [ANN] Lua 5.3.0 (work1) now available, Tony Finch
- Re: [ANN] Lua 5.3.0 (work1) now available, Philipp Janda
- Re: [ANN] Lua 5.3.0 (work1) now available, Finn Wilcox
- Re: [ANN] Lua 5.3.0 (work1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.3.0 (work1) now available, Jay Carlson
- Re: [ANN] Lua 5.3.0 (work1) now available, William Ahern