https://bugs.llvm.org/show_bug.cgi?id=38106
Bug ID: 38106
Summary: Undefined reference error when "static const" variable
is initialized in line (but works out of line)
Product: clang
Version: 6.0
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangb...@nondot.org
Reporter: albert.szilv...@autodesk.com
CC: llvm-bugs@lists.llvm.org
The following code demonstrates the issue.
#include <iostream>
class Foo
{
public:
const static long long foo = 5;
const long long* x = &foo;
};
//const long long Foo::foo = 5; // uncomment this and remove the initialization
in the class to make it link.
int main(int argc, const char * argv[]) {
Foo foo;
std::cout << *(foo.x) << std::endl;
return 0;
}
Similar to https://bugs.llvm.org/show_bug.cgi?id=26006
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs