Re: [PATCH 01/19] build-sys: drop -Winline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 29, 2025 at 05:40:23PM +0400, marcandre.lureau@xxxxxxxxxx wrote:
> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> 
> The warning is triggered when compiling with various build options, such
> as -Doptimization=g.
> 
> From gcc(1) man page about -Winline:
> seemingly insignificant changes in the source program can cause the warnings produced by -Winline to appear or disappear.
> 
> Such flaky behaviour is best left to the user discretion.

IME it is not nearly as unreliable as that man page suggests. We have
used '-Winline' by default for 18 years now with no significant reports
of trouble before now that I recall, and IMHO it is useful to flag cases
where contributors add pointless 'inline' annotations.

If 'g' is known to create trouble though  we could add a check for
get_option('optimization') == 'g' and add -Wno-inline to override
our default falgs.

> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> ---
>  meson.build | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index c7e5947d10..15f5a0fe74 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -340,7 +340,6 @@ cc_flags += [
>    '-Wimplicit-int',
>    '-Wincompatible-pointer-types',
>    '-Winit-self',
> -  '-Winline',
>    '-Wint-conversion',
>    '-Wint-in-bool-context',
>    '-Wint-to-pointer-cast',
> -- 
> 2.47.0
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux