[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2024-02-11 Thread nshead at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885 Nathaniel Shead changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2024-02-11 Thread nshead at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885 Nathaniel Shead changed: What|Removed |Added Target Milestone|--- |14.0 CC|

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2023-11-23 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-09-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885 Jonathan Wakely changed: What|Removed |Added CC||redi at gcc dot gnu.org --- Comment

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-02-03 Thread nathan at gcc dot gnu.org via Gcc-bugs
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'

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-01-30 Thread pilarlatiesa at gmail dot com via Gcc-bugs
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

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-01-29 Thread nathan at gcc dot gnu.org via Gcc-bugs
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:

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-01-29 Thread pilarlatiesa at gmail dot com via Gcc-bugs
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

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-01-29 Thread nathan at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-01-29 Thread pilarlatiesa at gmail dot com via Gcc-bugs
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

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-01-29 Thread nathan at gcc dot gnu.org via Gcc-bugs
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.

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-01-29 Thread pilarlatiesa at gmail dot com via Gcc-bugs
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.

[Bug c++/98885] [modules] forward declaration of classes prevent them from being exported at the point of actual declaration

2021-01-29 Thread nathan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885 Nathan Sidwell changed: What|Removed |Added Keywords|rejects-valid |accepts-invalid