Silence warnings with new GCC

Andrew Haley aph at
Fri Nov 27 09:58:05 UTC 2015

On 26/11/15 21:21, David Holmes wrote:
> Strictly speaking it is of course reachable, but if we do reach it we 
> expect never to return. As per the thread Mario pointed to we ran into 
> problems trying to mark this as not returning. But I wonder whether 
> lying to the compiler about the reachability of it would be a 
> workaround? Of course if the compiler used that information to elide the 
> ShouldNotReachHere() then that is not acceptable.

I've put the unreachable declaration after ShouldNotReachHere(), so
that will not be affected at all.  It is the responsibility of
ShouldNotReachHere() to make sure that control doesn't, er, reach

A __builtin_unreachable declration is better from this point of view
than declaring ShouldNotReachHere() to never return.

On April 20 Mikael Gerdin posted

It claims to solve the problems with the stack trace.  I think it's
not been reviewed.


More information about the hotspot-dev mailing list