Hi Ian,

On 2026-04-17T13:13:39+0100, Ian Collier via Mutt-dev wrote:
> 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.)

Yes, and that's A Good Thing(tm).  Previously, it was just a warning,
but it had Undefined Behavior, which you certainly didn't want.


Have a lovely day!
Alex

> 
> Ian Collier.

-- 
<https://www.alejandro-colomar.es>

Attachment: signature.asc
Description: PGP signature

Reply via email to