<html>
    <head>
      <base href="http://bugzilla.gdcproject.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 - Signed integer overflow handled incorrectly"
   href="http://bugzilla.gdcproject.org/show_bug.cgi?id=141">141</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Signed integer overflow handled incorrectly
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>GDC
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>4.9.x
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>critical
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>gdc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>ibuclaw@gdcproject.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>code@klickverbot.at
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This
---
bool foo(int a) {
  return a > (a + 1);
}
---
produces
---
_D4test3fooFiZb:
    xorl    %eax, %eax
    ret
---
using the GDC 4.9.0 from the Arch Linux repositories.

However, the spec (<a href="http://dlang.org/expression.html">http://dlang.org/expression.html</a>) says: "If both operands
are of integral types and an overflow or underflow occurs in the computation,
wrapping will happen." There is no mention that this does not apply to signed
integral types as well.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>