On Apr 17, 2007, at 11:15 PM, Duncan Sands wrote:
Hi Devang,
if
(StartOffsetInBits FirstUnallocatedByte*8)
is true then
(StartOffsetFromByteBoundry == 0)
is always true. If so, we could simply this even further. In other
words, if we need pad bytes for a new field
Hi Devang,
yes, this need not be true in Ada, where bitfields can be placed
wherever you like,
Is it true for very first bitfield also ?
yes, it is true for all bitfields including the first.
for example
type Second_Bitfield_Not_At_Bitoffset_Zero is record
A : Character;
Hi Devang,
if
(StartOffsetInBits FirstUnallocatedByte*8)
is true then
(StartOffsetFromByteBoundry == 0)
is always true. If so, we could simply this even further. In other
words, if we need pad bytes for a new field then it always starts at
byte boundary. Can
Revision: 126245
Author: dpatel
Date: 2007-04-17 13:29:12 -0700 (Tue, 17 Apr 2007)
Log Message:
---
Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047943.html
Modified Paths:
--
apple-local/branches/llvm/gcc/llvm-types.cpp
Modified:
Hi Devang, I just posted a fix which fixes some other issues too.
A few lines earlier:
if (StartOffsetFromByteBoundry != 0) {
// New field does not start at byte boundry.
PadBits = StartOffsetInBits - (FirstUnallocatedByte*8);
PadBytes = PadBits/8 + 1;
}
PadBytes +=
Hi,
if
(StartOffsetInBits FirstUnallocatedByte*8)
is true then
(StartOffsetFromByteBoundry == 0)
is always true. If so, we could simply this even further. In other
words, if we need pad bytes for a new field then it always starts at
byte boundary. Can you think of