[llvm-bugs] [Bug 25545] New: Bad diagnostic with -Wpacked

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 16 11:51:11 PST 2015


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

            Bug ID: 25545
           Summary: Bad diagnostic with -Wpacked
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eyal.lotem at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

struct a {
    struct b {
        short x;
        int y;
    } __attribute__((packed)) data;
};

/*
clang -Wpacked -o warnings.o -c warnings.c
warnings.c:3:13: warning: packed attribute is unnecessary for 'x' [-Wpacked]
        short x;
              ^
1 warning generated.
*/

clang --version:
Ubuntu clang version 3.7.0-svn251177-1~exp1 (branches/release_37) (based on
LLVM 3.7.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

This does not reproduce for me if I do not use a nested struct.

-- 
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/20151116/e37c5b7d/attachment.html>


More information about the llvm-bugs mailing list