https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102341
Bug ID: 102341 Summary: [modules] alias-declaration and typedef-declaration conflict in module interface unit Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- export module test; namespace Test { typedef long Long; } namespace Test { export using Long = long; } I think this is valid, and it is accepted by 'clang++ -std=c++20' and by 'cl.exe /std:c++20 /experimental:module /interface' but is rejected by G++: $ g++ -std=c++20 -fmodules-ts -fmodule-only mod.cc mod.cc:10:27: error: conflicting exporting declaration 'using Long = long int' 10 | export using Long = long; | ^ mod.cc:5:16: note: previous declaration 'typedef long int Test::Long' here 5 | typedef long Long; | ^~~~ mod.cc:1:8: warning: not writing module 'test' due to errors 1 | export module test; | ^~~~~~