[LLVMbugs] [Bug 16119] New: Add a warning for incomplete bitfields
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu May 23 01:23:43 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16119
Bug ID: 16119
Summary: Add a warning for incomplete bitfields
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: gjasny at googlemail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Hello,
it would be great if clang could issue a warning when it detects structs with
incomplete bitfields. For example:
struct msg
{
uint8_t parameterA:1;
uint8_t reserved:1; // must be zero
};
Here the intention is to always set reserved to zero to be able to add some
more parameters later. But reserved only covers one from the remaining 7 bits.
Maybe clang could warn about incompletely filled bitfields?
Thanks,
Gregor
--
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/20130523/baab0f6d/attachment.html>
More information about the llvm-bugs
mailing list