On 2024-05-13 10:33, Bruno Haible wrote:
In the stdbit and binary-io modules, you have been introducing a number
of a symbols with prefix __gl_.
I would propose to remove the first underscore, that is, to rename them
to_gl_*.
Rationale:
* It is well understood that symbols prefixed with __ belong
to the implementation of the system, that is, to the compiler and libc.
Gnulib code is application code, from this perspective.
* I've seen gcc 14 warnings for '#undef __STDC_VERSION_STDDEF_H__' [1]
and I don't know how the compilers will evolve in their handling of
such symbols.
I take your point, but when Gnulib implements a standard C or POSIX
feature the Gnulib code is arguably part of the implementation not the
application.
For stdbit.h the issue was whether stdbit.h should be namespace clean as
required by the standards, or whether it should avoid using identifiers
reserved to the implementation. I saw no practical way to do both, and
chose the former.
Gnulib defines many other "belong to the implementation" symbols such as
__gl_error_call and _GL_EXTERN. Many of these symbols are inherited from
Gnulib's copying of glibc code, e.g., __glibc_likely. So I figured there
was a lot of precedent for this sort of thing.