Re: egcs-1.1.2 ping bug also causes miscompilation of pcbit isdn driver

Lars Heete (hel@admin.de)
Sun, 13 Jun 1999 18:40:21 +0200


On Sun, 13 Jun 1999, Tygrys wrote
>Lars Heete wrote:
>
>> --------------------- test case ----------------------
>> #include <stdio.h>
>> int main(int argc, char **argv) {
>> struct {char c1, c2, c2, 4;} t;
>> t.c4 = 0x78; t.c3 = 0x56; t.c2 = 0x34; t.c1 = 0x12;
>> printf("0x%x\n", *((unsigned long*) &t));
>> return 0;
>> }
>>
>> gives 0x12 with egcs-1.1.2 on i386, instead of 0x78563412.
>But only when compiled with optimization...
Ok, I forgot to mention this, but who compiles the kernel without
any optimization :-)

Lars

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/