[LLVMbugs] [Bug 15362] New: clang++ incorrectly accepts "typename" in "using-declaration" without a nested-name-specifier

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Feb 26 06:06:51 PST 2013


            Bug ID: 15362
           Summary: clang++ incorrectly accepts "typename" in
                    "using-declaration" without a nested-name-specifier
           Product: clang
           Version: 3.1
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dinesh at dinsoft.net
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

According to the C++11 standard, the production of the rule using-declaration

 using typename[opt] nested-name-specifier unqualified-id ;
 using :: unqualified-id ;

But it seems that clang (3.1 at least) accepts also this syntax:

 using typename :: unqualified-id ;

Which is not part of the standard.

The following little code illustrates this:

typedef int T;
namespace foo {
  int T;
  namespace bar {
    using typename ::T; // < this should be rejected because of the presence of
    T a;

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/20130226/14945d76/attachment.html>

More information about the llvm-bugs mailing list