On Sa, 18 Okt 2025, John wrote:

> On 18-Oct-2025 05:00, Christian Brabandt wrote:
> > On Do, 16 Okt 2025, Tony Mechelynck wrote:
> > 
> > > This happens in Normal and Huge builds, not in Tiny. Also in Normal
> > > with Motif GUI but not in Tiny with Motif GUI:
> > > 
> > > normal.c: In function ‘normal_cmd’:
> > > normal.c:991:19: warning: ‘prev_VIsual_active’ may be used
> > > uninitialized [-Wmaybe-uninitialized]
> > >    991 |     if (finish_op || prev_VIsual_active)
> > >        |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
> > > normal.c:972:9: note: ‘prev_VIsual_active’ was declared here
> > >    972 |     int prev_VIsual_active = VIsual_active;
> > >        |         ^~~~~~~~~~~~~~~~~~
> > > 
> > > I think it's over-cautiousness on the part of  gcc (SUSE Linux) 15.2.1
> > > 20251006. It may look silly, but what about replacing line 972 by the
> > > following?
> > > 
> > > /* avoid gcc warning -Wmaybe-uninitialized a little lower */
> > > int prev_Visual_active = 0;
> > > prev_Visual_active = Visual_active;
> > I don't understand how this can happen and the warning already shows
> > that prev_VIsual_active has been initialized, so not sure.
> > 
> > Well, I installed gcc-15 on my Debian box, but it doesn't complain.

> Perhaps the warning comes about because the various goto statements (at
> lines 831, 836, 861 and 920) will take us to line 986 which is below the
> initialisation of prev_VIsual_active at line 972.

Ah yes, possible. Let's see if https://github.com/vim/vim/pull/18597 
fixes this warning.

Thanks,
Christian
-- 
I'm ANN LANDERS!!  I can SHOPLIFT!!

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/aPOVzzuMtrnBixoT%40256bit.org.

Raspunde prin e-mail lui