[cfe-dev] [libcxx] What C standard is assumed in libcxx?

Asiri Rathnayake via cfe-dev cfe-dev at lists.llvm.org
Wed May 25 12:34:04 PDT 2016


Thanks Ben.

Yes, my concern is about library features. As long as libcxx does not
assume C11 (or later) library features, we are mostly OK :)

/ Asiri

On Wed, May 25, 2016 at 6:58 PM, Craig, Ben via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> std::atomic is implemented in terms of the C11 _Atomic feature.  That's a
> language feature though, and not a library feature.  I think you are mostly
> concerned with the library features needed.
>
> I've had success with a C99 Dinkumware library.  I think the backing
> source predates C11.  I've had to do a fair amount on the pthread and posix
> side of things.
>
> To be honest though, I don't know that it is entirely productive to list
> out the dependencies in as abstract a form as "C99 compliant + POSIX 20xx
> compliant".  In practice, libcxx and libcxxabi are developed against
> specific OSes and specific C libraries.  Support is added for those
> platforms.  GLIBC, MUSL, UCLIBC, NEWLIB, and a bunch of other C libraries
> all claim support for C99, but there tends to be little warts in each
> library that requires libcxx intervention.
> On 5/25/2016 9:15 AM, Asiri Rathnayake via cfe-dev wrote:
>
> OK, that makes sense.
>
> So, libc++ essentially assumes C99 + some POSIX extensions like pthreads
> et. al.
>
> Is it OK to assume that libc++ will not depend on C11 functionality in
> future?
>
> Thanks!
>
> / Asiri
>
>
> On Wed, May 25, 2016 at 3:10 PM, Joerg Sonnenberger via cfe-dev <
> <cfe-dev at lists.llvm.org>cfe-dev at lists.llvm.org> wrote:
>
>> On Wed, May 25, 2016 at 10:46:03AM +0100, Asiri Rathnayake via cfe-dev
>> wrote:
>> > For example, the current std::thread support (C++11) does not assume the
>> > underlying C library to be C11 compliant, it instead depends on
>> pthreads.
>> > On the other hand, we do seem to assume a C11 compliant <ctime> header
>> > (e.g. timespec).
>>
>> I think you are confusing C11 functionality with basic POSIX functions.
>> While C11 might have merged a bunch of things from POSIX, things like
>> timespec are much older and wildly supported. That's unlike C11
>> threading for example.
>>
>> Joerg
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>
>
>
> _______________________________________________
> cfe-dev mailing listcfe-dev at lists.llvm.orghttp://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160525/14ba652c/attachment.html>


More information about the cfe-dev mailing list