Sujet : Re: Word For Today: “Uglification”
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 13. Mar 2024, 00:29:27
Autres entêtes
Organisation : None to speak of
Message-ID : <871q8f81wo.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Lawrence D'Oliveiro <
ldo@nz.invalid> writes:
On Tue, 12 Mar 2024 08:03:50 +0000, Richard Kettlewell wrote:
That’s true, but AFAICT it’s exactly what Lawrence is complaining about:
there’s nothing in the language spec to help those thousand other
libraries avoid name clashes.
>
My specific complaint was about temporary names being used internal to
library macros. It’s a problem that is essentially impossible to solve
with string-based macro processors.
Here's the macro definition you cited upthread:
"""
From /usr/include/«arch»/bits/select.h on my Debian system:
#define __FD_ZERO(s) \
do { \
unsigned int __i; \
fd_set *__arr = (s); \
for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
__FDS_BITS (__arr)[__i] = 0; \
} while (0)
"""
Can you explain how that would cause a problem?
Note the following that precedes the macro definition in
/usr/include/x86_64-linux-gnu/bits/select.h on my Ubuntu system:
"""
#ifndef _SYS_SELECT_H
# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
#endif
"""
so it's not going to be invoked from user-written code.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comWorking, but not speaking, for Medtronicvoid Void(void) { Void(); } /* The recursive call of the void */