On 9/30/21 12:14 PM, Eric Pouech wrote:
which still gives me the warnings, when compiling the 32bit part of a wow64 conf
(but not on a pure 32bit conf)
your solution doesn't generate warnings on neither of the two
so will need further investigation on:
discrepency wrt wow
why the difference between the two patches
I don't get warnings with that diff either. What version of GCC do you have?
well, o well....
retesting today, and couldn't get any warnings with the patch I posted yesterday...<grrr>
moreover, in this patch, if I change the if (_control... by if (!control... (inverting the test), I get no warnings either which makes absolutely no sense
I'm starting to wonder if theĀ -Wmaybe-uninitialized warning could be a little fragile at this point
there are a couple of bugs reports on gcc bugzilla reguarding this warning
potentially bugs report like may link to the same type of issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102381
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101768
I may wait a bit to let things settle down before taking any action on this fix in msvcrt
I mean, -Wmaybe-uninitialized has always been at least somewhat heuristic, throughout the entire history of gcc, and there have been false positives and false negatives. But I've found that it tends to behave nicely for idiomatically structured code. I've found very few cases where "just initialize the variable to zero" seems like the best solution to me.