From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ravi Desai Newsgroups: gmane.emacs.devel Subject: Re: EMACS_INT to EMACS_UINT Date: Mon, 5 Dec 2016 08:56:40 -0500 Message-ID: <62201b47-8325-7ca3-b1c3-cc1360768b3f@ravidesai.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1480946217 3356 195.159.176.226 (5 Dec 2016 13:56:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Dec 2016 13:56:57 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 05 14:56:54 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDtlE-0008PO-Bs for ged-emacs-devel@m.gmane.org; Mon, 05 Dec 2016 14:56:52 +0100 Original-Received: from localhost ([::1]:40586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDtlI-00017N-7u for ged-emacs-devel@m.gmane.org; Mon, 05 Dec 2016 08:56:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDtl8-00016F-UI for emacs-devel@gnu.org; Mon, 05 Dec 2016 08:56:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDtl5-0005Wd-46 for emacs-devel@gnu.org; Mon, 05 Dec 2016 08:56:47 -0500 Original-Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:36832) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cDtl4-0005WU-Ur for emacs-devel@gnu.org; Mon, 05 Dec 2016 08:56:43 -0500 Original-Received: by mail-oi0-x230.google.com with SMTP id v84so338539899oie.3 for ; Mon, 05 Dec 2016 05:56:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravidesai-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=hPQDmIb4CSAjTxFRhkCuspTuTreD0z8lok33ycaw9ts=; b=He6ZBJOOCA5EFsM6eOyB7TQp+uHE+tzQMlKOipR3YXsCp7YZPRrarq/Z9cUIcHXNOB vIvXK/3Jqxx5z+Qz736qI+jm9PO3uVzN6cKoUx/hTDIrXoYLKU7esCypQWFOu2lJ5GOs vD0PYbA0rgcGF9+hdyhSl39jRXAFp/tZT3z4suG5TXIVsC5nz6KQBvrMdyROFmvw2FnQ ZaANpf2jV+CGiE2ctSxAeLBBK1BlQsJ0IIXPhIZwVS8lcQEG78ggeBqt0tP+V7zEuIYt ezC/sgnGbCzTtkML0S4+ZsC7sUoV9kprtSmKLtQFnHNUK/PbyKHRZJ0borqkV5ZeZuQ5 TSEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=hPQDmIb4CSAjTxFRhkCuspTuTreD0z8lok33ycaw9ts=; b=XSHpRP2alpXKa+obnPVM9aILQ+uLFxuNejuX98vkYH+Ve7WXFgTbOSifTbsyByraqv KiwILUaJUYyc9JErUxZqXssFu6s5fZtScevpsLRgzUws35wM2v0dR523STNrVQehWQnN hURYVEzXkLbXfX2DznZUsW1+iG8OoGpqcm0e7iqLeSFoWeikoEgxcUUzVUMdLB1QZGY2 /GLutl3Uo3Az5lQdZ+9UttYcHZNKlUCZsLbPIzcWzy3UK3RMfg9MYe1T8Lux2QXqQpmp mTwY5ao5aWQst0/J/ct5DvUhOHODFw112IDF5KsWCdFwUKUp3XLlmO3WSZGjbgEts6H2 KSgA== X-Gm-Message-State: AKaTC03Z0wiNCJMxNWkVJ3kbpVT1JvPHp9uV2SmdXRCDAfFxyY4r7YmdEIKx5ONdA9kHWA== X-Received: by 10.36.17.194 with SMTP id 185mr8477885itf.46.1480946202102; Mon, 05 Dec 2016 05:56:42 -0800 (PST) Original-Received: from [192.168.0.101] (24-52-220-47.cable.teksavvy.com. [24.52.220.47]) by smtp.googlemail.com with ESMTPSA id c101sm7171278ioj.25.2016.12.05.05.56.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2016 05:56:41 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210057 Archived-At: 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.