------- Comment #3 from bangerth at gmail dot com 2010-03-20 11:26 ------- (In reply to comment #2) > class Foo; > Foo* f(); > int main() { > Foo* p = f(); > delete [] p; > }
I can't see how the compiler could possibly do anything useful in this case if Foo is incomplete. I can't find any statement that would say that the code is ill-formed, however. If there really is no such statement, I still don't think we should make it a priority to compile this code without an error. W. -- bangerth at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43452