[RFH]: 8186443: Missing stdint.h for zero builds

David Holmes david.holmes at oracle.com
Sat Aug 19 05:02:44 UTC 2017


On 19/08/2017 12:16 PM, Kim Barrett wrote:
>> On Aug 18, 2017, at 8:40 PM, John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de> wrote:
>>> I think adding an #include of <stdint.h> to vmStructs.hpp is
>>> reasonable.  Alternatively, #include globalDefinitions.hpp, though I'm
>>> personally not a fan of that file.
>>
>> What about guarding it:
>>
>> diff -r 9a75c2f7bf06 src/share/vm/runtime/vmStructs.hpp
>> --- a/src/share/vm/runtime/vmStructs.hpp        Wed Aug 16 16:00:15 2017 +0200
>> +++ b/src/share/vm/runtime/vmStructs.hpp        Sat Aug 19 02:39:41 2017 +0200
>> @@ -28,6 +28,8 @@
>> #include "utilities/debug.hpp"
>> #ifdef COMPILER1
>> #include "c1/c1_Runtime1.hpp"
>> +#else
>> +#include "utilities/globalDefinitions.hpp"
>> #endif
>>
>> // This table encapsulates the debugging information required by the
>>
>> I have verified that zero builds fine with that change. I know the #else
>> is not really necessary here but it might make the code more readable.
> 
> I would prefer it be included unconditionally, rather than only if !COMPILER1.
> 
> That is, don’t depend on COMPILER1 bringing that stuff in.

Agreed. Implicit dependencies are bad.

Also:

 >> The include should still be moved inside the conditional guard.
 >
 > Ok. But that should go into a different bug report then, I guess :-).

It is fine to include it with this change while you are in the area - a 
lot of cleanups happen that way. Otherwise there is too much overhead in 
getting things fixed. :)

Thanks,
David



More information about the hotspot-dev mailing list