[cfe-dev] default alignment?
clattner at apple.com
Mon Jan 17 09:20:48 PST 2011
On Jan 17, 2011, at 1:28 AM, Eric Niebler wrote:
> In Sema::ActOnPragmaPack, I see this:
> // FIXME: This should come from the target.
> if (AlignmentVal == 0)
> AlignmentVal = 8;
> So, what's the right fix? Should this be
> (Context.Target.getDoubleAlign() / Context.Target.getCharWidth())? (And
> why 8? Where does that come from?)
I'm not familiar with #pragma pack show, but the 8 here is in bits. The right fix is probably to call Context.Target.getCharWidth().
More information about the cfe-dev