This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Another build failure with ToT GCC
- From: Steve Ellcey <sellcey at cavium dot com>
- To: libc-alpha <libc-alpha at sourceware dot org>
- Date: Fri, 22 Dec 2017 09:26:14 -0800
- Subject: Another build failure with ToT GCC
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve dot Ellcey at cavium dot com;
- Reply-to: sellcey at cavium dot com
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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]); });
^~~~~~~~~~~~~