[llvm-dev] A libc in LLVM

Aaron Ballman via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 15 11:22:03 PDT 2019


On Mon, Jul 15, 2019 at 1:02 PM Siva Chandra <sivachandra at google.com> wrote:
>
> On Fri, Jul 12, 2019 at 8:32 AM Aaron Ballman <aaron at aaronballman.com> wrote:
> > > llvm-libc is an implementation of the C standard library targeting C11
> > > and above.
> >
> > Any particular reason for C11 as opposed to C17?
>
> Two reasons:
> 1. The C++17 standard refers to the C11 standard.

This is somewhat confusing to me. That's a reason to support *at
least* C11. It doesn't seem like a reason to not support the latest C
standard.

> 2. C11 is sufficiently modern while not closing doors for users
> requiring compliance with an "older" standards. That said, we could
> choose not to implement certain items removed in the C17 standard. An
> obvious example of such a candidate is `gets`.

gets() was removed in C11. ;-)

I strongly think we should support the C17 standard library. C17 was a
bugfix release, so the delta between it and C11 in terms of
functionality is small but the quality is higher.

~Aaron


More information about the llvm-dev mailing list