http://llvm.org/bugs/show_bug.cgi?id=3935
Summary: Invalid addresses at compile time not diagnosed
Product: clang
Version: unspecified
Platform: PC
OS/Version: NetBSD
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Clang should diagnose invalid address compuatations; e.g.
int x[2], *y = &x[3], *z = x + 3;
Clang accepts this without comment. Comeau gives
"ComeauTest.c", line 1: warning: subscript out of range
int x[2], *y = &x[3], *z = x + 3;
^
"ComeauTest.c", line 1: warning: pointer points outside of underlying object
int x[2], *y = &x[3], *z = x + 3;
^
This catches many bugs at compile time.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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