On older MSVC 2013, build fails with:
c:\cygwin64\home\windows\worker\jdkX-windows\build\src\hotspot\share\gc/z/zMarkStack.hpp(76) : error C2059: syntax error : 'identifier'
c:\cygwin64\home\windows\worker\jdkX-windows\build\src\hotspot\share\gc/z/zMarkStack.hpp(77) : error C2059: syntax error : 'identifier'
make[3]: *** [lib/CompileJvm.gmk:178: /cygdrive/c/cygwin64/home/windows/worker/jdkX-windows/build/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objs/ad_x86.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
c:\cygwin64\home\windows\worker\jdkX-windows\build\src\hotspot\share\gc/z/zMarkStack.hpp(76) : error C2059: syntax error : 'identifier'
c:\cygwin64\home\windows\worker\jdkX-windows\build\src\hotspot\share\gc/z/zMarkStack.hpp(77) : error C2059: syntax error : 'identifier'
It concerns ZCACHE_ALIGNED. Dropping ZCACHE_ALIGNED from those lines makes the build failed later:
Building target 'images' in configuration 'windows-x86_64-server-release'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(35) : error C2059: syntax error : '<L_TYPE_raw>'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(35) : error C2238: unexpected token(s) preceding ';'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(37) : error C2059: syntax error : '<L_TYPE_raw>'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(37) : error C2238: unexpected token(s) preceding ';'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(42) : error C2146: syntax error : missing ';' before identifier 'VirtualAlloc2'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(42) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(44) : error C2146: syntax error : missing ';' before identifier 'MapViewOfFile3'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
The obvious workaround is --with-jvm-features=-zgc, which is unfortunate.