pre-patch to run-time verifier

Per Bothner per@bothner.com
Wed Jan 23 13:34:00 GMT 2002


Tom Tromey wrote:
> Per> A dis-advantage is that I don't know if it is possible to specify
> Per> __noreturn__ on a method or what the syntax for that is.
> Per> However, I don't think that is an important issue, unless the
> Per> __noreturn__ makes a difference for the optimizer.
> 
> Actually the problem is that there are non-void functions which call
> verify_fail() rather than return.  This gets us a warning from gcc if
> it can't tell that verify_fail doesn't return.  For instance see
> check_class_constant().

Either of the following syntaxes seem to be accepted:

    __attribute__ ((__noreturn__)) void fail1() { abort(); }
    void __attribute__ ((__noreturn__))  fail2() { abort(); }
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/



More information about the Java-patches mailing list