namespace std6 { int j; } namespace std = std6;
%g++ -c test.cc test.cc:7: error: conflicting declaration 'namespace std = std6;' <internal>:0: error: 'std' has a previous declaration as `namespace std { }' test.cc:7: error: declaration of `namespace std = std6;' <internal>:0: error: conflicts with previous declaration `namespace std { }' This isn't possible, with either EDG or GNU front ends at the moment. However, I would like to experiment with this. It doesn't have to be checked in. I thought I'd complained about this a long time ago, but I cannot find it in bugzilla, so, once more. -benjamin -- Summary: namespace std aliasing Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bkoz at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24604