RFR: JDK-8286459: compile error with VS2017 in continuationFreezeThaw.cpp

Martin Doerr mdoerr at openjdk.java.net
Tue May 10 15:05:14 UTC 2022


On Tue, 10 May 2022 14:45:43 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> After recent changes (loom?) we run into this compile error when using VS2017 :
> 
> d:\build\jdk\src\hotspot\share\runtime\continuationFreezeThaw.cpp(2463): error C2440: 'type cast': cannot convert from 'int (__cdecl *)(JavaThread *,intptr_t *)' to 'address'
> d:\build\jdk\src\hotspot\share\runtime\continuationFreezeThaw.cpp(2463): note: Context does not allow for disambiguation of overloaded function
> d:\build\jdk\src\hotspot\share\runtime\continuationFreezeThaw.cpp(2451): note: see reference to function template instantiation 'void ConfigResolve::resolve<true,BarrierSet::GetType<BarrierSet::CardTableBarrierSet>::type>(void)' being compiled
> d:\build\jdk\src\hotspot\share\runtime\continuationFreezeThaw.cpp(2436): note: see reference to function template instantiation 'void ConfigResolve::resolve_gc<true>(void)' being compiled
> d:\build\jdk\src\hotspot\share\runtime\continuationFreezeThaw.cpp(2466): error C2440: 'type cast': cannot convert from 'intptr_t *(__cdecl *)(JavaThread *,int)' to 'address'
> d:\build\jdk\src\hotspot\share\runtime\continuationFreezeThaw.cpp(2466): note: Context does not allow for disambiguation of overloaded function
> 
> An additional cast can be added to make the issue go away.

Valid workaround for VS 2017. As long as this small change is sufficient, I think it should be done. I'd have done the same.

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

Marked as reviewed by mdoerr (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8632


More information about the hotspot-runtime-dev mailing list