🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1488

Re: Explain this sscanf behavior.

#1488
From: Nick Mason
Date: Mon, 09 Jul 1990 15:20
34 lines
1254 bytes
In article <376@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes:
>In article <1990Jul6.181830.2549@tc.fluke.COM> mason@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.
Technical Details
Message-ID: <1990Jul9.152008.3288@tc.fluke.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!samsung!cs.utexas.edu!mailrus!cornell!uw-beaver!fluke!mason
References: <1990Jul6.181830.2549@tc.fluke.COM> <376@demott.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!samsung!cs.utexas.edu!mailrus!cornell!uw-beaver!fluke!mason
From: mason@tc.fluke.COM (Nick Mason)
Newsgroups: comp.std.c
Subject: Re: Explain this sscanf behavior.
Keywords: sscanf ANSI
Message-ID: <1990Jul9.152008.3288@tc.fluke.COM>
Date: 9 Jul 90 15:20:08 GMT
References: <1990Jul6.181830.2549@tc.fluke.COM> <376@demott.COM>
Organization: John Fluke Mfg. Co., Inc., Everett, WA
Lines: 34