> Janus has a TRAP instruction, which is used to indicate immediate 
 > termination of the program because of a run-time error condition, such as 
 > a failed array-bounds check.  It is a separate instruction because (1) 
 > some machines actually have conditional trap instructions, and (2) 
 > otherwise it can be compiled to something compact (and maybe slow) like 
 > an invalid instruction.  Traps instructions occur frequently, but are 
 > executed rarely.
 > 
 > Is there anything like it in C--?

No.  I can see the code-size benefits, but I'm wondering how many
clients really have use for such a thing...
On encountering a fatal error, almost all high-level languages I'm
aware of do more than just trigger a hardware fault.


Norman

_______________________________________________
Cminusminus mailing list
[email protected]
https://cminusminus.org/mailman/listinfo/cminusminus

Reply via email to