On May 30, 2013 11:50 AM, "Bram Moolenaar" <[email protected]> wrote:
>
>
> Elias Diem wrote:
>
> > I get another compile warning:
> >
> > ---------------------------------------
> > In file included from regexp.c:7811:0:
> > regexp_nfa.c: In function ‘addstate’:
> > regexp_nfa.c:2820:36: warning: ‘save_ptr’ may be used uninitialized in
this function [-Wuninitialized]
> > ---------------------------------------
> >
> > The version info:
> >
> > ---------------------------------------
> > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 30 2013 16:20:55)
> > Included patches: 1-1070
> > Huge version with GTK2 GUI.  Features included (+) or not (-):
> > ---------------------------------------
>
> I'll inintialize the variable.
>
> I wonder why it doesn't complain about save_lpos.

The uninitialized variable detection in GCC may miss scenarios due to other
optimizations. It is also tries to avoid false positives, so if a situation
isn't clear for some reason it won't emit the warning.

See http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings for more info.

-- 
-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui