From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12645 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Maybe not a bug but a possible omission? Date: Wed, 28 Mar 2018 19:19:49 +0200 Message-ID: <20180328171948.GC4418@port70.net> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1522257484 11451 195.159.176.226 (28 Mar 2018 17:18:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Mar 2018 17:18:04 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) To: musl@lists.openwall.com Original-X-From: musl-return-12659-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 28 19:17:59 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1f1Ehy-0002oK-78 for gllmg-musl@m.gmane.org; Wed, 28 Mar 2018 19:17:58 +0200 Original-Received: (qmail 15671 invoked by uid 550); 28 Mar 2018 17:20:02 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 15648 invoked from network); 28 Mar 2018 17:20:01 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:12645 Archived-At: * Jon Scobie [2018-03-28 14:33:23 +0100]: > Well, I definitely agree that instead of definitions like > > #define INT64_MIN (-1-0x7fffffffffffffff) > > we should have > > #define INT64_MIN (-1 - INT64_C(0x7fffffffffffffff)) > why? "The macro INTN_C(value) shall expand to an integer constant expression corresponding to the type int_leastN_t" i dont think it is necessary or appropriate: the c rules already handles this portably: the const has the lowest rank 64bit signed int type, any additional complication can just get the type wrong.