$ cat >bug.cxx

namespace N1
{
  struct S {};
}

namespace N2
{
  struct S {};
}

namespace N3
{
  using namespace N1;
  using namespace N2;
  
  using N1::S;
  
  S
  f ();
}

using namespace N1;
using namespace N2;

using N1::S;

S
f ();

$ g++-3.4 --version
g++-3.4 (GCC) 3.4.4 20050314 (prerelease) (Debian 3.4.3-12)

$ g++-3.4 -c bug.cxx
bug.cxx:27: error: `S' does not name a type

-- 
           Summary: name lookup differs between namespace-scope and global
                    scope
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: boris at kolpackov dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21174

Reply via email to