inline namespace and extension namespace
Vour reference to the standard is explicit: this is not allowed.
Using Clang++ I get the very clear error message about this:
Test0614-1.cpp:17:18: error: non-inline namespace cannot be reopened as inline
inline namespace M
^
Test0614-1.cpp:12:11: note: previous definition is here
namespace M
^
So it's definitively a bug in g++. By the way, it's reported here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53402
The fact that the compiler accepts inline namespace for previous version of the standard and without at least a warning seems to be an issue. This was already reported as bug in 2010 and should have been fixed: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43824