Re: include/net/sock.h:2100:16: sparse: sparse: cast to non-scalar
From: Al Viro
Date: Mon Jan 12 2026 - 19:26:37 EST
On Mon, Jan 12, 2026 at 10:39:23PM +0000, David Laight wrote:
> Using __auto_type y = (1 ? 0 : 0+x) gives a non-const 'y' even with gcc 10.
... which does not work at all for the example that has started
that thread:
typedef struct {
uid_t val;
} kuid_t;
Arithmetics is not an option for existing uses. , and ?: would be OK, but
they are even worse than return type - at least that got fixed in 8.4.
As for the -Wignored-qualifiers... Sure, that's included into -Wextra, along
with many other insanities - -Wunused-parameter, for example. Grep for
-Wextra and you'll see...