[bitc-dev] Exceptions in initialiser

Jonathan S. Shapiro shap at eros-os.org
Fri Jun 30 08:06:37 EDT 2006


This isn't a side effect, but you're right that the initializer needs to
be moved.

Swaroop: I need to get out to the eye doctor right now, but if you can
make this change when you get in?

shap


On Fri, 2006-06-30 at 10:03 +0100, Sam Mason wrote:
> Hi,
> 
> Another little test case for you.  Throwing an exception in an initialiser
> currently causes a segfault as the exception jump buffer hasn't been set
> up yet.  If you move the bitc_init_globals() call a couple of lines down
> (below the setjmp call) it prints out the exception as expected.
> 
> I think I remember reading somewhere that initialisers shouldn't have
> side-effects -- not sure where though!  Should this test be rejected at
> compile time then?
> 
> 
>   Sam
> _______________________________________________
> bitc-dev mailing list
> bitc-dev at coyotos.org
> http://www.coyotos.org/mailman/listinfo/bitc-dev



More information about the bitc-dev mailing list