mailing list of musl libc
 help / color / mirror / code / Atom feed
From: ojab <ojab@ojab.ru>
To: musl@lists.openwall.com
Subject: Re: spandsp build, lrint/sqrt/pow issue
Date: Sun, 16 Dec 2012 14:29:00 +0400	[thread overview]
Message-ID: <50CDA26C.4010908@ojab.ru> (raw)
In-Reply-To: <20121215004706.GR23126@port70.net>

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

On 15.12.2012 04:47, Szabolcs Nagy wrote:
> * ojab<ojab@ojab.ru>  [2012-12-14 23:47:28 +0400]:
>> >On 14.12.2012 18:21, ojab wrote:
>> >?and it is still broken with gcc (GCC) 4.8.0 20121209 (experimental)
>> >
>> >awgn.c:109:5: error: void value not ignored as it ought to be
> interesting
>
>> >Filledhttp://gcc.gnu.org/bugzilla/show_bug.cgi?id=55695
> thanks
>

Just FYI: I've bisected gcc, first bad commit is 
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a75b1c712f1eaddc69919461ead67f4ac21663fe
Looks like a bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31871 can 
be related.

Please note that clang also fails the testcase and the errors/warnings 
are aligned with gcc's (in the attached files).

//wbr ojab

[-- Attachment #2: clang.log --]
[-- Type: text/plain, Size: 2462 bytes --]

/tmp/retcast.c:38:7: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-pointer-cast]
  x = xpow(2,2);
      ^
/tmp/retcast.c:33:26: note: expanded from macro 'xpow'
#define xpow(x,y)        __tg_real_complex_pow((x), (y))
                         ^
/tmp/retcast.c:24:38: note: expanded from macro '__tg_real_complex_pow'
#define __tg_real_complex_pow(x, y) (__RETCAST_2(x, y)( \
                                     ^
/tmp/retcast.c:17:3: note: expanded from macro '__RETCAST_2'
                (void *)!((!__IS_FP(x) || !__IS_FP(y)) && __FLT((x)+(y)+1.0f))))0 : \
                ^
/tmp/retcast.c:38:7: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-pointer-cast]
  x = xpow(2,2);
      ^
/tmp/retcast.c:33:26: note: expanded from macro 'xpow'
#define xpow(x,y)        __tg_real_complex_pow((x), (y))
                         ^
/tmp/retcast.c:24:38: note: expanded from macro '__tg_real_complex_pow'
#define __tg_real_complex_pow(x, y) (__RETCAST_2(x, y)( \
                                     ^
/tmp/retcast.c:21:3: note: expanded from macro '__RETCAST_2'
                (void *)((!__IS_FP(x) || !__IS_FP(y)) && (__FLT((x)+(y)+1.0f) || __FLTCX((x)+(y))))))0 )))
                ^
/tmp/retcast.c:38:5: error: assigning to 'double' from incompatible type 'typeof (*(0 ? (typeof (0 ? (double *)0 : (void *)!((!!!((1 ? 1 : ((2))) / 2) || !!!((1 ? 1 : ((2))) / 2)) && ((!!((1 ? 1 : (((2)) + ((2)) + 1.F)) / 2) && 2 * sizeof (((2)) + ((2)) + 1.F) == sizeof ((((2)) + ((2)) + 1.F) + (__extension__ 1.Fi))) && sizeof (((2)) + ((2)) + 1.F) == sizeof(float)))))0 : 0 ? (typeof (0 ? (_Complex double *)0 : (void *)!((!!!((1 ? 1 : ((2))) / 2) || !!!((1 ? 1 : ((2))) / 2)) && ((!!((1 ? 1 : (((2)) + ((2)))) / 2) && sizeof (((2)) + ((2))) == sizeof ((((2)) + ((2))) + (__extension__ 1.Fi))) && sizeof (((2)) + ((2))) == sizeof(_Complex float)))))0 : (typeof (0 ? (typeof (((2)) + ((2))) *)0 : (void *)((!!!((1 ? 1 : ((2))) / 2) || !!!((1 ? 1 : ((2))) / 2)) && (((!!((1 ? 1 : (((2)) + ((2)) + 1.F)) / 2) && 2 * sizeof (((2)) + ((2)) + 1.F) == sizeof ((((2)) + ((2)) + 1.F) + (__extension__ 1.Fi))) && sizeof (((2)) + ((2)) + 1.F) == sizeof(float)) || ((!!((1 ? 1 : (((2)) + ((2)))) / 2) && sizeof (((2)) + ((2))) == sizeof ((((2)) + ((2))) + (__extension__ 1.Fi))) && sizeof (((2)) + ((2))) == sizeof(_Complex float))))))0))' (aka 'void')
  x = xpow(2,2);
    ^ ~~~~~~~~~
2 warnings and 1 error generated.

[-- Attachment #3: gcc.log --]
[-- Type: text/plain, Size: 1349 bytes --]

/tmp/retcast.c: In function ‘main’:
/tmp/retcast.c:17:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (void *)!((!__IS_FP(x) || !__IS_FP(y)) && __FLT((x)+(y)+1.0f))))0 : \
   ^
/tmp/retcast.c:24:38: note: in expansion of macro ‘__RETCAST_2’
 #define __tg_real_complex_pow(x, y) (__RETCAST_2(x, y)( \
                                      ^
/tmp/retcast.c:33:26: note: in expansion of macro ‘__tg_real_complex_pow’
 #define xpow(x,y)        __tg_real_complex_pow((x), (y))
                          ^
/tmp/retcast.c:38:7: note: in expansion of macro ‘xpow’
   x = xpow(2,2);
       ^
/tmp/retcast.c:21:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (void *)((!__IS_FP(x) || !__IS_FP(y)) && (__FLT((x)+(y)+1.0f) || __FLTCX((x)+(y))))))0 )))
   ^
/tmp/retcast.c:24:38: note: in expansion of macro ‘__RETCAST_2’
 #define __tg_real_complex_pow(x, y) (__RETCAST_2(x, y)( \
                                      ^
/tmp/retcast.c:33:26: note: in expansion of macro ‘__tg_real_complex_pow’
 #define xpow(x,y)        __tg_real_complex_pow((x), (y))
                          ^
/tmp/retcast.c:38:7: note: in expansion of macro ‘xpow’
   x = xpow(2,2);
       ^
/tmp/retcast.c:38:5: error: void value not ignored as it ought to be
   x = xpow(2,2);
     ^

  reply	other threads:[~2012-12-16 10:29 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 [this message]
2012-12-16 14:12               ` Szabolcs Nagy
2012-12-18  6:07                 ` ojab
2012-12-18 11:45                   ` Szabolcs Nagy
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=50CDA26C.4010908@ojab.ru \
    --to=ojab@ojab.ru \
    --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).