[PATCH] D159383: [Headers] Remove musl-related comment about NULL

Heejin Ahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 1 14:44:10 PDT 2023


aheejin created this revision.
aheejin added reviewers: iana, aaron.ballman, dalias.
Herald added a subscriber: wingo.
Herald added a project: All.
aheejin requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This removes a comment added in D159312 <https://reviews.llvm.org/D159312>, which warned people to not
re-add a whitespace in the `((void*)0))` expression. After discussions
happened in D159312 <https://reviews.llvm.org/D159312>, it doesn't seem like a permanent solution.

While I'd like to keep the whitespace removed for now, given that at
least it can be a band-aid to some users who use musl and `stddef.h` at
the same time, it seems the usage of them together is not something
that's officially supported, and I should not be implying this should be
the permanent solution by saying so in the comments.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159383

Files:
  clang/lib/Headers/__stddef_null.h


Index: clang/lib/Headers/__stddef_null.h
===================================================================
--- clang/lib/Headers/__stddef_null.h
+++ clang/lib/Headers/__stddef_null.h
@@ -15,9 +15,5 @@
 #define NULL 0
 #endif
 #else
-// Don't add any whitespaces in ((void*)0) below!
-// musl (https://www.musl-libc.org/) redefines `NULL` as such and redefinition
-// with a different expression, even in terms of a single whitespace, causes a
-// warning.
 #define NULL ((void*)0)
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159383.555512.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230901/1f0d06fe/attachment.bin>


More information about the cfe-commits mailing list