pmoore@hemel.bull.co.uk (Paul Moore) (11/21/90)
Newsgroups: comp.lang.c++
Distribution: world
Subject: conditional scope and destructors results 2
Hopefully this will put this one to bed. Following long mail chat with
Jamshid Afshar and some more postings the consensus seems to be that -
class cl{
...
~cl();
...
}
func()
{
....
if (foo==bar)
goto ex;
....
cl obj;
....
ex:;
}
is illegal and the complier should throw it out. Cfront does in fact fatal
it.
This presumably proves that it is a bug in the zortech compiler (WB?) given
that it doesnt fatal it.
The cfront error messages are:
"error: goto ex past initialized obj"
"sorry: not implemented, label in block with destructors"