|
Message-ID: <alpine.LNX.2.11.1504211148400.2677@monopod.intra.ispras.ru> Date: Tue, 21 Apr 2015 11:56:30 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: musl@...ts.openwall.com Subject: Re: x86_64 and x32 fail to build 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.