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

From: Miguel Ojeda
Date: Wed Feb 02 2022 - 15:14:16 EST


On Wed, Feb 2, 2022 at 5:19 PM David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> - The conditional operator (?:) requires that both expressions have the
> the same type (after numeric promotions).

I think you are referring to the arithmetic types case, but that one
does not apply here.

> - If the expressions have distinct non-NULL pointer types then they are both
> cast to (void *) and the result has type 'void *'.

GCC and Clang give `void *` for this, but something like `float *` and
`int *` do not fit the constrains of the operator.

Cheers,
Miguel