emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EMACS_INT to EMACS_UINT


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:
On 12/04/2016 03:16 PM, Ravi Desai wrote:
Is this something that we should change? The code is working

I'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.

Ah, ok. I was thrown off by the lack of explicit casting. Sorry about that, and thanks for the explanation.




reply via email to

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