https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81448
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- To me it seems the warning is doing what it should here, simply wrapping the body of the for loop into {} should fix it.