On Sun, 21 Jan 2024 07:23:37 GMT, Julian Waters <jwat...@openjdk.org> wrote:

> The previous fix was a bit too hacky for my liking, so I decided to rework it 
> by fixing the order in which the labels are defined instead.

Please don't. #15996 was needed to keep the compiler happy, this one is not 
needed. Exiting a method with `goto` method and a single label at the end of 
the method is a popular C idiom, but adding more `goto`s and labels is just 
asking for trouble. If you're looking for a pure C++ solution to this problem, 
check out RAII / `unique_ptr`.

Note that I'm not advocating for using RAII here. The current code works and 
does not use any unsupported language features. If it ain't broke, don't fix it.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16682#issuecomment-1904145590

Reply via email to