<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi,<br></div>I think I already reported this, but we still have a problem.<br><br></div>For example, in spursrc/vm/gcc-cointerp.c, see sendInvokeCallbackContext defined around line 18464 in HEAD rev.<br><br></div>clang reports this with -Wall:<br><br>../../spursrc/vm/gcc3x-cointerp.c:18550:7: warning: variable &#39;object&#39; is used uninitialized whenever &#39;if&#39; condition is true [-Wsometimes-uninitialized]<br>                if ((((unsigned int) value)) &lt;= (MaxSmallInteger)) {<br>                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>../../spursrc/vm/gcc3x-cointerp.c:18592:54: note: uninitialized use occurs here<br>                longAtput((sp = GIV(stackPointer) - BytesPerWord), object);<br>                                                                   ^~~~~~<br>../../platforms/Cross/vm/sqMemoryAccess.h:190:67: note: expanded from macro &#39;longAtput&#39;<br># define longAtput(oop,val)                     longAtPointerput(atPointerArg(oop), val)<br>                                                                                    ^<br>../../platforms/Cross/vm/sqMemoryAccess.h:171:62: note: expanded from macro &#39;longAtPointerput&#39;<br># define longAtPointerput(ptr,val)      (*(sqInt *)(ptr)= (sqInt)(val))<br>                                                                  ^<br>../../spursrc/vm/gcc3x-cointerp.c:18550:3: note: remove the &#39;if&#39; if its condition is always false<br>                if ((((unsigned int) value)) &lt;= (MaxSmallInteger)) {<br>                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>../../spursrc/vm/gcc3x-cointerp.c:18489:17: note: initialize the variable &#39;object&#39; to silence this warning<br>    sqInt object;<br>                ^<br>                 = 0<br><br></div>If we look from line 18547:<br>        /* begin positive32BitIntegerFor: */<br>        /* begin maybeInlinePositive32BitIntegerFor: */<br>        assert(!((hasSixtyFourBitImmediates())));<br>        if ((((unsigned int) value)) &lt;= (MaxSmallInteger)) {<br>            ((value &lt;&lt; 1) | 1);<br>            goto l3;<br>        }<br></div>then on label l3 (line 18589):<br>    l3:    /* end maybeInlinePositive32BitIntegerFor: */;<br><br><br>        longAtput((sp = GIV(stackPointer) - BytesPerWord), object);<br><br></div>Ouch! clang is right.<br></div>Obviously line 18551 should be<br>            <b>object=</b>((value &lt;&lt; 1) | 1);<br></div>But the inliner lost it somewhere...<br><br></div>We can also see this with -Wunused-value<br></div>I&#39;m not so much for stifling these warnings, some are true positives :(<br><br></div><div>Unfortunately, I cannot report this in github because those generated files and diffs are too big...<br></div><div>With command line we at least know when the line was last changed:<br>git blame d85a19df65 spursrc/vm/gcc3x-cointerp.c<br><br>e46c1a15 (Eliot Miranda 2015-02-14 02:19:04 +0000 18551)                        ((value &lt;&lt; 1) | 1);<br><br></div><div>But I&#39;m not sure if it was an inliner change or just a sendInvokeCallbackContextchange, we would have to cross check with VMMaker history (that&#39;s where the initial Pharo strategy mixing both could shine). Maybe it has not much value to track regression, because inliner never was really robust.<br><br></div><div>Anyway, we can&#39;t live with such hanging sword of Damocles.<br></div><div>The best thing would be to unit-test code generation. A huge low rewarding job, but we shall do it.<br></div><div><br></div>Nicolas<br></div>