<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 22/07/2015 01:21, Jeffrey Walton
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAH8yC8n-pdedHmm3+Xw=dVaOMOXLvMngBFO3TUSW4PXJVudTng@mail.gmail.com"
      type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">For the stragglers, I don't think its a stretch to ask C99 in 2015.
</pre>
        </blockquote>
        <pre wrap="">
Visual Studio is often used on Windows, and it is not C99.

</pre>
      </blockquote>
      <pre wrap="">Oh my, I was not aware it was still struggling for C99 :) I guess
Microsoft is still putting their energies into the "one-size, tablet
interface known as Windows 8, fits all, even on desktops without a
touchscreen".

On the good side, MSVC does not need to be 100% compliant. It just
needs to support initialization at time of declaration. That
particular feature works.
</pre>
    </blockquote>
    <tt>Isn't that a C89 (or maybe even K&R) feature?</tt><tt><br>
    </tt><tt><br>
    </tt><tt>There is another problem though: Blindly initializing <br>
      every variable with dummy values (because the correct <br>
      value comes from one or more if() branches), only <br>
      achieves two things, both bad:</tt><tt><br>
    </tt><tt><br>
    </tt><tt>- It hides correct warnings in case one of those if() <br>
       branches forgets to set the variable, before it is <br>
       read.<br>
    </tt><tt></tt><tt><br>
    </tt><tt>- It potentially confuses less-than-halting-problem-<br>
       solving optimizers to needlessly generate code that <br>
       allocates and initializes the variable because they <br>
       cannot detect (within their compile time resource <br>
       limits) that the dummy value is (hopefully) never <br>
       used.</tt><tt><br>
    </tt><tt><br>
    </tt><tt>The second problem is almost guaranteed to happen on <br>
      any compiler/option combination that would otherwise <br>
      falsely warn about the variable being maybe-<br>
      uninitialized.</tt><tt>  This is because most compilers <br>
      generate that warning as a side effect of the <br>
      optimizer trying to figure out if the garbage or <br>
      dummy value will be used by the code.<br>
    </tt><br>
    <br>
    <pre class="moz-signature" cols="72">Enjoy

Jakob
-- 
Jakob Bohm, CIO, Partner, WiseMo A/S.  <a class="moz-txt-link-freetext" href="http://www.wisemo.com">http://www.wisemo.com</a>
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded </pre>
  </body>
</html>