This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH for c++/91428 - warn about std::is_constant_evaluated in if constexpr
- From: Jason Merrill <jason at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Aug 2019 21:53:37 -0400
- Subject: Re: C++ PATCH for c++/91428 - warn about std::is_constant_evaluated in if constexpr
- References: <20190827215000.GF14737@redhat.com>
On Tue, Aug 27, 2019 at 5:50 PM Marek Polacek <firstname.lastname@example.org> wrote:
> As discussed in 91428 and in
> if constexpr (std::is_constant_evaluated ())
> // ...
> // ...
> always evaluates the true branch. Someone in the SO post said "But hopefully
> compilers will just diagnose that case" so I'm adding a warning.
> I didn't want to invent a completely new warning so I'm tagging along
> Bootstrapped/regtested on x86_64-linux, ok for trunk?