https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104636
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- If you have something in between {}s it will be an error, not a pedwarn (pedwarn will emit a warning with -Wpedantic and error with -pedantic-errors). I believe the reason why it is a pedwarn in the {} case is mentioned in https://gcc.gnu.org/pipermail/gcc-patches/2015-October/432285.html that the C++ standard kept changing on what actually is valid and what is not and therefore it was kept as a pedantic diagnostics only.