http://llvm.org/bugs/show_bug.cgi?id=21340
Bug ID: 21340
Summary: warning: "cannot delete expression with
pointer-to-'void' type 'void *'" missing -W flag
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
Save this snippet as delete_void.cpp
int main() {
void *a=new char[100];
delete [] a;
return 0;
}
Then execute:
$ clang++ delete_void.cpp
delete_void.cpp:3:2: warning: cannot delete expression with pointer-to-'void'
type 'void *'
delete [] a;
^ ~
1 warning generated.
There is a warning, but there is no -W flag, so we cannot force it into error
and thus automatically prevent such bugs creeping in the code-base.
Tested with both 3.4 and 3.5.
--
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