RE: [PATCH v6 06/15] tools/nolibc: __sysret: support syscalls who return a pointer
From: David Laight
Date: Mon Aug 07 2023 - 04:16:18 EST
From: Zhangjin Wu
> Sent: 06 August 2023 13:34
...
> Based on your macro version, I tried to use the is_signed_type() from kernel,
> it seems works.
You'll find that (void *)0 isn't 'constant enough' for
is_constexpr() - so is_constexpr((type)0) can be used
to detect pointer types.
Probably requires an 'is_pointer_type()' define.
This also rather means that is_signed_type() needs to be
wrapped in is_constexpr() - probably generating header
file inclusion hell.
I'm going to add a comment on v3 of the patch...
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)