https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87155
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes but it would conflict with n1::n2::bob because n2 is an inline namespace. It seems like the diagnostic is misleading, it suggests n1::bob conflicts with itself, but actually it conflicts with n1::n2::bob: namespace n1 { namespace bob {} inline namespace n2 { namespace bob {} } namespace bob {} } anon.cc:8:15: error: 'namespace n1::bob { }' conflicts with a previous declaration 8 | namespace bob {} | ^~~ anon.cc:2:15: note: previous declaration 'namespace n1::bob { }' 2 | namespace bob {} | ^~~