8065585: Change ShouldNotReachHere() to never return

Kim Barrett kim.barrett at oracle.com
Thu Apr 16 03:44:16 UTC 2015

On Apr 15, 2015, at 10:23 PM, David Holmes <david.holmes at oracle.com> wrote:
>> I had to change some instance of ShouldNotReachHere() in destructors,
>> because the VS C++ compiler complained about potential memory leaks.
> The approach seems inconsistent though - sometimes a switch to a guarantee, sometimes removal of the destructor and making it private (which doesn't quite give the same level of protection).

I think those that were made private were also left undefined, so there should be link-time errors if there are any unexpected references.  (C++11 would let us declare them “deleted” so the error would be at compile-time.)

More information about the hotspot-dev mailing list