This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C11 compiler and runtime support?


On Fri, 6 Dec 2013, Carlos O'Donell wrote:

> Joseph,
> 
> Are we considering that gcc and glibc are C11 ready?

Yes, as of GCC 4.9 and glibc 2.16.

> I know you've made comments that you feel that the 
> C11 support equivalent to the C99 support.
> 
> Does that mean that glibc can declare the C11 support
> ready for pre-production uses (modulo bugs)?

Yes.  Obviously bugs may be found as people start using the features more 
widely, though I think that's most likely with the atomics support in GCC 
rather than the library features.

> Should we have a wiki page to track this feature and
> missing functionality such that interested parties can
> sign up to do more work?

Describing exactly what's meant by supporting a standard is rather 
complicated and liable to have lots of caveats about e.g. particular 
configurations or optional features.

We already have 
<https://sourceware.org/glibc/wiki/Development_Todo/Master>, which 
mentions various possible additions, including the optional C11 threads 
library (which as far as I know no-one has expressed any interest in 
implementing for glibc).  That's not a small project, of course.  Then 
there's the matter of the optional Annex K bounds-checking interfaces.  
Ulrich Bayer posted some initial patch versions and the assignment 
paperwork was completed and there was some review, but there haven't been 
updated versions posted since June; it needs patches posting / pinging 
until we get consensus on a version to include (and then there will be 
various extra functions from that Annex to add bit by bit).  For the 
__STDC_WANT_LIB_EXT1__ handling it may make sense not to include 
consistency checks for now, given the WG14 mood for simpler __STDC_WANT_* 
macro semantics.

Strictly there's the matter of using _Noreturn in glibc headers for C11 
compilers not claiming to be GCC - see analysis at 
<https://sourceware.org/ml/libc-alpha/2012-01/msg00084.html> - but that's 
not much of an issue in practice.

It would be useful for people to add such features to the todo list if not 
already there.  Conformance bugs (C or POSIX) should be filed in Bugzilla 
if not already there.  It would be useful for someone to go through past 
discussions of such issues 
<https://sourceware.org/ml/libc-alpha/2012-06/msg00759.html> 
<https://sourceware.org/ml/libc-alpha/2012-09/msg00106.html> (and 
followups) <https://sourceware.org/ml/libc-alpha/2012-09/msg00705.html> 
(and followups with some analysis) and ensure that all identified issues 
from those discussions are in Bugzilla or the todo list as appropriate.

In general the main issues with optional floating-point features (Annexes 
F and G, in both C99 and C11) are on the GCC side rather than the glibc 
side, and while there may be some its admitting more or less local 
incremental fixes, proper GCC support for exceptions and rounding modes 
would probably take several person-months.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]