public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102341] New: [modules] alias-declaration and typedef-declaration conflict in module interface unit
@ 2021-09-15  9:46 redi at gcc dot gnu.org
  2021-09-15  9:52 ` [Bug c++/102341] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2021-09-15  9:46 UTC (permalink / raw)
  To: gcc-bugs

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;
      |        ^~~~~~

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-25  1:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15  9:46 [Bug c++/102341] New: [modules] alias-declaration and typedef-declaration conflict in module interface unit redi at gcc dot gnu.org
2021-09-15  9:52 ` [Bug c++/102341] " redi at gcc dot gnu.org
2021-09-15 10:34 ` redi at gcc dot gnu.org
2021-09-15 11:28 ` [Bug c++/102341] [modules] "error: conflicting exporting declaration" for anything previously declared redi at gcc dot gnu.org
2021-09-15 11:37 ` pilarlatiesa at gmail dot com
2021-09-15 11:50 ` redi at gcc dot gnu.org
2023-11-25  1:45 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).