On Sat, Feb 07, 2015 at 03:42:50PM +0000, Mike Williams wrote: > I have looked through the potentially uninitialised variables reported for > my usual Windows builds and they all look benign. It seems the compiler is > just spotting branches in the code where the variable is not assigned to but > is used later. A simplistic example is: > > int foo, bar; > > if (a) > foo = bar; > else > bar = 1; > > if (a) > bar += 2*foo; > > This generates a warning since it doesn't spot that foo is initialised and > referenced under the same condition.
Well, bar when a is true, then bar is uninitialized and when a is false, foo is uninitialized. Maybe that wasn't the example you meant. -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]> -- -- 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/d/optout.
