On Tue, 21 Apr 2020 at 16:59, Martin Sebor <mse...@gmail.com> wrote:

> >>> https://gcc.gnu.org/pipermail/gcc-patches/2020-April/543672.html
> >>
> >> I'm okay with the changes to the tests.
> >>
> >> The target-supports.exp changes look reasonable to me as well but
> >> I can't approve them.  Since you said it's for targets that don't
> >> have file I/O functions I wonder if the name would better reflect
> >> that if it were called, say, check_effective_target_fileio?
> >
> > Since tmpnam is obsolescent in SUSv4 and hence a libc is fine to omit it, 
> > I'd rather fix the tests to use functions that are known to stay.
>
> I would be okay with replacing tmpnam with something else, although
> I don't think it's necessary.  tmpnam is a standard C function that
> conforming C (and so POSIX) implementation are required to provide.

IMO it's perfectly fine to omit obsolescent functions from a
conforming implementation ¹).
But one should use the recommended replacement functions either way,
e.g. mkstemp ²)

thanks,
¹)
[OB] [Option Start] Obsolescent [Option End]
The functionality described may be removed in a future version of this
volume of POSIX.1-2017. Strictly Conforming POSIX Applications and
Strictly Conforming XSI Applications shall not use obsolescent
features.
²)
https://pubs.opengroup.org/onlinepubs/9699919799/functions/tmpnam.html
---8<---
APPLICATION USAGE
  Applications should use the tmpfile(), mkstemp(), or mkdtemp()
functions instead of the obsolescent tmpnam() function.
---8<---

Reply via email to