RFR: 8264346: nullptr_t undefined in global namespace for clang+libstdc++ [v2]

Stefan Karlsson stefank at openjdk.java.net
Wed Mar 31 07:11:55 UTC 2021


On Wed, 31 Mar 2021 01:05:21 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review Kim
>
> src/hotspot/share/utilities/globalDefinitions_gcc.hpp line 34:
> 
>> 32: // declarations and a few frequently used utility functions.
>> 33: 
>> 34: #include <cstddef>
> 
> This should be in globalDefinitions.hpp, not globalDefinitions_gcc.hpp.  There's no guarantee that the inclusion of <stddef.h> on other platforms is sufficient to provide the std-qualified name.  In fact, that's explicitly unspecified and deprecated behavior.  (Unqualified nullptr_t being provided by <stddef.h> is deprecated, BTW.)

You're right. I was blind-sided by the fact that this was only was supposed to only be a problem with clang, and started out by trying to keep using nullptr_t but fix the includes. I'm updating the patch.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3269


More information about the hotspot-dev mailing list