Re: [PATCH] c++: Fix ICE with static_cast when converting from int[] [PR93862]

2020-02-25 Thread Jason Merrill
On 2/24/20 3:41 PM, Marek Polacek wrote: This ICEs since my patch for P0388, which allowed conversions to arrays of unknown bound, but not the reverse, so these two static_casts are ill-formed. [expr.static.cast]/3 says that "cv1 T1" and "cv2 T2" have to be reference-compatible and the comment

Re: [PATCH] c++: Fix ICE with static_cast when converting from int[] [PR93862]

2020-02-24 Thread Marek Polacek
On Mon, Feb 24, 2020 at 03:41:47PM -0500, Marek Polacek wrote: > This ICEs since my patch for P0388, which allowed conversions to arrays > of unknown bound, but not the reverse, so these two static_casts are > ill-formed. > > [expr.static.cast]/3 says that "cv1 T1" and "cv2 T2" have to be >

[PATCH] c++: Fix ICE with static_cast when converting from int[] [PR93862]

2020-02-24 Thread Marek Polacek
This ICEs since my patch for P0388, which allowed conversions to arrays of unknown bound, but not the reverse, so these two static_casts are ill-formed. [expr.static.cast]/3 says that "cv1 T1" and "cv2 T2" have to be reference-compatible and the comment in build_static_cast_1 says it too but then