https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
Nathaniel Shead changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
Nathaniel Shead changed:
What|Removed |Added
Target Milestone|--- |14.0
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #11 from CVS Commits ---
The master branch has been updated by Nathaniel Shead :
https://gcc.gnu.org/g:d89903ff29473e6e64f032ecee5c72d1584546dc
commit r14-5808-gd89903ff29473e6e64f032ecee5c72d1584546dc
Author: Nathaniel Shead
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
Jonathan Wakely changed:
What|Removed |Added
CC||redi at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #9 from Nathan Sidwell ---
This is highlighting a missing diagnostic on:
export module A;
class A; // forward declaration
export class A {}; // <-- here, cannot add 'export'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #8 from Pilar Latiesa ---
(In reply to Nathan Sidwell from comment #7)
That works. Thanks so much.
When there are several partitions involved it is not entirely clear to me what
declarations are first seen by the compiler compared
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #7 from Nathan Sidwell ---
My mistake. interface and implementation partitions do not follow the
non-partition behaviour. You have two M:A partitions (one an interface and one
an implementation). This is what you want:
A.cc:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #6 from Pilar Latiesa ---
(In reply to Nathan Sidwell from comment #5)
> your A-impl.cpp needs `import :B` and vice-versa
Yep. Thanks. But that's not enough for it to compile:
A-impl.cpp:7:17: error: invalid use of incomplete type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #5 from Nathan Sidwell ---
your A-impl.cpp needs `import :B` and vice-versa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #4 from Pilar Latiesa ---
I tried:
$ cat M.cpp
export module M;
export import :A;
export import :B;
$ cat A.cpp
export module M:A;
export class B;
export
class A
{
void
f(B const &) const;
};
$ cat B.cpp
export module
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #3 from Nathan Sidwell ---
module partitions are probably what you want for such mutually dependent types.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #2 from Pilar Latiesa ---
(In reply to Nathan Sidwell from comment #1)
> This is ill-formed. an exported entity must be so-declared on its first
> declaration.
>
> A diagnostic is missing on the definition of the class.
I see.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
Nathan Sidwell changed:
What|Removed |Added
Keywords|rejects-valid |accepts-invalid
13 matches
Mail list logo