[PATCH] D159312: [Headers] Remove a space in NULL define

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


aheejin added a comment.

In D159312#4634617 <https://reviews.llvm.org/D159312#4634617>, @dalias wrote:

> Please report what you're actually trying to do that's breaking rather than sending patches to align definitions that are not intended to be aligned.

Basically, we tried to use `stddef.h` (from clang) and `stdio.h` (from musl) at the same time. Didn't know it wasn't supposed to be supported in the first place.
In more detail, our musl has some emscripten-specific modifications like this <https://github.com/emscripten-core/emscripten/blob/0566a76b500bd2bbd535e108f657fce1db7f6f75/system/lib/libc/musl/include/stdio.h#L4-L6>, and this lead to include <https://github.com/emscripten-core/emscripten/blob/0566a76b500bd2bbd535e108f657fce1db7f6f75/system/include/wasi/api.h#L29> `stddef.h`. But this problem can happen whenever we try to use the two headers together.

I get removing the whitespace here is probably not the right long-term solution. What do you think we (emscripten) or clang should do?

I also think it is a good idea to remove the comment here because we don't want to say this is a long-term solution. But I hope we keep the code as whitespace-free for now, given that at least it can be a band-aid to users like us, and it didn't have the whitespace for years before D158709 <https://reviews.llvm.org/D158709> anyway.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159312/new/

https://reviews.llvm.org/D159312



More information about the cfe-commits mailing list