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]

Re: Build failure during test run with latest GCC


On Wed, 2017-07-19 at 12:31 -0500, Zack Weinberg wrote:
> On Wed, Jul 19, 2017 at 10:59 AM, Steve Ellcey <sellcey@cavium.com>
> wrote:
> > 
> > I just built the latest glibc with the latest GCC and then tried to
> > run the glibc testsuite.  The build of some of the tests died with following
> > error, has anyone else seen this?  I am guessing that this may be due to a
> > new GCC error/warning but I didn't see any obvious change in the GCC log
> > that would have caused it.
> Those are some scary-looking macros, but I'm pretty sure they're the
> way they are on purpose, and avoiding this warning seems like it would
> be more trouble than it's worth; maybe we should just disable it for
> that file or set of files.
> 
> zw

I agree.  At first I thought these could be fixed or removed but I
didn't realize how many tests include them.  The errors only seem to
pop up for TST_DO_TEST and TST_DO_REC when they are used in another
macro and that is not too difficult to avoid (though it introduces
some redundant code by copying the body of those macros into other
macros that are in tst_funcs.h (2 copies of each macro).

TST_IF_RETURN would be harder to fix since it deliberately has a
dangling else clause that many tests use.  I will look at adding
a flag.  Is there a way to add a flag for a complete section vs.
adding a flag to be used for a single test.  I think adding this
to locale/Makefile might work:

locale-CFLAGS = -Wno-multistatement-macros

I haven't tried it yet.  It looks like this is not the only new warning
with the latest GCC:



nss_test1.c:60:46: error: division ‘sizeof (struct passwd *) / sizeof
(struct passwd)’ does not compute the number of array elements [-
Werror=sizeof-pointer-div]
 #define default_npwd_data (sizeof (pwd_data) / sizeof (pwd_data[0]))




Steve Ellcey
sellcey@cavium.com


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