[LLVMbugs] [Bug 24030] New: Class declaration in the same declarative region as using declaration - Missing diagnostic message

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jul 4 18:14:44 PDT 2015


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

            Bug ID: 24030
           Summary: Class declaration in the same declarative region as
                    using declaration - Missing diagnostic message
           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

The following program should give a diagnostic message when trying to compile
it.

namespace X { class A; }

namespace Y { using X::A; class A {}; }

int main() {}

This is because it violates [basic.scope.declarative]/4 in the c++ standard:

  http://eel.is/c++draft/basic.scope.declarative#4

The diagnostic message is missing. MSVS gives a diagnostic message for this
program, but clang does not.

Stack overflow post confirming the bug:

 
http://stackoverflow.com/questions/31220154/class-declaration-in-same-scope-as-using-declaration-compiles-in-gcc-but-not-msv

-- 
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/20150705/4d3e2a63/attachment.html>


More information about the llvm-bugs mailing list