[Bug c++/97569] Declaring a struct in a field declaration of another struct. gcc and clang difference.

2020-10-28 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97569 Anders Granlund changed: What|Removed |Added Resolution|--- |INVALID

[Bug c++/97569] Declaring a struct in a field declaration of another struct. gcc and clang difference.

2020-10-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97569 --- Comment #3 from Jonathan Wakely --- Ah right, so int main() { struct A { struct B *b; struct C {} *c; }; using U = B; using V = C; } For the `struct C {}` case that explicitly defines

[Bug c++/97569] Declaring a struct in a field declaration of another struct. gcc and clang difference.

2020-10-25 Thread anders.granlund.0 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97569 --- Comment #2 from Anders Granlund --- (In reply to Jonathan Wakely from comment #1) > (In reply to Anders Granlund from comment #0) > > The interesting thing is that if we replace struct S with struct S {} > > both compilers agree on

[Bug c++/97569] Declaring a struct in a field declaration of another struct. gcc and clang difference.

2020-10-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97569 --- Comment #1 from Jonathan Wakely --- (In reply to Anders Granlund from comment #0) > The interesting thing is that if we replace struct S with struct S {} > both compilers agree on rejecting the program. I don't see any struct S in the