https://llvm.org/bugs/show_bug.cgi?id=24123

            Bug ID: 24123
           Summary: Using declaration
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Consider the following program:

namespace N {
    extern int x;
}

int main() {
    using N::x;
    extern int x;
}

Compiling it gives the following error output (i have tried with trunk 242150):

7:16: error: declaration conflicts with target of using declaration already in
scope
    extern int x;
               ^
2:16: note: target of using declaration
    extern int x;
               ^
6:14: note: using declaration
    using N::x;
             ^

For comparison I tried it with GCC also (trunc 201507) and got no errors. I
think that is the correct behaviour, but it could be that GCC is wrong or that
this is an ambiguity in the c++ standard.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to