https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89068

            Bug ID: 89068
           Summary: Nested inline anonymous namespaces are erroneously
                    reported as conflicting
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com
  Target Milestone: ---

The following valid code is rejected by g++ -std=c++XY for any XY >= 11:


inline namespace {
  inline namespace {}
}
inline namespace {}


The error message I get is:


<source>:4:8: error: 'namespace { }' conflicts with a previous declaration
 inline namespace {}
        ^~~~~~~~~
<source>:1:8: note: previous declaration 'namespace { }'
 inline namespace {
        ^~~~~~~~~
Compiler returned: 1

Reply via email to