Geoff Clare <yyy@xxxxxxxxxxxxx> writes:
> Action:
>
> Mark the gets() function obsolescent in the SYNOPSIS on page 568 with
> the OB marker and shading.
I agree that these functions should be deprecated.
However, I just now noticed that getwd is marked LEGACY (not OB)
because it's unsafe, so this raises the issue of consistency.
getwd, gets, asctime, asctime_r, ctime, and ctime_r are all in
the same unsafe-function category, and they should all be treated
similarly by the standard.
One possibility is to mark them all with OB. (I assume that OB
outrankes LEGACY, so getwd would no longer be marked LEGACY.)
Here's another idea: we could invent a new marker UNSAFE for unsafe
functions, and mark these functions as UNSAFE _and_ OB. After all,
unsafe is in some real sense worse than obsolete, and users ought to
be warned about them.
The idea of the separate UNSAFE marking would be that a conforming
implementation should be allowed to treate these functions specially.
For example, a compiler or linker might print a diagnostic whenever it
sees these functions, or a runtime library might print a diagnostic
when the functions are called, or ask the user "Are you _sure_ you
want to run this program?". That sort of thing.
|