[LLVMbugs] [Bug 22447] New: Bogus warning "is not needed and will not be emitted"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Feb 3 11:55:00 PST 2015


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: unassignedclangbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150203/b310ce2f/attachment.html>


More information about the llvm-bugs mailing list