2

Are there any Proposals (or plans) to the C language Standard to change the (last sentence of the) description of the snprintf function such that the ambiguity described in this my answer to the question - "Is snprintf() ALWAYS null terminating?"- is resolved?

(Or how (using which links) can I determine by myself if there are any such Proposals?
Is there any search engine that can show all the currently active Proposals about the snprintf function?
The only link I currently know is this one - http://www.open-std.org/jtc1/sc22/wg14/ - and this is the first time I have particular thoughts about a Proposal to any Standard)

cleblanc
  • 3,678
  • 1
  • 13
  • 16
Robin Kuzmin
  • 742
  • 4
  • 12
  • 2
    This might be a good topic for discussion, but probably not here. (unless there is a specific, unsolved code related issue you are currently trying to work) – ryyker May 24 '18 at 17:52
  • For what it's worth, WG14 is notoriously bad about actually fixing imprecise language in the standard when the intent is clear, especially when it was stated explicitly elsewhere in the standard. – R.. GitHub STOP HELPING ICE May 24 '18 at 17:54
  • 1
    Snprintf is not always NUL-terminating: it is legal to provide a length of zero, in which case nothing is written. Otherwise it is guaranteed to NUL-terminate. That all seems quite clear from the description, and the sentence you quote starting with the word "thus" is completely correct (and furthermore could be removed without changing the specification). With all respect, your difficulty in understanding the statement is not sufficient reason to edit the standard, which is not intended to be tutorial in nature. – rici May 24 '18 at 19:59
  • 1
    @rici, yes. I think that this last phrase *"Thus, ..."* does not add normative constraints. Maybe it would perhaps be better to either remove it or to have it as a Note or footnote. – Jens Gustedt May 24 '18 at 20:33
  • 2
    C11 annex K, chapter 3.5.3.5 describes snprintf_s(), the fixed version of snprintf(). A man page [is here](https://docs.oracle.com/cd/E88353_01/html/E37843/snprintf-s-3c.html), it is not great. – Hans Passant May 25 '18 at 09:00

1 Answers1

2

From the WG14 page you can find a list of all C11 defect reports (DR).

I can only find one DR about snprintf, DR 428. Though I didn't check if this is the same issue.

As for how to propose a DR, I suppose you have to go through your national standard institute and contact your national part of WG14, which in the US would be INCITS PL22.11.

Lundin
  • 195,001
  • 40
  • 254
  • 396