This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: -Werror now enabled by default
- From: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 11 Dec 2014 11:00:02 +0100
- Subject: Re: -Werror now enabled by default
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1412100115170 dot 18857 at digraph dot polyomino dot org dot uk> <mvmiohjsci8 dot fsf at hawking dot suse dot de> <alpine dot DEB dot 2 dot 10 dot 1412101621480 dot 32166 at digraph dot polyomino dot org dot uk>
Hi,
i get the same error on s390x with gcc 4.8.3.
Adding a "DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Winline");" before #include
"locfile.h" doesn´t ignores the inlining warning with gcc 4.8.3.
There is no warning with gcc 4.9.0.
Adding CFLAGS-locarchive.c = -Wno-inline in locale/Makefile works.
Removing the inline from maybe_swap_uint32 in locfile.h leads to:
gcc ../locale/programs/linereader.c -c ...
In file included from ../locale/programs/linereader.c:35:0:
../locale/programs/locfile.h:89:1: error: ‘maybe_swap_uint32’ defined
but not used [-Werror=unused-function]
maybe_swap_uint32 (uint32_t value)
^
cc1: all warnings being treated as errors
Bye Stefan
On 12/10/2014 05:22 PM, Joseph Myers wrote:
On Wed, 10 Dec 2014, Andreas Schwab wrote:
programs/locfile.h:85:1: error: inlining failed in call to 'maybe_swap_uint32.part.1': call is unlikely and code size would grow [-Werror=inline]
maybe_swap_uint32 (uint32_t value)
^
cc1: error: called from here [-Werror=inline]
For such -Winline errors, removing "inline" would typically be an
appropriate fix (unless we think it's important to inline the function, in
which case always_inline is appropriate).