Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-08 Thread Hans-Peter Nilsson
> Date: Thu, 8 Feb 2024 11:22:47 -0500 > From: Marek Polacek > I'm confused; are you planning to use the dg-ice directive I invented > some years ago? Please, let's keep the discussion about the test-cases in that thread. brgds, H-P

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-08 Thread Marek Polacek
On Thu, Feb 08, 2024 at 05:07:21PM +0100, Hans-Peter Nilsson wrote: > > Date: Thu, 8 Feb 2024 10:44:31 -0500 > > From: Marek Polacek > > Cc: ja...@redhat.com, gcc-patches@gcc.gnu.org > > Content-Type: text/plain; charset=us-ascii > > Content-Disposition: inline > > > > On Thu, Feb 08, 2024 at

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-08 Thread Hans-Peter Nilsson
> Date: Thu, 8 Feb 2024 10:44:31 -0500 > From: Marek Polacek > Cc: ja...@redhat.com, gcc-patches@gcc.gnu.org > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > On Thu, Feb 08, 2024 at 04:40:40PM +0100, Hans-Peter Nilsson wrote: > > > Date: Wed, 7 Feb 2024 21:11:59

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-08 Thread Marek Polacek
On Thu, Feb 08, 2024 at 04:40:40PM +0100, Hans-Peter Nilsson wrote: > > Date: Wed, 7 Feb 2024 21:11:59 -0500 > > From: Marek Polacek > > > On Wed, Feb 07, 2024 at 04:32:57PM -0500, Jason Merrill wrote: > > > On 2/6/24 19:23, Hans-Peter Nilsson wrote: > > > > > Date: Mon, 22 Jan 2024 14:33:59

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-08 Thread Hans-Peter Nilsson
> Date: Wed, 7 Feb 2024 21:11:59 -0500 > From: Marek Polacek > On Wed, Feb 07, 2024 at 04:32:57PM -0500, Jason Merrill wrote: > > On 2/6/24 19:23, Hans-Peter Nilsson wrote: > > > > Date: Mon, 22 Jan 2024 14:33:59 -0500 > > > > From: Marek Polacek > > > > > > > On Mon, Jan 22, 2024 at

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-07 Thread Marek Polacek
On Wed, Feb 07, 2024 at 04:32:57PM -0500, Jason Merrill wrote: > On 2/6/24 19:23, Hans-Peter Nilsson wrote: > > > Date: Mon, 22 Jan 2024 14:33:59 -0500 > > > From: Marek Polacek > > > > > On Mon, Jan 22, 2024 at 06:02:32PM +0100, Hans-Peter Nilsson wrote: > > > > I don't really know whether this

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-07 Thread Jason Merrill
On 2/6/24 19:23, Hans-Peter Nilsson wrote: Date: Mon, 22 Jan 2024 14:33:59 -0500 From: Marek Polacek On Mon, Jan 22, 2024 at 06:02:32PM +0100, Hans-Peter Nilsson wrote: I don't really know whether this is the right way to treat CONVERT_EXPR as below, but... Regtested native

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-06 Thread Hans-Peter Nilsson
> Date: Mon, 22 Jan 2024 14:33:59 -0500 > From: Marek Polacek > On Mon, Jan 22, 2024 at 06:02:32PM +0100, Hans-Peter Nilsson wrote: > > I don't really know whether this is the right way to treat > > CONVERT_EXPR as below, but... Regtested native > > x86_64-linux-gnu. Ok to commit? > > Thanks

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-01-22 Thread Hans-Peter Nilsson
> Date: Mon, 22 Jan 2024 14:33:59 -0500 > From: Marek Polacek > The problem seems to be more about conversion so > g++.dg/conversion/reinterpret5.C > or g++.dg/cpp0x/constexpr-reinterpret3.C seems more appropriate. > > > @@ -0,0 +1,49 @@ > > Please add > > PR c++/113545 > > + unsigned

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-01-22 Thread Hans-Peter Nilsson
> Date: Mon, 22 Jan 2024 14:33:59 -0500 > From: Marek Polacek Oh, there was more... Also, I think I misinterpreted your reply as meaning that the test-case is ice-on-invalid and I wrongly replied in agreement to that misinterpretation. :) (For others at a comparable level of (lack of) C++

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-01-22 Thread Hans-Peter Nilsson
> Date: Mon, 22 Jan 2024 14:33:59 -0500 > From: Marek Polacek > On Mon, Jan 22, 2024 at 06:02:32PM +0100, Hans-Peter Nilsson wrote: > > I don't really know whether this is the right way to treat > > CONVERT_EXPR as below, but... Regtested native > > x86_64-linux-gnu. Ok to commit? > > Thanks

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-01-22 Thread Marek Polacek
On Mon, Jan 22, 2024 at 06:02:32PM +0100, Hans-Peter Nilsson wrote: > I don't really know whether this is the right way to treat > CONVERT_EXPR as below, but... Regtested native > x86_64-linux-gnu. Ok to commit? Thanks for taking a look at this problem. > brgds, H-P > > -- >8 -- > That

[PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-01-22 Thread Hans-Peter Nilsson
I don't really know whether this is the right way to treat CONVERT_EXPR as below, but... Regtested native x86_64-linux-gnu. Ok to commit? brgds, H-P -- >8 -- That gcc_unreachable at the default-label seems to be over the top. It seems more correct to just say "that's not constant" to