https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87971
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- It's also accepted without using nested namespace definitions, and that's intentional. namespace one { inline namespace two {} } namespace one { namespace two {} }