This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Avoid "inline" after return type in function definitions
On Fri, 15 Feb 2019, Florian Weimer wrote:
> My concern is that the dependency on -Wextra makes building glibc with
> stock configure flags even more difficult than it is today. -Wextra
> seems to be some sort of dumping ground for things that aren't ready yet
> for -Wall for various reasons, and most of the GCC developers I talk to
> regularly strongly recommend not use -Wall -Werror (like we do). -Wall
> -Wextra -Werror would be worse.
However, there are lots of miscellaneous warnings in -Wextra that are
individually unlikely to occur in the glibc sources but still indicate
useful cleanups if they do occur (qualified return types, overridden
initializers, ordered comparisons with void *, ...) - so if you use a list
of individual options instead of -Wextra, there are lots that are
appropriate to use, and the list increases with each GCC version so you
keep needing configure tests for new options.
(It may be necessary to use configure tests for some -Wno- options -
unknown -Wno- options are ignored by default if no warnings occur, but
there might be issues where some other warning occurs, with -Wno-error=
meaning it's not an error but the warning for an unknown -Wno- option in
the presence of other warnings gets turned into an error.)
--
Joseph S. Myers
joseph@codesourcery.com