Re: Incorrect casting?

2010-03-10 Thread Richard Guenther
2010/3/9 Marcin Baczyński marb...@gmail.com: Hi, the following piece of code produces different output on svn trunk and gcc-4_4-branch: #include stdio.h int main() {        struct { unsigned bar:1; } foo;        foo.bar = 0x1;        printf(%08x\n, (unsigned char)(foo.bar * 0xfe));    

Incorrect casting?

2010-03-09 Thread Marcin Baczyński
Hi, the following piece of code produces different output on svn trunk and gcc-4_4-branch: #include stdio.h int main() { struct { unsigned bar:1; } foo; foo.bar = 0x1; printf(%08x\n, (unsigned char)(foo.bar * 0xfe)); printf(%08x\n, (unsigned char)(foo.bar *