[cfe-dev] LibC++ v3.8 - Problems with ISO C wrapper headers

David Chisnall via cfe-dev cfe-dev at lists.llvm.org
Wed Jan 27 01:24:41 PST 2016


On 26 Jan 2016, at 20:09, Martin J. O'Riordan via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> And C++ also requires that some parts of the interfaces from C are presented to C++ as functions - examples being ‘fpclassify’, ‘signbit’ etc.  These have to be handled differently, and I think that the current LibC++ approach to these is good and maintains semantic compatibility with C.
>  
> I had intended to build a patch file of my changes today in case anyone is interested, but other things got me busy.  I’ll do that tomorrow and attach it to this thread.
>  
> I think that it is a good idea to have LibC++ provide its own wrapper headers for the C headers.  It is a logical place to deal with portability issues that arise when referring to C headers provided by newlib, uclibc or glibc (and other less well known implementations).  The handling of these portability issues will mean that the ‘c’ prefixed C++ headers will need little or no alteration and just maintain the ‘std’ namespace.
> 

I note that none of your listed libc implementations are the defaults on the operating systems that ship libc++ as the default C++ standard library implementation…

It would be very helpful for people who are working on this to provide a set of recommendations for C library maintainers to make C++ interoperability easier.  That way, those of us who do have control over the libc headers can work from the other end to improve the situation.

David




More information about the cfe-dev mailing list