[LLVMbugs] [Bug 22602] New: Bogus unused function warning for aliased symbol

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 16 06:09:25 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22602

            Bug ID: 22602
           Summary: Bogus unused function warning for aliased symbol
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: torne at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Function aliases don't appear to count as uses for the purposes of
-Wunused-function. The output binary is correct, only the warning is wrong.

alias.c:
  static void foo() {}
  void bar() __attribute__((alias("foo")));

$ clang -c -Wunused-function alias.c
/home/torne/alias.c:1:13: warning: unused function 'foo'
      [-Wunused-function]
static void foo() {}
            ^
1 warning generated.

$ clang --version
clang version 3.5 
Target: x86_64-pc-linux-gnu
Thread model: posix

-- 
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/20150216/a01bebd5/attachment.html>


More information about the llvm-bugs mailing list