tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] bitfield handling


From: grischka
Subject: Re: [Tinycc-devel] bitfield handling
Date: Tue, 02 May 2017 15:56:18 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Michael Matz wrote:
I chose to adjust field layout instead of field type; the latter can cause invalid mem accesses with packed structs/fields:

Hi Michael,

May I suggest something:

It appears to me that it's the point of packed (pcc) bitfields that
all bits are fully tightly packed with no padding whatsoever, such that
they can be used for decoding bit-stream protocols or some such.

"More or less" packed isn't better than not at all in that case
because it is just not what people will expect (I suppose).

Therefor I'd suggest to revert the layout code to the point where it
actually was producing the correct layout, then comment out the
pcc:packed part and substitute by a warning "currently unsupported",
for now.

Unless you find time to teach the load/store part single-byte-wise
accesses which would be great too, of course ;)

Or someone else would be (at least) equally great.

--- grischka




reply via email to

[Prev in Thread] Current Thread [Next in Thread]