On Wed, Mar 11, 2026 at 08:28:01AM +0100, Thomas Huth wrote: > On 11/03/2026 00.06, nia wrote: > > On Tue, Mar 10, 2026 at 04:47:30PM +0100, Thomas Huth wrote: > > > According to that URL from NetBSD that I posted above, they are still > > > using > > > LLVM 10.0 in NetBSD 10 ... which is also our current minimum version of > > > Clang, so I assume we're still stuck with Clang v10 for a while? > > > > Since I was CCed in this discussion - can I ask why qemu is targeting > > compiler versions instead of C standard revisions? > > Hi! > > QEMU already uses std=gnu11. The problem is that different compiler versions > emit different warnings, and with older compilers, there are often warnings > that are false positives (see e.g. > https://lore.kernel.org/qemu-devel/[email protected]/ that just has > been posted to the mailing list recently). The QEMU project tries to avoid > supporting operating systems / build environments that are too old (see > https://www.qemu.org/docs/master/about/build-platforms.html), we often just > don't have the capacity in the developer community to handle that, so that's > why we put compiler checks into place to avoid wrong expectations for the > users.
Furthermore, the minimum GCC + CLang versions are what we use to determine what GNU C standard revision we can set as our baseline. For example see this previous commit: commit 8a9d3d564093dbd5a7339085406e840893944d21 Author: Richard Henderson <[email protected]> Date: Mon Jun 14 16:31:36 2021 -0700 configure: Use -std=gnu11 Now that the minimum gcc version is 7.5, we can use C11. This will allow lots of cleanups to the code, currently hidden behind macros in include/qemu/compiler.h. With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
