[LLVMbugs] [Bug 10375] New: warning on delete object of incomplete type missing -W flag
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jul 15 14:49:17 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10375
Summary: warning on delete object of incomplete type missing -W
flag
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: llvmbugs at cs.uiuc.edu
This warning needs a flag to control it:
$ cat del.cc
class Foo;
void test(Foo *foo) {
delete foo;
}
$ llvm/Debug+Asserts/bin/clang del.cc -Werror
del.cc:4:3: error: deleting pointer to incomplete type 'Foo' may cause
undefined
behaviour [-Werror]
delete foo;
^ ~~~
del.cc:1:7: note: forward declaration of 'Foo'
class Foo;
^
1 error generated.
--
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.
More information about the llvm-bugs
mailing list