Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!tut.cis.ohio-state.edu!rutgers!sunybcs!boulder!pratt From: pratt@boulder.Colorado.EDU (Jonathan Pratt) Newsgroups: comp.sys.mac.programmer Subject: Re: serious code generation bug in Lightspeed C Summary: It has been documented!!! Message-ID: <5838@boulder.Colorado.EDU> Date: 15 Jan 89 18:47:41 GMT References: <6275@hoptoad.uucp> <1676@helios.ee.lbl.gov> <6315@hoptoad.uucp> Sender: news@boulder.Colorado.EDU Reply-To: pratt@boulder.Colorado.EDU (Jonathan Pratt) Organization: University of Colorado, Boulder Lines: 36 In article <6315@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >OK, I stand corrected. The evaluation order is undefined. Thanks to >those who pointed this out, and particularly to those who pointed out >what a weird and frustrating problem it is regardless. ... >It is silly to say that this is a well documented problem. I've read >three drafts of Inside Mac, starting with the loose-leaf binder edition >unfathomable aeons ago, and that an assignment could require locking >has never been explicitly mentioned. Dennis Cohen claims that it was >mentioned in a comment in one of the earliest programming examples on >the Mac. This is not documentation, this is source code, and I hope >Apple doesn't become as bad as Sun at understanding the difference. >This is not a documented problem at all, much less well documented. As I struggle to avoid turning on the flame thrower... From the ancient (10/9/84) promotional edition of IM (the phone book) memory management chapter, page 11: The Pascal compiler frequently dereferences handles during its normal operation. You should take care to write code that will not require the compiler to deference [sic] handles in the following cases: - Use of the WITH statement with a handle, such as WITH aHandle^^ DO ... - Assigning the result of a function that can move or purge blocks to a field in a record referred to by a handle, such as aHandle^^.field := NewHandle(..) And so on. The last example is the most relevant - *well documented*. Jonathan pratt@boulder.colorado.edu