lkml.org 
[lkml]   [1999]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: egcs-1.1.2 ping bug also causes miscompilation of pcbit isdn driver
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.181 / U:0.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site