http://llvm.org/bugs/show_bug.cgi?id=8095
Summary: -Wglobal-constructors false positive
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
The following example gives a warning when -Wglobal-constructors is enabled:
struct Foo {
int x;
Foo(int x1) : x(x1) {}
};
void bar() {
static Foo a(0);
}
---
clang++ output:
a.cpp:8:13: warning: declaration requires a global constructor
[-Wglobal-constructors]
static Foo a(0);
^~~
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs