[LLVMbugs] [Bug 24123] New: Using declaration

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 14 15:47:03 PDT 2015


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: unassignedclangbugs at nondot.org
          Reporter: anders.granlund.0 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150714/391c9b5b/attachment.html>


More information about the llvm-bugs mailing list