Re: [PATCH] c++: global-namespace-qualified var after class def [PR90107]

2022-04-27 Thread Jason Merrill via Gcc-patches
On 4/27/22 18:45, Marek Polacek wrote: Here we wrongly reject the definition of "::N::a" struct A; namespace N { extern A a; } struct A {} ::N::a; because our code to diagnose a missing ; after a class definition doesn't realize that :: can follow a class definition. Bootstrapped/regt

[PATCH] c++: global-namespace-qualified var after class def [PR90107]

2022-04-27 Thread Marek Polacek via Gcc-patches
Here we wrongly reject the definition of "::N::a" struct A; namespace N { extern A a; } struct A {} ::N::a; because our code to diagnose a missing ; after a class definition doesn't realize that :: can follow a class definition. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/1