Alejandro Colomar asks:
> And if we don't make strchr(3) etc. const-generic, do you want to
> make strnul() const-generic?

Yes, strnul() should be made const-generic.

The reason: Think five years ahead, when most developers will use
glibc headers with const-generic strchr(). Then any function that
Gnulib adds and that could be const-generic but isn't would appear
old-style or outdated.

In other words, strnul() being a Gnulib addition, it's Gnulib's
responsibility to make it const-generic (for those compilers that
support _Generic; possibly with a 'template' alternative in C++ mode).

Bruno




Reply via email to