RFR (XS): 8141134: Remove unnecessary pragma warning(disable:4355) from GC code

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Nov 4 11:48:48 UTC 2015


On 2015-11-04 11:46, Erik Helin wrote:
>
> Maybe we can come up with something that removes these #pragmas from the
> GC code while still allowing you to compile with VS2010. What do you
> think about the following suggestions:
> - We change the Makefiles to add the flag /Wd4355 if we use VS2010 or
>    older. This will results in the warning being disabled for all files
>    (one could potentially also disable the warning per file).
> - We add the code:
>    #if _MSC_VER < 1000
>      #pragma warning( disable:4355 )
>    #endif // _MSC_VER < 1800
>    to globalDefinitions_visCPP.hpp. This file gets included in
>    globalDefinitions.hpp which in turn gets included basically
>    everywhere. This will turn off the warning for essentially all files.
>
> I'm leaning more towards the Makefile solution since that is where it
> makes most sense to me to disable warnings. OTOH,
> globalDefinitions_visCPP.hpp already disables quite a few warnings...
>
> build-dev, I don't know if you guys have any other suggestion?
Normally, I'd prefer to keep warning handling as compiler flags, but in 
this case I think Volker's suggestion makes most sense.

/Magnus




More information about the hotspot-gc-dev mailing list