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

            Bug ID: 102524
           Summary: [modules] Missing diagnostic when an exported
                    namespace is empty
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: johelegp at gmail dot com
                CC: johelegp at gmail dot com
  Target Milestone: ---

This is specified at [module.interface].3:
> An exported declaration that is not a module-import-declaration
> shall declare at least one name.

GCC doesn't print any diagnostic (https://godbolt.org/z/oEbTjcfeo)
whereas Clang gives a warning (https://godbolt.org/z/ajszM74j9):
> `mod.cpp:2:18: warning: ISO C++20 does not permit a declaration that
> does not introduce any names to be exported [-Wexport-unnamed]`

Reply via email to