[cfe-dev] C++ Annex K safe C11 functions
Richard Smith via cfe-dev
cfe-dev at lists.llvm.org
Thu Jan 3 14:04:20 PST 2019
On Thu, 3 Jan 2019 at 13:44, Jonny Grant via cfe-dev <cfe-dev at lists.llvm.org>
> This file lists part of Annex K "stdint.h"
> But main C++ page doesn't mention Annex K. Is Annex K really fully
That's generally not up to us; that's part of the C standard library, not
part of the compiler.
The one part of Annex K that *is* part of the compiler, according to the
usual division of responsibilities, wherein the compiler provides the
freestanding headers and the C standard library provides the rest, is the
definition of rsize_t in <stddef.h> and the definition of RSIZE_MAX in
<stdint.h>, and Clang provides those if __STDC_WANT_LIB_EXT1__ is defined.
However, we do not define __STDC_LIB_EXT1__ because, as noted, that's not
up to us, and we have no idea what your C standard library supports.
So in that sense, we implement the part of Annex K that is in our domain.
I'm not sure what these are supposed to show: Annex K is optional in C, and
not part of C++.
C11 standard, ISO/IEC 9899:2011 added Annex K safe functions like strncpy_s
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev