From: Jonathan Wakely <jwakely@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Jason Merrill <jason@redhat.com>,
gcc-patches@gcc.gnu.org, Marek Polacek <polacek@redhat.com>
Subject: Re: [PATCH] c++, v2: Implement C++23 P2647R1 - Permitting static constexpr variables in constexpr functions
Date: Wed, 16 Nov 2022 00:27:02 +0000 [thread overview]
Message-ID: <CACb0b4msuM8Ec14qR4PuKqqVHy+r8AdGgJhp_5sKhJE6W=vN4A@mail.gmail.com> (raw)
In-Reply-To: <Y3QlsvqvELygI7uj@tucnak>
On Tue, 15 Nov 2022 at 23:50, Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Tue, Nov 15, 2022 at 06:36:38PM -0500, Jason Merrill wrote:
> > > Here is an updated patch that passed bootstrap/regtest, the only
> > > change is another testcase tweak.
> > >
> > > 2022-11-13 Jakub Jelinek <jakub@redhat.com>
> > >
> > > gcc/c-family/
> > > * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
> > > value from 202207L to 202211L.
> > > gcc/cp/
> > > * constexpr.cc (cxx_eval_constant_expression): Implement C++23
> > > P2647R1 - Permitting static constexpr variables in constexpr functions.
> > > Allow decl_maybe_constant_var_p static or thread_local vars for
> > > C++23.
> >
> > This was accepted as a DR, so it shouldn't be limited to C++23 mode.
> > Certainly it should be allowed in C++20 mode; I don't have a strong opinion
> > about C++14/17. Jonathan, do you?
>
> How will a feature with feature test macro with multiple values work as DR?
> Or will everything but the macro be treated as a DR (so __cpp_constexpr >=
> 202211L only for C++23)?
Yes, I think so. We just won't be able to advertise this feature as
supported in C++20.
> Because __cpp_constexpr >= 202211L is >= 202207L too and that implies
> P2448R2 which wasn't a DR and >= 202110L which implies P2242R3 which wasn't a
> DR. And C++20 added other 2 non-DR papers that bumped the value.
> C++17 another one.
>
> > > (potential_constant_expression_1): Likewise.
> > > gcc/testsuite/
> > > * g++.dg/cpp23/constexpr-nonlit17.C: New test.
> > > * g++.dg/cpp23/feat-cxx2b.C: Adjust expected __cpp_constexpr
> > > value.
> > > * g++.dg/ext/stmtexpr19.C: Don't expect an error for C++23 or later.
>
> Jakub
>
next prev parent reply other threads:[~2022-11-16 0:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 17:07 [PATCH] c++: " Jakub Jelinek
2022-11-13 11:45 ` [PATCH] c++, v2: " Jakub Jelinek
2022-11-15 23:36 ` Jason Merrill
2022-11-15 23:50 ` Jakub Jelinek
2022-11-16 0:27 ` Jonathan Wakely [this message]
2022-11-16 6:19 ` Jakub Jelinek
2022-11-16 13:20 ` Jason Merrill
2022-11-16 14:08 ` Jakub Jelinek
2022-11-16 14:33 ` Jason Merrill
2022-11-16 14:46 ` Jakub Jelinek
2022-11-16 20:26 ` Jason Merrill
2022-11-17 9:13 ` [PATCH] c++, v3: " Jakub Jelinek
2022-11-17 14:42 ` Jason Merrill
2022-11-17 18:42 ` Jakub Jelinek
2022-11-17 20:42 ` [PATCH] c++, v4: " Jakub Jelinek
2022-11-18 0:15 ` Marek Polacek
2022-11-18 7:48 ` Jakub Jelinek
2022-11-18 15:03 ` Marek Polacek
2022-11-18 15:14 ` Jakub Jelinek
2022-11-18 16:24 ` Jason Merrill
2022-11-18 16:34 ` Jakub Jelinek
2022-11-18 16:52 ` Jason Merrill
2022-11-18 0:28 ` Jason Merrill
2022-11-18 9:10 ` [PATCH] c++, v5: " Jakub Jelinek
2022-11-16 0:26 ` [PATCH] c++, v2: " Jonathan Wakely
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='CACb0b4msuM8Ec14qR4PuKqqVHy+r8AdGgJhp_5sKhJE6W=vN4A@mail.gmail.com' \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=jason@redhat.com \
--cc=polacek@redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).