On Sun, Dec 7, 2025 at 3:07 AM Nicholas Vinson <[email protected]> wrote:

> On 12/6/25 18:38, Uri Lublin wrote:
> > On Sat, Dec 6, 2025 at 10:54 AM Nicholas Vinson <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> >     Disable the -Wmissing-braces warning as it suggests adding braces to
> >     designated initializes in a manner that violates C++20 rules.
> >
> >     Signed-off-by: Nicholas Vinson <[email protected]
> >     <mailto:[email protected]>>
> >     ---
> >       m4/spice-compile-warnings.m4 | 1 +
> >       1 file changed, 1 insertion(+)
> >
> >     diff --git a/m4/spice-compile-warnings.m4
> b/m4/spice-compile-warnings.m4
> >     index abe4a912..d2e1acc8 100644
> >     --- a/m4/spice-compile-warnings.m4
> >     +++ b/m4/spice-compile-warnings.m4
> >     @@ -84,6 +84,7 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
> >           dontwarn="$dontwarn -Wstrict-prototypes"
> >           dontwarn="$dontwarn -Wsuggest-final-methods"
> >           dontwarn="$dontwarn -Wsuggest-final-types"
> >     +    dontwarn="$dontwarn -Wmissing-braces"
> >
> >
> > Probably better to (also?) remove "-Wmissing-braces" from the
> > list iterated by  gl_manywarn_item.
>
> Just before gl_manywarn_item there is a comment that says "List all gcc
> warning categories". That comment is why I did not remove it from the
> gl_manywarn_item list.
>
> It seemed more logically consistent to me to place it in the list and
> then use the dontwarn feature to disable the flag.
>
>
Hi Nicholas,

I think you're right.
The right way to do it is to add flags to "dontwarn".

What about the patch order, does that make sense to you ?

Thanks,
    Uri.


> That said, I am amenable to either approach; I just would want to make
> sure everyone is OK with the requested change.
>
> Thanks,
> Nicholas Vinson
>
> >
> > I suggest applying the m4 patch first (and g++ fix second) such
> > that the build works after the first patch is applied.
> >
> > Thanks,
> >      Uri
> >
> >
> >           # Get all possible GCC warnings
> >           gl_MANYWARN_ALL_GCC([maybewarn])
> >     --
> >     2.52.0
> >
>
>

Reply via email to