This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/87971] New: gcc allows nested namespace definition of inline namespaces


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

            Bug ID: 87971
           Summary: gcc allows nested namespace definition of inline
                    namespaces
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: blitzrakete at gmail dot com
  Target Milestone: ---

gcc allows the following code with -std=c++17 without any warnings or errors
even with -Wall -Wextra -pedantic -pedantic-errors.

namespace one {
  inline namespace two {}
}

namespace one::two {} // ill-formed

two is an inline namespace, so it should be specified as such.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]