http://llvm.org/bugs/show_bug.cgi?id=22447
Bug ID: 22447
Summary: Bogus warning "is not needed and will not be emitted"
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Given
namespace {
struct foo {
foo(int = bar) {}
static int bar;
};
int foo::bar;
}
foo x;
clang warns: "variable 'bar' is not needed and will not be emitted"
but @_ZN12_GLOBAL__N_13foo3barE is emitted. Commenting the "int foo::bar"" also
produces the warning:
variable '(anonymous namespace)::foo::bar' has internal linkage but is not
defined
--
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