<div dir="ltr"><div dir="ltr">On Thu, 3 Jan 2019 at 13:44, Jonny Grant via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
Hello<br>
<br>
This file lists part of Annex K "stdint.h"<br>
<font face="Helvetica, Arial, sans-serif"><a class="gmail-m_-1836967506562377052moz-txt-link-freetext" href="https://clang.llvm.org/doxygen/stdint_8h_source.html" target="_blank">https://clang.llvm.org/doxygen/stdint_8h_source.html</a></font><br>
<br>
But main C++ page doesn't mention Annex K. Is Annex K really fully
supported?<br></div></blockquote><div><br></div><div>That's generally not up to us; that's part of the C standard library, not part of the compiler.</div><div><br></div><div>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.</div><div><br></div><div>So in that sense, we implement the part of Annex K that is in our domain.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
Some background<br>
<a class="gmail-m_-1836967506562377052moz-txt-link-freetext" href="https://clang.llvm.org/compatibility.html" target="_blank">https://clang.llvm.org/compatibility.html</a><br>
<a class="gmail-m_-1836967506562377052moz-txt-link-freetext" href="https://clang.llvm.org/cxx_status.html" target="_blank">https://clang.llvm.org/cxx_status.html</a></div></blockquote><div><br></div><div>I'm not sure what these are supposed to show: Annex K is optional in C, and not part of C++.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
C11 standard, ISO/IEC 9899:2011 added Annex K safe functions like
strncpy_s<br>
<br>
__STDC_LIB_EXT1__ <br>
<br>
<a class="gmail-m_-1836967506562377052moz-txt-link-freetext" href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm" target="_blank">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm</a><br>
<br>
Jonny<br>
</div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>