Re: Brief C23 excursion

Ian Collier via Mutt-dev <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
On Thu, Apr 16, 2026 at 01:22:24PM +0200, Alejandro Colomar via Mutt-dev wrote:
> I've implemented a patch for musl (which hasn't been merged yet).
> It only needs C11 features.

> 	#define __QVoidptrof(p)  typeof(1?(p):(void*){0})
> 	#define __QCharptrof(s)  typeof                               \
> 	(                                                             \
> 		_Generic((__QVoidptrof(s)){0},                        \
> 			const void *: (const char *) 0,               \
> 			void *:       (char *) 0                      \
> 		)                                                     \
> 	)

[Sorry for the slightly off-topic discussion]

Correct me if I'm wrong, but that's going to barf if I perversely
declare my character pointer as volatile and pass it to one of
these functions, yes?  (It would otherwise just be a warning.)

Ian Collier.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.