[llvm-bugs] [Bug 43482] New: warning: unused variable - for __attribute__(cleanup(...))

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 27 08:49:36 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43482

            Bug ID: 43482
           Summary: warning: unused variable - for
                    __attribute__(cleanup(...))
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jan.kratochvil at redhat.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

static void cleanup(int *p) {}
int main(void) {
  __attribute__((cleanup(cleanup))) int var;
}

cleanup.c:3:41: warning: unused variable 'var' [-Wunused-variable]

gcc-9.2.1-1.fc30.x86_64 does not produce the warning.

Bugreport by: David Gilbert

FAIL: b259e7b6488208d11aee8a4b116d90a8914e115b = 2019-09-27
FAIL: clang-8.0.0-1.fc30.x86_64

-- 
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/20190927/9632bb71/attachment.html>


More information about the llvm-bugs mailing list