From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12646 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Maybe not a bug but a possible omission? Date: Wed, 28 Mar 2018 13:54:25 -0400 Message-ID: <20180328175425.GN1436@brightrain.aerifal.cx> References: <20180328171948.GC4418@port70.net> 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 1522259561 23789 195.159.176.226 (28 Mar 2018 17:52:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Mar 2018 17:52:41 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12660-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 28 19:52:37 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 1f1FFT-000630-1t for gllmg-musl@m.gmane.org; Wed, 28 Mar 2018 19:52:35 +0200 Original-Received: (qmail 3644 invoked by uid 550); 28 Mar 2018 17:54:39 -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 3619 invoked from network); 28 Mar 2018 17:54:38 -0000 Content-Disposition: inline In-Reply-To: <20180328171948.GC4418@port70.net> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12646 Archived-At: On Wed, Mar 28, 2018 at 07:19:49PM +0200, Szabolcs Nagy wrote: > * 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. Yes. If a tool is misinterpreting the expressions here, the tool should be fixed. They all have the intended types already when evaluated as C expressions. Making random edits to headers to make buggy tools happy is not a direction I want to take. Rich