On 7/15/19 1:22 PM, Aaron Ballman via llvm-dev wrote:> 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.+1. Aiming for C17 seems better than aiming for only C11. -Hal> > ~Aaron > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Hal Finkel Lead, Compiler Technology and Programming Languages Leadership Computing Facility Argonne National Laboratory
> On 7/15/19 1:22 PM, Aaron Ballman via llvm-dev wrote: > > 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.I think there is some misunderstanding here. My first message said llvm-libc will target C11 __and above__. Which is to imply that the lower bound of supported standards is C11. On Mon, Jul 15, 2019 at 11:31 AM Finkel, Hal J. <hfinkel at anl.gov> wrote:> +1. Aiming for C17 seems better than aiming for only C11.I interpreted Aaron Ballman's first question as, "why is the lower bound C11 and not C17?" I answered that by saying C++17 standard still refers to C11 standard, so we need to keep C11 as a lower bound. Unless there is some technicality of the language and/or standards which I am not aware of, I did not intend to convey that we do not intend to support latest C standards. Are you saying that the lower bound of standards llvm-libc should support ought to be C17?
On Mon, Jul 15, 2019 at 2:43 PM Siva Chandra <sivachandra at google.com> wrote:> > > On 7/15/19 1:22 PM, Aaron Ballman via llvm-dev wrote: > > > 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. > > I think there is some misunderstanding here. My first message said > llvm-libc will target C11 __and above__. Which is to imply that the > lower bound of supported standards is C11. > > > On Mon, Jul 15, 2019 at 11:31 AM Finkel, Hal J. <hfinkel at anl.gov> wrote: > > +1. Aiming for C17 seems better than aiming for only C11. > > I interpreted Aaron Ballman's first question as, "why is the lower > bound C11 and not C17?" I answered that by saying C++17 standard still > refers to C11 standard, so we need to keep C11 as a lower bound. > > Unless there is some technicality of the language and/or standards > which I am not aware of, I did not intend to convey that we do not > intend to support latest C standards. > > Are you saying that the lower bound of standards llvm-libc should > support ought to be C17?Yes, I'm sorry if I was unclear. I think that there's not much purpose to supporting C11 as the lower bound given that C17's standard library is C11's standard library, but with bug fixes. There were no new features added during C17. ~Aaron