<p dir="ltr">Adding Richard explicitly here. :)</p>
<div class="gmail_quote">On Mar 14, 2014 4:32 PM, "Quentin Colombet" <<a href="mailto:qcolombet@apple.com">qcolombet@apple.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi,<div><br></div><div>I recently found a non-deterministic behavior in my application that was due to a missing field initialization.</div><div>Here is a snippet of the actual problem:</div>
<div><div><br></div><div>struct foo {</div><div>  foo() {}; // <— bar is not initialized here.</div><div>  int getBar() const {</div><div>    return bar; // <— this returns an uninitialized value.</div><div>  }</div>
<div>private:</div><div>  int bar;</div><div>};</div></div><div><br></div><div>I’ve compiled the attached cpp file that contains this snippet with <span style="font-family:Menlo;font-size:11px">-Wall -Wextra -Wuninitialized</span>, but no warning is issued (trunk <span style="font-family:Menlo;font-size:11px">203678</span>).</div>
<div>Is there an option to make clang warn about that?</div><div><br></div><div>If not, should I file a PR?</div><div><br></div><div>Thanks,<br><div>
<div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;white-space:normal;font-family:Helvetica;word-wrap:break-word;word-spacing:0px">
-Quentin</div>

</div>
</div></div><br><div style="word-wrap:break-word"><div></div></div>
<br>_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@cs.uiuc.edu">cfe-users@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users</a><br>
<br></blockquote></div>