On Fri, 8 Nov 2024, Marek Polacek wrote:

> OK, I've reworded the comment to
> 
>       /* The call above already performed convert_lvalue_to_rvalue, but
>          if it parsed an expression, read_p was false.  Make sure we mark
>          the expression as read.  */
>  
> though it's questionable whether it's useful at all.
> 
> > I think there's another case of invalid code it would be good to add tests 
> > for.  You have tests in c2y-if-decls-6.c of valid code with a VLA in in 
> > if/switch declaration.  It would be good to test also the invalid case 
> > where there is a jump into the scope of such an identifier with VM type 
> > (whether with goto, or with an outer switch around an if statement with 
> > such a declaration), to verify that the checks for this do work in both 
> > the declaration and the simple-declaration cases of if and switch.
> 
> OK, I've extended c2y-if-decls-7.c to cover those cases as well.  Otherwise
> no changes.

This version is OK.

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to