On Mon, May 21, 2018 at 7:34 PM, Marek Polacek <pola...@redhat.com> wrote:
> The previous version of this patch got confused by
>
>   for (int i = 0; n > 0 ? true : false; i++)
>     // ...
>
> because even though we see a ; followed by a :, it's not a range-based for 
> with
> an initializer.  I find it very strange that this didn't show up during the
> regtest.
>
> To fix this, I had to uglify range_based_for_with_init_p to also check for a 
> ?.
> Yuck.

Perhaps cp_parser_skip_to_closing_parenthesis_1 should handle balanced
?: like ()/[]/{}.

Jason

Reply via email to