Explain this sscanf behavior.
Nick Mason
mason at tc.fluke.COM
Tue Jul 10 01:20:08 AEST 1990
In article <376 at demott.COM> kdq at demott.COM (Kevin D. Quitt) writes:
>In article <1990Jul6.181830.2549 at tc.fluke.COM> mason at tc.fluke.COM (Nick Mason) writes:
>>
>>I tried this with 3 different compilers and got the following:
>>
>>compiler A:
>>
>> x=1 a=123 b=3
>> x=1 a=123 b=3
>>
>>compiler B:
>>
>> x=1 a=123 b=3
>> x=1 a=123 b=4 <-- yes 4.
>>
>>compiler C:
>>
>> x=1 a=123 b=3
>> x=1 a=123 b= -99
>>
>
> I'm confused by example C: where did it get the old value of b? BTW,
>Microsoft C and cc on Motorola Delta 3x00 agree with A, and gnu's gcc
>coredumps.
>
What version of Microsoft C did you use and what memory model??
Compiler A is SUN 4.0 cc,
Compiler B is MSC 5.1 large model,
Compiler C is MSC 6.0 large model.
And I agree, gnu's gcc coredumps.
Nick.
More information about the Comp.std.c
mailing list