RFR: 8327173: HotSpot Style Guide needs update regarding nullptr vs NULL
Kim Barrett
kbarrett at openjdk.org
Mon Mar 4 08:46:12 UTC 2024
On Mon, 4 Mar 2024 08:38:09 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to update the HotSpot Style Guide's discussion of
> nullptr and its use.
>
> I suggest this is an editorial rather than substantive change to the style
> guide. As such, the normal HotSpot PR process can be used for this change.
doc/hotspot-style.md line 730:
> 728: Use `nullptr`
> 729: ([n2431](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf))
> 730: rather than `NULL`. Don't use (constant expression or literal) 0 for pointers.
Should there be any discussion here of why we want to avoid `NULL`? Specifically the varying
definitions and the pitfalls of `NULL` in varargs context. Also template and overload issues.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18101#discussion_r1510773801
More information about the build-dev
mailing list