<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 27, 2019, at 5:05 PM, Siva Chandra <<a href="mailto:sivachandra@google.com" class="">sivachandra@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Wed, Jun 26, 2019 at 10:27 AM JF Bastien <<a href="mailto:jfbastien@apple.com" class="">jfbastien@apple.com</a>> wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">3. If there is a specification, we should follow it. The scope that we need includes most of the C Standard Library; POSIX additions; and some necessary, system-specific extensions. This does not mean we should (or can) follow the entire specification -- there will be some parts which simply aren't worth implementing, and some parts which cannot be safely used in modern coding practice.<br class=""></blockquote></blockquote><br class=""><blockquote type="cite" class="">I’d love to hear what you have in mind with point 3 above, and see it expanded. libc++ implements C++11 and subsequent standards, and that makes me wonder:<br class=""><br class="">Which standards would this libc implement?<br class=""></blockquote><br class="">We need parts of the C standard library, parts of the POSIX<br class="">extensions, and also the linux headers. The community is of course<br class="">free to widen the surface as needed.<br class=""></div></div></blockquote><div><br class=""></div><div>Which standard specifically? So far the responses sound like “the standard Google uses”. I don’t think that's a good objective for such a project. For practical purposes that’s the implementation approach that makes sense to start with, but I’m looking for what the charter of this LLVM project should be.</div><div><br class=""></div><div>Compare with libc++: <a href="https://libcxx.llvm.org" class="">https://libcxx.llvm.org</a></div><div>I think you want to fill out a proposed set of documentation pages, like libc++’s, and answer the questions libc++ answers. Not where you’ll start or in what order (though that’s useful for this discussion!), but what your proposed libc aspires to be.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class="">Would you implement upcoming C standards, and how would you manage “experimental” features (API changes, ABI changes, etc)?<br class=""></blockquote><br class="">We will probably take this up on an as-needed basis.<br class=""></div></div></blockquote><div><br class=""></div><div>Same as above, IMO an LLVM project should aspire to something bigger, even if practical concerns guide the initial implementation.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class="">What parts of the standard wouldn’t you follow, why, how would the LLVM community determine this?<br class=""></blockquote><br class="">I would think what we (the "we" here is for the developer community<br class="">and not my company or my team) communicate would depend on how the<br class="">project evolves. For example, at the very beginning, we will probably<br class="">only say "large parts of the standards A, B, C are still<br class="">unimplemented." When the implemented surface becomes large enough, we<br class="">might start explicitly listing the unimplemented parts. There might be<br class="">parts which require qualification with version numbers.<br class=""><br class=""><blockquote type="cite" class="">Which parts aren’t worth implementing?<br class="">Which parts cannot be safely used in modern coding practice? How would you remedy what’s perceived as “the bad parts”?<br class=""></blockquote><br class="">At a certain level, what is worth and what is safe/unsafe is a<br class="">subjective matter. So, instead of listing my opinions here, let me say<br class="">this: If we build sufficient modularity into the libc, one will be<br class="">able to pick and choose what they want, and omit what they do not<br class="">want.<br class=""><br class=""><blockquote type="cite" class="">I’d love it if the C Standards Committee, WG14, got renewed involvement through this project. Is that an explicit goal? Who will join WG14 in this effort?<br class="">What part of C do you see this project help improve over time?<br class=""></blockquote><br class="">The answer to this question also depends on how the project and the<br class="">community around it evolves.<br class=""></div></div></blockquote><div><br class=""></div><div>Personally I’m really interested in a project that increases the quality of all C libraries, and of the C standard. I therefore think champions of this project signing up to collaborate with WG14 is important.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class="">How do you intend to test this C library? Fuzzing and all that is nice, but just straight conformance testing is what I’d like to hear about.<br class=""></blockquote><br class="">What kind of testing we want to do depends on what exactly is getting<br class="">tested. But in general, we want to do conformance tests for sure. We<br class="">also want to do some amount of differential testing between this new<br class="">libc and an existing, battle tested libc. Depending on what is getting<br class="">tested, we also want to be able to test against the test suite of an<br class="">existing libc.<br class=""></div></div></blockquote></div><br class=""><div class="">I think again, it’s useful to look at libc++ here, and see its testing strategy. It tests against multiple standards, calling out what it’s testing exactly, and it also tests extensions and other non-standard things, calling out when it does so. This allows, for example, the Microsoft STL implementors to use the libc++ test suite.</div><div class=""><br class=""></div><div class="">I think you need write a design for how this C library will be tested.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I suggest you have a chat with Marshall Clow (CC’ed). He does a lot of really good work with libc++ and the C++ Standards Committee. I’d like this C library to be similar to libc++ in many ways, and I’d like a leader like Marshall involved in leading this C library. Talking to Marshall will help understand the type of leadership I’d like to see in this project.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>