Another build failure with ToT GCC
Steve Ellcey
sellcey@cavium.com
Fri Dec 22 17:26:00 GMT 2017
Looks like we have another new warning from ToT GCC when building ToT glibc.
psiginfo.c: In function âpsiginfoâ:
psiginfo.c:120:15: error: void value not ignored as it ought to be
    offarr_len = array_length (C (codes_, sig));         \
               ^
psiginfo.c:123:4: note: in expansion of macro âHâ
    H (SIGILL);
    ^
I am looking to see what GCC change caused this, a cutdown test case for
this follows.  I don't know if the code is correct or not.
Steve Ellcey
sellcey@cavium.com
% cat x.c
static const char c[] = {0,1,2};
int foo(void)
{
long len = __extension__ ({ _Static_assert (!__builtin_types_compatible_
p (__typeof (c), __typeof (&(c)[0])), "argument must be an array"); sizeof (c) /
 sizeof ((c)[0]); });
return len;
}
% install/bin/gcc -O2 -g -std=gnu11Â Â -Wall -Werror -c x.c
x.c: In function âfooâ:
x.c:5:13: error: void value not ignored as it ought to be
 long len = __extension__ ({ _Static_assert (!__builtin_types_compatible_p (__typeof (c), __typeof (&(c)[0])), "argument must be an array"); sizeof (c) / sizeof ((c)[0]); });
             ^~~~~~~~~~~~~
More information about the Libc-alpha
mailing list