This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Another build failure with ToT GCC


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]); });
             ^~~~~~~~~~~~~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]