[libc-commits] [libc] [libc] Fix warning on 'extern "C" int main' in test suite (PR #102973)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Aug 12 15:40:10 PDT 2024


jhuber6 wrote:

> I think clang should fix this instead of libc.

`clang` is doing its job, according to the standard `extern "C" int main` is not allowed. During `-ffreestanding` mode it is implementation defined and thus allowed, that's why it's not a warning in that case. This requires special handling because we compile `LibCTestMain` in both.

https://github.com/llvm/llvm-project/pull/102973


More information about the libc-commits mailing list