https://llvm.org/bugs/show_bug.cgi?id=23204
Bug ID: 23204
Summary: -Wabsolute-value gives false positives
Product: clang
Version: 3.6
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
version is Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
the new absolute value warning in xcode 4.3 seems bugged
it gives a warning on this code:
printf("\n\n\n%li\n\n",
labs([@"12345" length] - [@"1234567" length]));
which outputs "2". it says the labs() is not necessary.
however, when removing it the output is -2. so the warning clearly directs
users into making wrong code changes...
--
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