🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3929

Exception handling specs incomplete ?

#3929
From: Alexander Krotoff
Date: Fri, 05 Apr 1996 17:49
50 lines
2116 bytes
Hello c++ gurus,

I have two notes, about the behavior not specifed in the Jan 96 WP.

1) While stack unwinding the destructor (or function indirectly called from
the destructor) may try to do throw.

As seems to me WP says nothing about this case. Is it allowed ?
Is the behavior specified for this case ?

Example:

struct A {
	~A () { throw 1; }
};

void f ()
{
	A a;

	throw 2;
}

main ()
{
	f();
}

While stack unwinding control may come into the try-block.
Is it allowed ?
Shall this try-block hanlers be ignored ?

2) While stack unwinding the destructor may attempt to create
new objects, or arrays of class objects with non-trivial destructors
via operator new. Shall this outside exception affect creation of
new objects ? (Inner exception will cause destructor calls for all
already created base classes sub-objects and completely created array
elements.

Thank you in advance,
--
Alexander N. Krotoff		krotoff@such.srcc.msu.su
Research Computer Center	tel: +7(095)939-2638
Moscow State University		fax: +7(095)939-4430
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Technical Details
Message-ID: <199604051329.RAA04194@boy.nmd.msu.ru>
Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back
From: Alexander Krotoff <krotoff@boy.nmd.msu.ru>
Newsgroups: comp.std.c++
Subject: Exception handling specs incomplete ?
Date: 05 Apr 96 17:49:06 GMT
Organization: -
Approved: fjh@cs.mu.oz.au
Message-ID: <199604051329.RAA04194@boy.nmd.msu.ru>
Reply-To: krotoff@such.srcc.msu.su
NNTP-Posting-Host: mundook.cs.mu.oz.au
X-Original-Date: Fri, 5 Apr 1996 17:29:46 +0400 (????)
X-Mailer: ELM [version 2.4 PL24]
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMWVdI+EDnX0m9pzZAQFrjgGAhU12fbbUBTe3v64fDC51ZDuQvntUrlcT
 y1osLWfdBaW9TMtPF9oC//I29HrEOegx
 =sKic
Originator: fjh@mundook.cs.mu.OZ.AU