<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Local register variables using high-byte registers should cause a -Wgcc-compat warning"
   href="https://bugs.llvm.org/show_bug.cgi?id=45918">45918</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Local register variables using high-byte registers should cause a -Wgcc-compat warning
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>josephcsible@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Consider this C function:

char f(void) {
    register char x __asm__("dh");
    __asm__("movb $42, %%dh" : "=r"(x));
    return x;
}

When compiled with Clang, it will return 42, as expected. However, GCC doesn't
distinguish between "dh" and "dl", so it returns whatever happened to be in %dl
instead. They don't consider this a bug
(<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95121">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95121</a>) so likely won't be
changing it anytime soon. As such, we should emit a -Wgcc-compat warning for
local register variables using high-byte registers.</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>