https://llvm.org/bugs/show_bug.cgi?id=23903
Bug ID: 23903
Summary: GCC's -Wstrict-overflow not implemented
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
$: cat t.c
int main(int argc, char **argv) {
if (argc + 3 < argc)
return 0;
else
return 1;
}
$: clang-trunk -Weverything -Wno-unused-parameter -O3 t.c
$: gcc-trunk -Wall -O3 t.c
t.c: In function ¡®main¡¯:
t.c:2:3: warning: assuming signed overflow does not occur when assuming that (X
+ c) < X is always false [-Wstrict-overflow]
if (argc + 3 < argc)
^
$:
$:
--
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