Hi David, On Tue, 2018-08-07 at 07:17 +1000, David Holmes wrote: > Hi Thomas, > > On 6/08/2018 10:38 PM, Thomas Schatzl wrote: > > Hi David, > > > > On Fri, 2018-08-03 at 10:20 +1000, David Holmes wrote: > > > Hi Thomas, > > > > > > On 2/08/2018 7:14 PM, Thomas Schatzl wrote: > > > > Hi all, > > > > > > > > there have been several suggestions to try to fix the > > > > Hotspot code to allow us to enable -Wreorder in the Hotspot > > > > sources. > > > > This should make problems due to use-before-initialization much > > > > more obvious. > > > > > > > > This change enables -Wreorder for gcc and clang. > > > > > > For Windows (VS2017+) see: > > > > > > https://docs.microsoft.com/en-us/cpp/error-messages/compiler- > > > warnings /c5038 > > > > > > Otherwise change seems okay. > > > > > > > Thanks! > > > > http://cr.openjdk.java.net/~tschatzl/8208672/webrev.0_to_1 (diff) > > http://cr.openjdk.java.net/~tschatzl/8208672/webrev.1 (full) > > > > I verified that all our platforms (including Windows) still build. > > I think the Windows change needs to be based on the compiler version > used as, from what I read, the flag only exists in VS2017.
jdk11 official compiler is VS2017 so I figured it would not be that much of a problem. Another reason for my thinking is that MSVC 2013 does not implement some interesting C++11 features anyway so we might be forced to drop support for it soon (and the situation is of course worse if we upgrade to C++14). I looked a bit at the makefile and conditionalizing this on VS2017 (or checking only whether VS2013 let it slide, i.e. give an "unsupported option" warning but continue anyway because I would need to setup a Windows dev environment somewhere) would take me a lot of time. Would it be possible to skip -Werror support for Visual Studio now and try to fix this in a later enhancement? Thanks, Thomas