From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: QEMU <qemu-devel@nongnu.org>
Subject: Re: Compiling QEMU with different optimization levels & -Werror=maybe-uninitialized
Date: Wed, 27 Mar 2024 11:41:48 +0000 [thread overview]
Message-ID: <ZgQF_IeINhl2ulLT@redhat.com> (raw)
In-Reply-To: <CAJ+F1CLrKKv=Kv_Aagii4B5eATmXoKGz0ka5-m82+Eeq0uknvA@mail.gmail.com>
On Wed, Mar 27, 2024 at 03:28:08PM +0400, Marc-André Lureau wrote:
> Hi,
>
> Depending -Doptimization=<value>, I get different results (GCC 13.2.1)
> - g: produces -Werror=maybe-uninitialized errors
> - 0: clean build
> - 1: produces -Werror=maybe-uninitialized errors
> - 2: clean build
> - 3: produces few -Werror=maybe-uninitialized errors
> - s: produces -Werror=maybe-uninitialized errors
>
> They are about 20, probably false-positives, although it's
> understandable the compiler is confused as I am too sometime!
If any of those maybe-uninitialized warnings are genuine bugs, our
use of use of -ftrivial-auto-var-init provides a safety net that
protects us....
>
> Is it a known issue? Are we willing to help the compiler in all those
> optimization levels? I can send a patch series for review in this
> case.
...none the less, IMHO, it is good practice to initialize all local stack
allocated variables at time of declaration no matter what. So if you have
patches to clear those false positives, I'd suggest we just do it.
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 :|
prev parent reply other threads:[~2024-03-27 11:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 11:28 Compiling QEMU with different optimization levels & -Werror=maybe-uninitialized Marc-André Lureau
2024-03-27 11:41 ` Daniel P. Berrangé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZgQF_IeINhl2ulLT@redhat.com \
--to=berrange@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.