From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2500 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: spandsp build, lrint/sqrt/pow issue Date: Tue, 18 Dec 2012 13:31:49 +0100 Message-ID: <20121218123149.GW23126@port70.net> References: <20121214124026.GO23126@port70.net> <50CB22CD.1070208@ojab.ru> <20121214133342.GQ23126@port70.net> <50CB35FE.2050705@ojab.ru> <50CB8250.7090804@ojab.ru> <20121215004706.GR23126@port70.net> <50CDA26C.4010908@ojab.ru> <20121216141203.GS23126@port70.net> <50D0080D.6020005@ojab.ru> <20121218114508.GV23126@port70.net> 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 1355833922 18704 80.91.229.3 (18 Dec 2012 12:32:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2012 12:32:02 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2501-gllmg-musl=m.gmane.org@lists.openwall.com Tue Dec 18 13:32:17 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TkwLG-0005P5-5y for gllmg-musl@plane.gmane.org; Tue, 18 Dec 2012 13:32:14 +0100 Original-Received: (qmail 14189 invoked by uid 550); 18 Dec 2012 12:32:00 -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 14180 invoked from network); 18 Dec 2012 12:32:00 -0000 Content-Disposition: inline In-Reply-To: <20121218114508.GV23126@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2500 Archived-At: * Szabolcs Nagy [2012-12-18 12:45:09 +0100]: > * ojab [2012-12-18 10:07:09 +0400]: > > LLVM guys has closed http://llvm.org/bugs/show_bug.cgi?id=14618 as invalid. > > Type expression, that mentioned above, compiles without errors on > > both gcc and clang, so looks like an error anywhere else. Testcase > > was: > > int main() { > > __typeof__(0 ? (int*)0 : (void*)1) x; > > } > > they should not close the bug if they don't understand it.. > > the bug has nothing to do with integer constant expressions > > the more i look at it the more convinced i am that this > is a big fat clang bug > i take this back i found an old clang-2.7 around and i could reproduce the error with it so the problem is __typeof__(*(0 ? (double*)0 : 0 ? (void*)0 : (void*)0)) x; we expect this to be double, but clang evaluates it as void which means clang does not treat 0?(void*)0:(void*)0 as a null pointer constant which is most likely correct so then this is a gcc bug i'd let them both know about the issue meanwhile i'll try to think about a workaround.. (i'd also argue that this is a bug in the standard but then the definition of integer constant expression should be changed as well, now it seems to be that 0?(void*)0:(void*)0 is not even a 'constant expressoin' which means it cannot be used in initializers, which is absurd)