http://llvm.org/bugs/show_bug.cgi?id=21703
Bug ID: 21703
Summary: minimum value for int64_t seems to be off by 1
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The most negative value for a signed type is always one 'larger' then the most
positive value. Eg for a 'char', the range is [-128,127]. For 64-bit signeds
however there seems something smelly:
long long a = 9223372036854775807ll; // no error, correct
long long b = 9223372036854775808ll; // error, correct
long long c = -9223372036854775807ll; // no error, correct
long long d = -9223372036854775808ll; // error, NOT correct
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs