<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:luka.kudra@gmail.com" title="Luka Kudra <luka.kudra@gmail.com>"> <span class="fn">Luka Kudra</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - -Wdeclaration-after-statement doesn't work when used with -std=c99"
   href="https://bugs.llvm.org/show_bug.cgi?id=51931">bug 51931</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;">Resolution</td>
           <td>INVALID
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - -Wdeclaration-after-statement doesn't work when used with -std=c99"
   href="https://bugs.llvm.org/show_bug.cgi?id=51931#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - -Wdeclaration-after-statement doesn't work when used with -std=c99"
   href="https://bugs.llvm.org/show_bug.cgi?id=51931">bug 51931</a>
              from <span class="vcard"><a class="email" href="mailto:luka.kudra@gmail.com" title="Luka Kudra <luka.kudra@gmail.com>"> <span class="fn">Luka Kudra</span></a>
</span></b>
        <pre>Yes, gcc and clang behave the same if I compile the code with just -std=c99
-pedantic, but if I explicitly add -Wdeclaration-after-statement gcc throws a
warning and clang doesn't.
I modified your code by adding -Wdeclaration-after-statement in the first two
columns, you can see that the behavior is different between gcc and clang:
<a href="https://godbolt.org/z/5dzjvfYYq">https://godbolt.org/z/5dzjvfYYq</a></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>