<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:andyg1001@hotmail.co.uk" title="Andy Gibbs <andyg1001@hotmail.co.uk>"> <span class="fn">Andy Gibbs</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - [ARM code-gen] Not passing all parameters in printf call"
   href="https://bugs.llvm.org/show_bug.cgi?id=35728">bug 35728</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WORKSFORME
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - [ARM code-gen] Not passing all parameters in printf call"
   href="https://bugs.llvm.org/show_bug.cgi?id=35728#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - [ARM code-gen] Not passing all parameters in printf call"
   href="https://bugs.llvm.org/show_bug.cgi?id=35728">bug 35728</a>
              from <span class="vcard"><a class="email" href="mailto:andyg1001@hotmail.co.uk" title="Andy Gibbs <andyg1001@hotmail.co.uk>"> <span class="fn">Andy Gibbs</span></a>
</span></b>
        <pre>You are right.  I just found this post:
<a href="https://www.embeddeduse.com/2013/08/25/casting-a-negative-float-to-an-unsigned-int">https://www.embeddeduse.com/2013/08/25/casting-a-negative-float-to-an-unsigned-int</a>

And its solution, -Wconversion, works.  The shame was that we always compile
code with -Wall -Wextra -Werror but it seems -Wall -Wextra still misses this
particular issue.

I, like the authors of the post, found myself hunting the most obscure of
problems.  In my case, the fact that at some point code evolution had led to
one part of code changing to float from unsigned without checking all the
places where the value was used, and yes, in one place deep in a corner it was
being implicitly converted to unsigned int and leaving a parameter passed to a
function in a state of flux.  It was one of those times when pure luck found
the issue.

I know this is a little out of scope here, but what is the way to turn on ALL
warnings in clang?  Or see which warnings are not trapped by -Wall or -Wextra. 
Even -Wpedantic doesn't pick this up!

I will mark this issue as solved.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>