On Thu, 2 Nov 2023 18:47:45 GMT, Phil Race <[email protected]> wrote:

>> Julian Waters has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Changes awt_Frame.cpp
>
> src/java.desktop/windows/native/libawt/windows/awt_Canvas.cpp line 218:
> 
>> 216: 
>> 217:     AwtCanvas *c;
>> 218:     c = (AwtCanvas*) pData;
> 
> you probably explained it in some other thread, perhaps in an earlier review 
> but what exactly is the problem with the existing code ? The new code looks 
> like something that begs to be undone.

The problem is that the goto jumps over the initialization of these locals, 
which C++ does not allow. However, a split declaration and assignment can be 
jumped over by goto if the local is a primitive type, hence this change is 
needed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1381109525

Reply via email to