Re: [PATCH] c++: Reject identifier label in constexpr [PR97846]

2020-11-21 Thread Marek Polacek via Gcc-patches
On Fri, Nov 20, 2020 at 05:18:55PM -0500, Jason Merrill via Gcc-patches wrote: > On 11/16/20 9:58 PM, Marek Polacek wrote: > > [dcl.constexpr]/3 says that the function-body of a constexpr function > > shall not contain an identifier label, but we aren't enforcing that. > > > > This patch

Re: [PATCH] c++: Reject identifier label in constexpr [PR97846]

2020-11-20 Thread Jason Merrill via Gcc-patches
On 11/16/20 9:58 PM, Marek Polacek wrote: [dcl.constexpr]/3 says that the function-body of a constexpr function shall not contain an identifier label, but we aren't enforcing that. This patch implements that. Of course, we can't reject artificial labels. Bootstrapped/regtested on

[PATCH] c++: Reject identifier label in constexpr [PR97846]

2020-11-16 Thread Marek Polacek via Gcc-patches
[dcl.constexpr]/3 says that the function-body of a constexpr function shall not contain an identifier label, but we aren't enforcing that. This patch implements that. Of course, we can't reject artificial labels. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog: