RFR (s) : 8145740: Visual Studio pragmas should be guarded by #ifdef _MSC_VER

Volker Simonis volker.simonis at gmail.com
Mon Jan 25 16:58:40 UTC 2016


Hi Matthias,

this fix is good!

The change was initially introduced to appease the Visual Studio
compiler. But we shouldn't do that at the cost of provoking warnings
with other compilers. Compiler specific pragmas in shared code should
be guarded appropriately. Alternatively, we could also disable this
warning globally on Windows by placing the pragma into
globalDefinitions_visCPP.hpp.

Either way, we need a sponsor. David, maybe you can assist?

Here's a link to the initial bug which introduced this code:

https://bugs.openjdk.java.net/browse/JDK-8074895

The corresponding review thread states:

Microsoft describes it as an obsolete warning:

    https://msdn.microsoft.com/en-us/library/wewb47ee.aspx

    "This warning is obsolete. It is only generated in Visual Studio
    2005 through Visual Studio 2012. It reports a behavior change from
    the Visual C++ compiler that shipped in Visual Studio .NET when
    initializing a POD (plain old data) object with (); the compiler
    default-initializes the object.”

Thank you and best regards,
Volker


On Mon, Jan 25, 2016 at 5:37 PM, Baesken, Matthias
<matthias.baesken at sap.com> wrote:
> Ping .... any reviewers ??
>
> Best regards, Matthias
>
> -----Original Message-----
> From: Langer, Christoph
> Sent: Montag, 21. Dezember 2015 23:18
> To: Baesken, Matthias <matthias.baesken at sap.com>; hotspot-dev at openjdk.java.net
> Cc: Simonis, Volker <volker.simonis at sap.com>
> Subject: RE: RFR (s) : 8145740: Visual Studio pragmas should be guarded by #ifdef _MSC_VER
>
> Hi Matthias,
>
> to me your change looks good. However, I'm no reviewer so you'll need sponsorship from someone else.
>
> Can someone please sponsor this? Should it maybe be posted in another list for better visibility?
>
> Best regards
> Christoph
>
> -----Original Message-----
> From: hotspot-dev [mailto:hotspot-dev-bounces at openjdk.java.net] On Behalf Of Baesken, Matthias
> Sent: Freitag, 18. Dezember 2015 14:30
> To: hotspot-dev at openjdk.java.net
> Cc: Simonis, Volker <volker.simonis at sap.com>
> Subject: RFR (s) : 8145740: Visual Studio pragmas should be guarded by #ifdef _MSC_VER
>
> Hello,
>    can you please review and sponsor this change :
>
> https://bugs.openjdk.java.net/browse/JDK-8145740
> http://cr.openjdk.java.net/~clanger/webrevs/8145740.0/
>
> Some details :
>
>      while  Visual Studio pragmas in shared code are usually guarded with  _MSC_VER in the hotspot codebase
> ( see for example   taskqueue.hpp or  compressedStream.cpp ) , the guarding is missing in   src/share/vm/utilities/growableArray.hpp  ,
> which is not really a "good thing"  for other compilers .
>
>
> Thanks and regards, Matthias
>


More information about the hotspot-dev mailing list