On Tue, Jul 21, 2026 at 08:34:09PM +0200, Arsen Arsenović wrote:
> Checks-and-uses of TREE_CODEs would also need to become (explicit)
> fallible conversion functions, i.e.
> 
>   if (TREE_CODE (t) == A) use t;
> 
> ... becomes:
> 
>   if (auto tA = try_as_tree_or_whatever<A> (t)) use tA;
> 
> ... or such.  (I'd have preferred if the 'tA' could shadow 't', but
> unfortunately if it were to shadow 't' in the then branch, it'd also
> have to shadow it - a lot less usefully - in the else branch; that's not
> an issue in this trivial example but is in general)

I'm sorry, but this is not an improvement, it is an exact opposite of that.

        Jakub

Reply via email to