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
> reference-compatible and the comment in build_static_cast_1 says it too
> but then we actually use reference_related_p...  Fixed thus.
> 
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
> 
> 2020-02-24  Marek Polacek  <pola...@redhat.com>
> 
>       PR c++/93862 - ICE with static_cast when converting from int[].
>       * call.c (reference_compatible_p): No longer static.
>       * cp-tree.h (reference_compatible_p): Declare.
>       * typeck.c (build_static_cast_1): Use reference_compatible_p instead
>       if reference_related_p.

(Consider this typo fixed.)

Marek

Reply via email to