RFR: 8074895: os::getenv is inadequate
Jeremy Manson
jeremymanson at google.com
Wed Mar 25 05:16:17 UTC 2015
Thanks, David. Much appreciated.
Jeremy
On Tue, Mar 24, 2015 at 9:24 PM, David Holmes <david.holmes at oracle.com>
wrote:
> On 24/03/2015 2:56 AM, Jeremy Manson wrote:
>
>> Thanks, Kim. This is a pretty silly warning to have break the build.
>> Does anyone have a problem with PODs being default initialized? That's
>> required by the standard, so if you do, then you are Doing It Wrong.
>>
>> I assume it is pretty easy to turn the warning off. I'd do it, but I
>> don't have the Windows build-fu necessary. Also, do we think it would
>> require another bug?
>>
>
> Unless someone else can already tell me how I will try to find the cycles
> to either disable the warning in that file (if that works) else disable it
> in the build - which will need a new CR I think.
>
> David
>
> I'd hate to have to change my (or any) code for this.
>>
>> Jeremy
>>
>> On Mon, Mar 23, 2015 at 8:48 AM, Kim Barrett <kim.barrett at oracle.com
>> <mailto:kim.barrett at oracle.com>> wrote:
>>
>> On Mar 23, 2015, at 3:45 AM, David Holmes <david.holmes at oracle.com
>> <mailto:david.holmes at oracle.com>> wrote:
>> >
>> > On 23/03/2015 4:12 PM, David Holmes wrote:
>> >> On 21/03/2015 3:32 AM, Jeremy Manson wrote:
>> >>> Argh. Yes. Martin told me not to get involved with Windows, but
>> would
>> >>> I listen? Of course not...
>> >>>
>> >>>http://cr.openjdk.java.net/~jmanson/8074895/webrev.04/
>> >>
>> >> Looks okay to me - running a test job now.
>> >
>> > <sigh> This just isn't meant to be :( It seems that:
>> >
>> > GrowableArray<JavaVMOption> options(2, true);
>> >
>> > in arguments.cpp is giving the windows compiler some grief:
>> >
>> > C:\jprt\T\P1\071814.daholme\s\hotspot\src\share\vm\
>> utilities/growableArray.hpp(171) : error C2220: warning treated as error
>> - no 'object' file generated
>> > C:\jprt\T\P1\071814.daholme\s\hotspot\src\share\vm\
>> utilities/growableArray.hpp(168) : while compiling class template member
>> function 'GrowableArray<E>::GrowableArray(int,bool,MEMFLAGS)'
>> > with
>> > [
>> > E=JavaVMOption
>> > ]
>> > C:\jprt\T\P1\071814.daholme\s\hotspot\src\share\vm\runtime\arguments.cpp(3516)
>> : see reference to class template instantiation 'GrowableArray<E>' being
>> compiled
>> > with
>> > [
>> > E=JavaVMOption
>> > ]
>> > C:\jprt\T\P1\071814.daholme\s\hotspot\src\share\vm\
>> utilities/growableArray.hpp(171) : warning C4345: behavior change: an
>> object of POD type constructed with an initializer of the form () will be
>> default-initialized
>> > C:\jprt\T\P1\071814.daholme\s\hotspot\src\share\vm\
>> utilities/growableArray.hpp(388) : warning C4345: behavior change: an
>> object of POD type constructed with an initializer of the form () will be
>> default-initialized
>> > C:\jprt\T\P1\071814.daholme\s\hotspot\src\share\vm\
>> utilities/growableArray.hpp(379) : while compiling class template member
>> function 'void GrowableArray<E>::grow(int)'
>> > with
>> > [
>> > E=JavaVMOption
>> > ]
>> >
>> > I'm guessing it doesn't like the enum as the generic arg, but don't
>> know why given that it accepts plain int elsewhere. ???
>>
>> Just suppressing this warning (unconditionally everywhere) would
>> probably make sense.
>>
>> 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.”
>>
>> It’s too bad the JDK9 supported build platform for Windows is still
>> lagging.
>>
>>
>>
More information about the hotspot-runtime-dev
mailing list