[LLVMbugs] [Bug 19305] New: bogus unused variable warning for C++1y variable templates
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 2 00:33:03 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19305
Bug ID: 19305
Summary: bogus unused variable warning for C++1y variable
templates
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++1y
Assignee: unassignedclangbugs at nondot.org
Reporter: kremenek at apple.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
This looks like a bogus -Wunused-const-variable warning:
$ cat test.cpp
#include <iostream>
template<class T>
constexpr const T pi(3.141592654);
int main(int argc, const char * argv[])
{
std::cout << pi<float> << std::endl;
return 0;
}
$ clang -std=c++1y c.cpp -Wunused-const-variable -fsyntax-only
test.cpp:4:19: warning: unused variable 'pi' [-Wunused-const-variable]
constexpr const T pi(3.141592654);
^
1 warning generated.
--
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/20140402/b0e98167/attachment.html>
More information about the llvm-bugs
mailing list