https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90291
Bug ID: 90291 Summary: [7/8 Regression] Inline namespace erroneously extends another namespace Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: igusarov at mail dot ru Target Milestone: --- Compilation of the following code with gcc 7.x and 8.x produces different results: inline namespace A { inline namesapce B // (1) { void foo() {} } } inline namespace B // (2) { inline namesapce A { void foo() {} } } If compiled with "gcc-7.4 -std=c++11 -c", the object file contains functions A::B::foo() B::A::foo() which I believe is correct. However, if the same source is compiled with "gcc-8.3 -std=c++11 -c", the object file contains functions A::B::foo() A::B::A::foo() which I believe is wrong. It looks like gcc 8.x assumes that the namespace at line (2) doesn't start a new top-level namespace, but extends the namespace defined at line (1).