Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!samsung!zaphod.mps.ohio-state.edu!usc!apple!netcom!allanh From: allanh@netcom.UUCP (Allan N. Hessenflow) Newsgroups: comp.sys.mac.programmer Subject: MPW C 3.1 vs 3.0 Keywords: undocumented change? Message-ID: <11841@netcom.UUCP> Date: 8 May 90 18:02:43 GMT Organization: NetCom- The Bay Area's Public Access Unix System {408 249-0290 guest} Lines: 18 I recently recompiled an old program which worked fine with MPW C 3.0; it broke with MPW C 3.1. I discovered that the problem was a bug in my code which got by because of a bug in C 3.0 (at least I think it's a bug; I'm not certain how the language behavior is defined in this case). This change doesn't seem to be documented in the C 3.1 release notes. I had something like: long count; ... if (count < 0xf0000000L) { ... count should have been an 'unsigned long'. With C 3.0, if count was, say, 1, the test was true (it did an unsigned comparison for some reason), while with C 3.1 it's false. -- Allan N. Hessenflow {apple|claris}!netcom!allanh allanh@netcom.uucp