|
From: | Ravi Desai |
Subject: | Re: EMACS_INT to EMACS_UINT |
Date: | Mon, 5 Dec 2016 08:56:40 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
On 2016-12-04 09:00 PM, Paul Eggert wrote:
Ah, ok. I was thrown off by the lack of explicit casting. Sorry about that, and thanks for the explanation.On 12/04/2016 03:16 PM, Ravi Desai wrote:Is this something that we should change? The code is workingI'm not sure what you'd change. In many places the Emacs C code relies on the fact that unsigned arithmetic is modulo 2**N, where N is the width of the unsigned integer, so that (for example) converting -1 to unsigned yields UINT_MAX. XLI and XIL are intended for low-level use, where this part of C semantics is assumed to be well-understood.
[Prev in Thread] | Current Thread | [Next in Thread] |