[cfe-commits] r136180 - in /cfe/trunk: lib/CodeGen/CGCXX.cpp test/CodeGenCXX/abstract-class-ctors-dtors.cpp
rjmccall at apple.com
Thu Jul 28 04:08:16 CDT 2011
On Jul 28, 2011, at 1:23 AM, Sebastian Redl wrote:
> On 27.07.2011 01:18, Douglas Gregor wrote:
>> Author: dgregor
>> Date: Tue Jul 26 18:18:30 2011
>> New Revision: 136180
>> URL: http://llvm.org/viewvc/llvm-project?rev=136180&view=rev
>> Disable the optimization that skips emission of complete, non-virtual
>> destructors of abstract classes. It's undefined behavior to actually
>> call the destructor (e.g., via delete), but the presence of code that
>> calls this destructor doesn't make the program
>> ill-formed. Fixes<rdar://problem/9819242>.
> Can't we just replace the call with a trap instruction?
Not without aggressively breaking code that actually works perfectly
reasonably. I'm pretty skeptical of strictly enforcing undefined
behavior when there's only one reasonable action for the compiler
and it has a substantial chance of being fully correct.
More information about the cfe-commits