From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7458 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 11:56:30 +0300 (MSK) Message-ID: References: <20150420211359.GS6817@brightrain.aerifal.cx> <20150421013525.GT6817@brightrain.aerifal.cx> <1429601413.3111.1.camel@inria.fr> 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 1429606605 24597 80.91.229.3 (21 Apr 2015 08:56:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Apr 2015 08:56:45 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7471-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 21 10:56:45 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 1YkTz2-0000tM-2m for gllmg-musl@m.gmane.org; Tue, 21 Apr 2015 10:56:44 +0200 Original-Received: (qmail 7336 invoked by uid 550); 21 Apr 2015 08:56:42 -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 7318 invoked from network); 21 Apr 2015 08:56:42 -0000 In-Reply-To: <1429601413.3111.1.camel@inria.fr> User-Agent: Alpine 2.11 (LNX 23 2013-08-11) Xref: news.gmane.org gmane.linux.lib.musl.general:7458 Archived-At: On Tue, 21 Apr 2015, Jens Gustedt wrote: > Since such a solution would use a gcc'ish extension __typeof__, > anyhow, perhaps it would be preferable to use another one, namely > __builtin_choose_expr: > > #define __scc(X) __builtin_choose_expr(sizeof(1?(X):0ULL) < 8, (unsigned long) (X), (long long) (X)) > > if that helps to quiencen the warning? It doesn't help: the warning is still produced for the unevaluated branch of __builtin_choose_expr, similarly to ternary operator (I tested with gcc-4.8). My __scc1 could be written a bit simpler: #define __scc1(X) (__typeof__((X)-(X))) (X) but still it doesn't work for pointers to void or incomplete types. Alexander