From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: spandsp build, lrint/sqrt/pow issue
Date: Tue, 18 Dec 2012 12:45:09 +0100 [thread overview]
Message-ID: <20121218114508.GV23126@port70.net> (raw)
In-Reply-To: <50D0080D.6020005@ojab.ru>
* ojab <ojab@ojab.ru> [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
but you should cut down the test case to a smaller one,
i cannot do that without clang, the (void*)1 was just
my best guess
i assume the fp and float checks work in clang
so a smaller test case could be:
// should be the same as __typeof__(*(double*)0) x;
__typeof__(*(
0 ? (__typeof__(0 ? (double *)0 : (void *)0))0 :
0 ? (__typeof__(0 ? (double _Complex *)0 : (void *)1))0 :
(__typeof__(0 ? (__typeof__(1) *)0 : (void *)1))0 )) x;
if this fails like the original one then you can cut down
even more by checking the individual branches:
// double* x
__typeof__(0 ? (double *)0 : (void *)1) x;
// double _Complex* y
__typeof__(0 ? (double _Complex *)0 : (void *)1) y;
// void* z
__typeof__(0 ? (__typeof__(1) *)0 : (void *)1) z;
etc.
if the above works then the error is in the
__IS_FP or FLT or FLTCX macros
next prev parent reply other threads:[~2012-12-18 11:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 9:49 ojab
2012-12-14 12:40 ` Szabolcs Nagy
2012-12-14 12:59 ` ojab
2012-12-14 13:33 ` Szabolcs Nagy
2012-12-14 14:21 ` ojab
2012-12-14 19:47 ` ojab
2012-12-15 0:47 ` Szabolcs Nagy
2012-12-16 10:29 ` ojab
2012-12-16 14:12 ` Szabolcs Nagy
2012-12-18 6:07 ` ojab
2012-12-18 11:45 ` Szabolcs Nagy [this message]
2012-12-18 12:31 ` Szabolcs Nagy
2012-12-18 13:50 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121218114508.GV23126@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).