ldionne wrote:

> > Why do the Clang builtin headers even try to define this? Shouldn't this be 
> > provided by the platform's C library instead? I am really confused about 
> > what's the intended layering here and it seems to me like Clang is 
> > overstepping its responsibilities by basically implementing parts of the C 
> > library.
> 
> I did that in 
> [a9797d7](https://github.com/llvm/llvm-project/commit/a9797d7d2d7878464868312e0c147b4e747a31c6)
> 
> It's a freestanding feature in C23, so we need to expose it from `stddef.h` 
> at least when not in hosted builds. I don't understand why this is making 
> into C++ builds at all:

Thanks for the explanation. I think I don't understand the relationship between 
that feature being freestanding and the fact that it's implemented in the Clang 
builtin headers. I might be misunderstanding (or just ignorant of) the Clang 
approach for freestanding in C. Doesn't Clang still rely on there being a C 
library even in Freestanding mode?

https://github.com/llvm/llvm-project/pull/86748
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to