Re: include/net/sock.h:2100:16: sparse: sparse: cast to non-scalar

From: Al Viro

Date: Sun Jan 11 2026 - 13:50:18 EST


On Sun, Jan 11, 2026 at 06:20:10PM +0000, Al Viro wrote:

> Guys, do you have any problems with replacing __unqual_scalar_typeof()
> uses with that thing?
>
> As in,#ifndef __smp_load_acquire
> #define __smp_load_acquire(p) \
> ({ \
> unqual_non_array(__typeof__(*p)) ___p1 = READ_ONCE(*p); \
> ...
>
> Objections? IMO it's more palatable than current __unqual_scalar_typeof()...

Argh... gcc prior to 8.4 fucks it up, and our minimum is 8.1 ;-/
Pity, that... I still think it's worth keeping in mind for when
we bump the minimal gcc revision, though.

FWIW, with clang it works all way back at least to 3.1; icc - at least
to 13.0.1...