On Fri, Dec 12, 2025 at 7:56 AM Nicholas Vinson <[email protected]> wrote:
> > > On 12/11/25 13:48, Uri Lublin wrote: > > > > > > On Thu, Dec 11, 2025 at 2:38 PM Nicholas Vinson <[email protected] > > <mailto:[email protected]>> wrote: > > > > On 12/11/25 06:55, Frediano Ziglio wrote: > > > On Sun, 7 Dec 2025 at 12:20, Nicholas Vinson > > <[email protected] <mailto:[email protected]>> wrote: > > >> > > >> When building with g++-16, the build fails with the following > error: > > >> > > >> server/tests/test-display-base.cpp:809:5: error: either all > > initializer > > >> clauses should be designated or none of them should be > > >> > > >> This is because g++-16 defaults to c++20 and when using > designated > > >> initializers with c++20, you don't wrap anonymous union fields > > with braces. > > >> > > >> Nicholas Vinson (2): > > >> m4/spice-compile-warnings.m4: disable -Wmissing-braces > > >> test-display-base.cpp: adjust designated init. > > >> > > >> m4/spice-compile-warnings.m4 | 1 + > > >> server/tests/test-display-base.cpp | 2 +- > > >> 2 files changed, 2 insertions(+), 1 deletion(-) > > >> > > > > > > The CI is not that happy. I added some commit to make it pass: > > > - missing AUTHORS for "make syntax-check" > > > https://gitlab.freedesktop.org/fziglio/spice/-/commit/ > > fb018b3fbb26f38b2ffb0ee569d4aafc287fc738 <https:// > > gitlab.freedesktop.org/fziglio/spice/-/commit/ > > fb018b3fbb26f38b2ffb0ee569d4aafc287fc738> > > > - too old Fedora (not related to these changes) > > > https://gitlab.freedesktop.org/fziglio/spice/-/commit/ > > a4525e204ef8b7e3beb3709823029e27de633d7a <https:// > > gitlab.freedesktop.org/fziglio/spice/-/commit/ > > a4525e204ef8b7e3beb3709823029e27de633d7a> > > > - compatibility with pretty old GCC > > > https://gitlab.freedesktop.org/fziglio/spice/-/ > > commit/6a2c24fd5c088cb3b016a40965882e98f010b583 <https:// > > gitlab.freedesktop.org/fziglio/spice/-/ > > commit/6a2c24fd5c088cb3b016a40965882e98f010b583> > > > > > > Frediano, where did you take the 10 from ? > > Shouldn't it check if the gcc version is 16 (or even 20) ? > > > > > > > > I'm concerned about the old GCC compatibility commit. I think it > would > > be more robust if designated initializer feature checks were added to > > configure.ac <http://configure.ac> and meson.build instead. > > > > That way you don't have to worry about how old or new the compiler > > is or > > if it implements the necessary GCC extensions, or implements them > > correctly. > > > > > > Do you mean compiling a simple program with designated initializers in > > meson/configure ? > > That's exactly what I mean. > It is a bit safer, but I think we can trust gcc in this case, like Frediano's patch does. Thanks, Uri. > > Regards, > Nicholas Vinson > > > > > Regards, > > Uri. > > > > > > Regards, > > Nicholas Vinson > > > > > > > > Do they sound good? > > > I suppose the compatibility one could be merged. > > > > > > Regards, > > > Frediano > > > >
