[Bug c++/91826] New: Unexpected behavior when class defined with namespace alias

2019-09-19 Thread mf at simerics dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mf at simerics dot com Target Milestone: --- The following code compile on GCC 7.3, MSVC 2015 & 2019. It fail on GCC 9.2 with error: declaration of ‘class N2::N::C2’ in namespace ‘N2’ w

[Bug c++/91826] Unexpected behavior when class defined with namespace alias

2019-09-20 Thread mf at simerics dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91826 --- Comment #1 from Michał --- Previous code compiles fine with clang, but failed with gcc 8.x. I check similar code that is invalid and should fail with this error: namespace N1 { namespace N { class C; } } namespace N2 { namespace A = N1: