diff options
| author | Daniel Glöckner <daniel-gl@gmx.net> | 2008-09-11 19:18:58 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2008-09-12 22:23:01 +0200 |
| commit | 3783b335084ef69447c8703c7b9a94687d80b1cb (patch) | |
| tree | 5aa4461e311f71c876e0d26818f3a8d5cda3152e /tcclib.h | |
| parent | 43a34d354a6a3b0df07ed065adb050c0dda9abaa (diff) | |
| download | tinycc-3783b335084ef69447c8703c7b9a94687d80b1cb.tar.gz tinycc-3783b335084ef69447c8703c7b9a94687d80b1cb.tar.bz2 | |
Fix bitfields with non-int types and in unions
The ISO C draft allow only signed/unsigned int and _Bool as base type
for bitfields. TinyCC ever since allowed a wider range of types, but
there were many bugs that shifted values when they shouldn't, etc..
The patch introduces a restriction to the layout of bitfields with
mixed types that makes it incompatible with GCC. In
struct {
typeA x:1;
typeB y:1;
};
y is combined with x in the same byte iff typeA is typeB (neglecting
signedness). This is done to avoid alignment issues and exceeding the
width of typeA.
Diffstat (limited to 'tcclib.h')
0 files changed, 0 insertions, 0 deletions
