tinycc-devel
[Top][All Lists]
Advanced

[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.

Attachment: Improve-bitfield-handling.patch
Description: Text Data


reply via email to

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