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: -Werror now enabled by default


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).



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