This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] |
On 11/28/2016 05:42 PM, Joseph Myers wrote:
On Sun, 27 Nov 2016, Martin Sebor wrote:Finally, the patch also tightens up the constraint on the upper bound of bounded functions like snprintf to be INT_MAX. The functions cannot produce output in excess of INT_MAX + 1 bytes and some implementations (e.g., Solaris) fail with EINVAL when the bound is INT_MAX or more. This is the subject of PR 78520.Note that failing with large bounds is questionable (there is an apparent conflict between ISO C, where passing a large bound seems valid, and POSIX, where large bounds require errors; see <http://austingroupbugs.net/view.php?id=761>; I'm not sure if any liaison issue for this ever got passed to WG14).
Thanks! That's useful background. Let me check with Nick to see is he (as the POSIX/WG14 liaison) plans to submit it. I can also write it up for the next WG14 meeting if we or the Austin Group feel like WG14 should clarify or change things. Martin
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |