<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">While the analyzer doesn't explicitly reason about complex numbers yet, it shouldn't issue a warning here either. Can you file a bugzilla report with a self-contained test case?<div><br><div><div>On May 10, 2011, at 5:26 AM, Jonathan Sauer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hello,</div><div><br></div><blockquote type="cite">In case anyone is interested, I ran the clang analyzer on glibc 2.13.<br>The resulting report can be downloaded here :<br><br><a href="http://sites.google.com/site/clanganalyzer/home/glibc-213">http://sites.google.com/site/clanganalyzer/home/glibc-213</a><br></blockquote><div><br></div><div>Interesting. Luckily for getopt.c, the clang analyzer does not include a check for copied&pasted</div><div>code ;-)</div><div><br></div><div>Some of the reports seem to be false positives, though; e.g s_cosf.c:</div><div><br></div><div><div>66<span class="Apple-tab-span" style="white-space: pre; "> </span> __complex__ float y;</div><div>67<span class="Apple-tab-span" style="white-space:pre"> </span> </div><div>68<span class="Apple-tab-span" style="white-space:pre"> </span> __real__ y = -__imag__ x;</div><div>69<span class="Apple-tab-span" style="white-space:pre"> </span> __imag__ y = __real__ x;</div><div>70<span class="Apple-tab-span" style="white-space:pre"> </span> </div><div>71<span class="Apple-tab-span" style="white-space:pre"> </span> res = __ccoshf (y);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>2<span class="Apple-tab-span" style="white-space:pre"> </span>Function call argument is an uninitialized value</div></div><br><div>It seems that the clang analyzer does not understand glibc's handling of complex numbers and thus</div><div>does not notice that "y" is initialized in lines 68f.</div><div><br></div><div><br></div><div>Jonathan</div><div><br></div></div>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></div></body></html>