Re: [Tinycc-devel] Issues with default-initialization of bitfields

2020-09-18 Thread Herman ten Brugge via Tinycc-devel
On 2020-09-04 23:07, Petr Skocik wrote: Hi. I don't know if this is known, but tinycc seems to have some issues zero-initializing bitfields. I just committed a patch to mob to fix this.     Herman ___ Tinycc-devel mailing list Tinycc-devel@nongnu.o

Re: [Tinycc-devel] Issues with default-initialization of bitfields

2020-09-04 Thread Christian Jullien
-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Petr Skocik Sent: Friday, September 04, 2020 23:07 To: tinycc-devel@nongnu.org Subject: [Tinycc-devel] Issues with default-initialization of bitfields Hi. I don't know if this is known, but tinycc seems to have some

[Tinycc-devel] Issues with default-initialization of bitfields

2020-09-04 Thread Petr Skocik
Hi. I don't know if this is known, but tinycc seems to have some issues zero-initializing bitfields. Here's an example program: #include #include #include typedef struct TYPE TYPE; struct TYPE { uint32_t bit:1,bits7:7,bits24:24; int32_t upper; }; int main() {     TYPE x = (TYPE){.bit=1};