<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - 'char' type treated incorrectly in expression evaluation when non default type is used"
   href="https://llvm.org/bugs/show_bug.cgi?id=23069">23069</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>'char' type treated incorrectly in expression evaluation when non default type is used
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tberghammer@google.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When the type of 'char' explicitly specified for the inferior to the opposite
sign then the default on the given architecture (with -fsigned-char or with
-funsigned-char) then the expression evaluation treats 'char' as 'signed char'
or 'unsigned char' what cause incorrect behavior in the following case:

=== main.cpp ===

int foo(char c) { return 1; }
int foo(signed char c) { return 2; }
int foo(unsigned char c) { return 3; }

int main() {
  char c = 0;
  signed char sc = 0;
  unsigned char uc = 0;
  return 0; // Break here
}

=== lldb commands ===

stop at line marked by '// Break here'
expression foo(c)
expression foo(sc)
expression foo(uc)

When incorrect type used for 'char' then (at least) one of the expression
evaluates to incorrect value.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>