RE: [PATCH] linux/const.h: Explain how __is_constexpr() works

From: David Laight
Date: Wed Feb 02 2022 - 03:49:41 EST


From: Rasmus Villemoes
> Sent: 01 February 2022 13:06
...
> > + * - The C standard defines an "integer constant expression" as different
> > + * from a "null pointer constant" (an integer constant 0 pointer).
>
> I don't see the point of this bullet. Yes, an ICE is a distinct concept
> from a null pointer constant, obviously. One is defined in terms of the
> other - and your parenthesis is not an accurate paraphrase of the
> definition of a null pointer constant.

>From what I remember a "null pointer constant" is in "integer constant
expression with value 0 cast to a pointer type".
So (void *)(1-1) is just as valid as (void *)0.

Not sure any of it is relevant here.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)