Article View: comp.sys.acorn.tech
Article #458Re: Bug found in v4 of Acorn C compiler
From: Richard Earnshaw
Date: Thu, 01 Oct 1992 09:35
Date: Thu, 01 Oct 1992 09:35
18 lines
1210 bytes
1210 bytes
> value = ( ( ( ( WORD ) fgetByte() ) << 8 ) | fgetByte() ); > The variable 'value' appeared to be getting the two bytes around the wrong > way... There is *nothing* in the C specification which defines the order in which the calls to fgetByte() should be executed; indead the specification says quite explicitly that such behaviour is *Implementation dependent*. This is Not a bug: if you wish to enforce a specific order you must code the calls as seperate statements. Richard ----------------------------------------------------------------------- Richard Earnshaw University of Cambridge Computer Laboratory Pembroke Street Cambridge CB2 3QG +44 223 334650
Technical Details
Message-ID:
<1992Oct1.093532.14643@infodev.cam.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!pavo.csi.cam.ac.uk!cl.cam.ac.uk!rwe11References:
<1992Oct1.033932.22482@cs.aukuni.ac.nz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!pavo.csi.cam.ac.uk!cl.cam.ac.uk!rwe11 From: rwe11@cl.cam.ac.uk (Richard Earnshaw) Newsgroups: comp.sys.acorn.tech Subject: Re: Bug found in v4 of Acorn C compiler Message-ID: <1992Oct1.093532.14643@infodev.cam.ac.uk> Date: 1 Oct 92 09:35:32 GMT References: <1992Oct1.033932.22482@cs.aukuni.ac.nz> Sender: news@infodev.cam.ac.uk (USENET news) Reply-To: rwe11@cl.cam.ac.uk (Richard Earnshaw) Organization: U of Cambridge, England Lines: 18 Nntp-Posting-Host: viking.cl.cam.ac.uk