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

            Bug ID: 99468
           Summary: [modules] awkward diagnostic for named-module inside
                    header unit
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

We correctly reject a module-declaration appearing in a header-unit
compilation.  But the diagnostic is ... poor

./cc1plus -std=c++20 -fmodule-header -quiet constrained-partial-1_a.C
constrained-partial-1_a.C:3:8: error: module already declared
    3 | export module M;
      |        ^~~~~~
constrained-partial-1_a.C:3:8: note: module 'M' declared here

Reply via email to