RFR: 8307160: Fix AWT/2D/A11Y to support the permissive- flag on the Microsoft Visual C compiler [v14]
Dean Long
dlong at openjdk.org
Thu Nov 2 19:18:13 UTC 2023
On Thu, 2 Nov 2023 11:07:27 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future.
>
> 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 220:
> 218: c = (AwtCanvas*) pData;
> 219: c->m_eraseBackground = doErase;
> 220: c->m_eraseBackgroundOnResize = doEraseOnResize;
Suggestion:
{
AwtCanvas *c = (AwtCanvas*) pData;
c->m_eraseBackground = doErase;
c->m_eraseBackgroundOnResize = doEraseOnResize;
}
Does wrapping in {} work? I think it looks better, and that's how we handle case labels in switch statements, isn't it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1380668853
More information about the client-libs-dev
mailing list