[LLVMbugs] [Bug 15736] New: variable with constant initializer is dependent

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 12 07:59:03 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15736

            Bug ID: 15736
           Summary: variable with constant initializer is dependent
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vanyacpp at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Variable with constant initializer is considered dependent currently. That is
why clang do not print error on the following code:

template <int N>
struct x
{
    static const int M = 10;

    typedef typename x<M>::asdf mytype2;
};

GCC understand that M is not dependent and print error message:

12.cpp:6:28: error: 'asdf' in 'struct x<10>' does not name a type

-- 
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/20130412/4545d642/attachment.html>


More information about the llvm-bugs mailing list