From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7455 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: x86_64 and x32 fail to build Date: Tue, 21 Apr 2015 02:56:27 +0300 (MSK) Message-ID: References: <20150420211359.GS6817@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: ger.gmane.org 1429574201 16344 80.91.229.3 (20 Apr 2015 23:56:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Apr 2015 23:56:41 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7468-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 21 01:56:41 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YkLYO-0005Rt-I5 for gllmg-musl@m.gmane.org; Tue, 21 Apr 2015 01:56:40 +0200 Original-Received: (qmail 30707 invoked by uid 550); 20 Apr 2015 23:56:39 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30689 invoked from network); 20 Apr 2015 23:56:38 -0000 In-Reply-To: User-Agent: Alpine 2.11 (LNX 23 2013-08-11) Xref: news.gmane.org gmane.linux.lib.musl.general:7455 Archived-At: > When building without --enable-warnings, there are many false positives from > -Wpointer-to-int-cast about x32 __scc(); at least from 4.5 onwards GCC enables > this warning by default, so perhaps if musl really wants to silence it, it > should test the corresponding -Wno-... flag outside of x$warnings == xyes > test? Could it be possible that implementation of __scc() can be adjusted to avoid triggering the warning? I hoped the following would achieve that: // Cast X to signed integral type of corresponding size #define __scc1(X) (__typeof__((X)-(__typeof__(1?(X):0))0)) (X) #define __scc(X) sizeof(1?(X):0ULL) < 8 ? (unsigned long) __scc1(X) : (long long) __scc1(X) ... but unfortunately it doesn't work with -Werror=pointer-arith when type of X is 'void *'. Alexander