This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/87096] "Optimised" snprintf is not POSIX conformant
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Dec 2018 17:50:33 +0000
- Subject: [Bug rtl-optimization/87096] "Optimised" snprintf is not POSIX conformant
- Auto-submitted: auto-generated
- References: <bug-87096-4@http.gcc.gnu.org/bugzilla/>
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.