https://llvm.org/bugs/show_bug.cgi?id=23069
Bug ID: 23069
Summary: 'char' type treated incorrectly in expression
evaluation when non default type is used
Product: lldb
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
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.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev