Messages in this thread | | | From | Linus Torvalds <> | Date | Thu, 25 Aug 2022 01:07:22 -0700 | Subject | Re: [for-linus][PATCH 01/10] tracing: Suppress sparse warnings triggered by is_signed_type() |
| |
On Thu, Aug 25, 2022 at 12:57 AM Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote: > > One can also make the RHS not be a null pointer constant with something like > > (((t)(-1)) <= (1 ? (t)0 : (t)0))
Oh Gods.
Let's not go there. I'm sure some version of gcc will figure that out as being NULL in the end and warn about that too.
I do agree that a comment about the exact choice and why (integers vs pointers with NULL conversions, and compilers vs sparse) for the particular syntax would not be misplaced.
Linus
| |