Re: [PATCH libcrypto v2 2/3] compiler: introduce at_least parameter decoration pseudo keyword
From: Herbert Xu
Date: Fri Nov 21 2025 - 22:08:48 EST
On Sat, Nov 22, 2025 at 03:46:38AM +0100, Jason A. Donenfeld wrote:
>
> Saw your reply to v1 and was thinking about that. Will do. Thanks for
> pointing this out.
It seems that we need to bring the brackets back, because sparse
won't take this either:
int foo(int n, int a[n])
{
return a[0]++;
}
But this seems to work:
#ifdef __CHECKER__
#define at_least(x)
#else
#define at_least(x) static x
#endif
int foo(int n, int a[at_least(n)])
{
return a[0]++;
}
Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt