[COFF] Community 'deprecation' of gets(3)

Alexis via COFF coff at tuhs.org
Thu May 21 13:04:31 AEST 2026


Hi all,

Wasn't entirely sure whether this would be appropriate for TUHS, 
so erring on the side of caution and posting here. :-) If it _is_ 
appropriate, please loop TUHS in on any replies.

At what point did the use of gets(3) become 'deprecated' by the C 
/ Unix / whatever communities, for security and general buginess 
reasons? In the sense that there was a general consensus that it 
shouldn't be used, particularly due to the security implications, 
despite still being permitted by specs?

gets(3) was:

* included in Issue 1, but i can't find an online copy of that (or 
  of Issue 1 of the SVID)[a];
* deprecated in C99, removed in C11; and
* obsoleted by POSIX Issue 7 / .1-2008.


Alexis.

[a] My search-fu has been failing in general of late, so i 
wouldn't be surprised if someone said "It's /here/; that took me 
10 seconds to find." :-P


More information about the COFF mailing list