Explain this sscanf behavior.

Kevin D. Quitt kdq at demott.COM
Sun Jul 8 04:31:19 AEST 1990


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. 

-- 
 _
Kevin D. Quitt         demott!kdq   kdq at demott.com
DeMott Electronics Co. 14707 Keswick St.   Van Nuys, CA 91405-1266
VOICE (818) 988-4975   FAX (818) 997-1190  MODEM (818) 997-4496 PEP last

                96.37% of all statistics are made up.



More information about the Comp.lang.c mailing list