This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: -Werror now enabled by default
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, <libc-alpha at sourceware dot org>
- Date: Wed, 10 Dec 2014 09:23:53 -0800
- Subject: Re: -Werror now enabled by default
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1412101250150 dot 19440 at digraph dot polyomino dot org dot uk>
- Reply-to: <sellcey at imgtec dot com>
On Wed, 2014-12-10 at 12:55 +0000, Joseph Myers wrote:
> In any case, I did test for and fix various warnings on 32-bit x86, ARM,
> MIPS and Power during the process of getting the build clean for x86_64 -
> even if they aren't 100% clean right now, there are plenty of examples of
> fixing warnings to take as a guide for fixing others.
I am getting a build failure on MIPS. I think it is because I am
building with a Top-of-tree GCC.
malloc.c: In function '__posix_memalign':
malloc.c:4976:50: error: logical not is only applied to the left hand
side of comparison [-Werror=logical-not-parentheses]
|| !powerof2 (alignment / sizeof (void *)) != 0
^
cc1: all warnings being treated as errors
I am not sure how we should rewrite this statement. I can fix
the warning/error by changing:
!powerof2 (alignment / sizeof (void *)) != 0
to
(!powerof2 (alignment / sizeof (void *))) != 0
but isn't that just equivalent to:
powerof2 (alignment / sizeof (void *)) == 0
Steve Ellcey
sellcey@imgtec.com