https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69549
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Thiago Macieira from comment #5) > BTW, Clang solved this by making __seg_fs, __seg_gs macros that resolve to > __attribute__: .... > That way, they don't need to be deduced as qualifiers in C, like const, > volatile and _Atomic. You still need to handle the attribute like qualifiers .... > So this compiles with Clang in C++: > > void *tid() { auto tib = (void * __seg_fs*)(0); return *tid; } The above is not the reason why namespaces are not handled in GCC's C++ front-end. The reason why they are not handled in C++ is because you need to handle them in overloads and templates correctly. Does clang handle those correctly or does it ignore that issue?