[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] bitfield handling
From: |
Vicente Bergas |
Subject: |
[Tinycc-devel] bitfield handling |
Date: |
Fri, 28 Apr 2017 23:26:27 +0200 |
Hello,
as stated in the TODO file bitfields are buggy.
For example the following does not work:
struct{short x:12; char y:1;}s; s.y=1;
The attached patch improves bitfield handling.
With it the previous example gets fixed.
There are still corner cases which are still failing, like:
struct{int x:31; char y:2;}s; s.y=1;
in which the char overflows the 32-bit type.
Feel free to apply it to tcc.
Regards,
Vicente.
Improve-bitfield-handling.patch
Description: Text Data
- [Tinycc-devel] bitfield handling,
Vicente Bergas <=