This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/26448] New: unnecessary namespace-alias ambiguity


namespace lib1
{
    namespace part
    {
        typedef int result;
    }
}

namespace lib2
{
    namespace part = lib1::part;
}

using namespace lib1;
using namespace lib2;

int main()
{
    part::result val = 0;
    return val;
}

The above code results in a compilation error,  "error: `part' has not been
declared", but should it really? I can't say the parts of the C++ standard I've
read has been clear on the point, but it seems reasonable that the compiler
should recognize that "part" is not ambiguous in this case.


-- 
           Summary: unnecessary namespace-alias ambiguity
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: emilp at mac dot com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]