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 * 0xff)); return 0; } monst...@yggdrasil /data/tmp $ gcc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc-svn/configure --enable-stage1-languages-c --enable-languages=c,c++ Thread model: posix gcc version 4.4.4 20100309 (prerelease) (GCC) monst...@yggdrasil /data/tmp $ ./a.out 000000fe 00000001 monst...@yggdrasil /data/tmp $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-svn/configure --enable-stage1-languages-c --enable-languages=c,c++ Thread model: posix gcc version 4.5.0 20100309 (experimental) (GCC) monst...@yggdrasil /data/tmp $ ./a.out 000000fe 000000ff Is there something illegal in this code or is it a bug somewhere? Thanks, Marcin