https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61512 --- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- You are not allowed to call ++ on an iterator if calling * on it would be illegal.