[8u] RFR: 8246223: Windows build fails after JDK-8227269

Andrew Hughes gnu.andrew at redhat.com
Thu Jun 4 05:49:37 UTC 2020


On 03/06/2020 21:50, Alex Kashchenko wrote:
> Hi,
> 
> Please review the fix to JDK-8246223:
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8246223
> 
> Webrev: https://cr.openjdk.java.net/~akasko/jdk8u/8246223/webrev.00/
> 
> Problem appeared to be caused by C99 syntax used in JDK-8227269 that is
> not supported by VS2010 compiler (newer VS versions were not affected).
> 
> This patch fixes the compatibility of classTrack.c with C89 moving
> variable declarations to the beginning of corresponding scope blocks.
> 
> Testing: checked that it can be compiled with VS2010 and newer toolchains.
> 

I managed to get the same build failure on gcc with
-Werror=declaration-after-statement. I'll propose a patch to add that to
the build so we can catch these failures earlier in future.

It seems VS2010 doesn't conform to either standard exactly. When I first
tried to build with -std=c89, I got failures due to the use of C++-style
comments, which VS2010 is allowing.

Applying your patch fixes the failures and looks good to go.
Please flag the bug with jdk8u-critical-fix.

Thanks,
-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222



More information about the jdk8u-dev mailing list