sparse ignores __attribute__((packed))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

The test program below compiles fine with gcc 4.5.0 but triggers a
build error with sparse (git repository last updated on July 11). This
seems like a sparse bug to me. Is this a known issue ?

#define BUILD_BUG_ON(e) (void)(sizeof(struct { int:-!!(e); }))

struct s {
    char c;
    int i;
} __attribute__((packed));

int main(int argc, char** argv)
{
    BUILD_BUG_ON(sizeof(struct s) != sizeof(char) + sizeof(int));
    return 0;
}

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux