From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: David Laight <David.Laight@aculab.com>
Cc: Kees Cook <keescook@chromium.org>,
Jonathan Corbet <corbet@lwn.net>,
Linus Torvalds <torvalds@linux-foundation.org>,
Martin Uecker <Martin.Uecker@med.uni-goettingen.de>,
Ingo Molnar <mingo@kernel.org>,
Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Nick Desaulniers <ndesaulniers@google.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hardening@vger.kernel.org"
<linux-hardening@vger.kernel.org>
Subject: Re: [PATCH] linux/const.h: Explain how __is_constexpr() works
Date: Wed, 2 Feb 2022 21:13:49 +0100 [thread overview]
Message-ID: <CANiq72neVsdLRyLn24avMhLCaHxMEiG0bD-ZkG46O7J29FanYA@mail.gmail.com> (raw)
In-Reply-To: <6641e01b86374ce197020d57c65ae3b3@AcuMS.aculab.com>
On Wed, Feb 2, 2022 at 5:19 PM David Laight <David.Laight@aculab.com> 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
next prev parent reply other threads:[~2022-02-02 20:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 20:43 [PATCH] linux/const.h: Explain how __is_constexpr() works Kees Cook
2022-01-31 21:26 ` Gustavo A. R. Silva
2022-02-01 12:01 ` Jani Nikula
2022-02-01 13:05 ` Rasmus Villemoes
2022-02-01 15:09 ` Matthew Wilcox
2022-02-02 8:49 ` David Laight
2022-02-02 15:43 ` Uecker, Martin
2022-02-02 20:14 ` Miguel Ojeda
2022-02-02 16:19 ` David Laight
2022-02-02 20:13 ` Miguel Ojeda [this message]
2022-02-02 22:20 ` David Laight
2022-02-02 23:01 ` Miguel Ojeda
2022-02-02 23:08 ` Nick Desaulniers
2022-02-02 20:44 ` Rasmus Villemoes
2022-02-02 22:42 ` David Laight
2022-02-03 0:28 ` Miguel Ojeda
2022-02-02 20:43 ` Miguel Ojeda
2022-02-03 9:25 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANiq72neVsdLRyLn24avMhLCaHxMEiG0bD-ZkG46O7J29FanYA@mail.gmail.com \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=David.Laight@aculab.com \
--cc=Martin.Uecker@med.uni-goettingen.de \
--cc=akpm@linux-foundation.org \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=gustavoars@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=ndesaulniers@google.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=rikard.falkeborn@gmail.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).