[Bug rtl-optimization/87096] "Optimised" snprintf is not POSIX conformant

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 12 17:50:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87096

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
I find the POSIX requirement to fail when n is greater than INT_MAX to be in
conflict with C.  I've submitted a defect to the Austin Group:
  http://austingroupbugs.net/view.php?id=1219
At the same time, the POSIX requirement makes sense to me since it makes the
function safer.  So I've also brought this up in WG14 to see if C would be
willing to adopt the POSIX requirement.


More information about the Gcc-bugs mailing list