Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site tellab3.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!tellab1!tellab3!steve From: steve@tellab3.UUCP (Steve Harpster) Newsgroups: net.micro.pc Subject: Xenix C Bug Message-ID: <268@tellab3.UUCP> Date: Fri, 14-Jun-85 14:21:34 EDT Article-I.D.: tellab3.268 Posted: Fri Jun 14 14:21:34 1985 Date-Received: Sat, 15-Jun-85 09:21:51 EDT Reply-To: steve@tellab3.UUCP (& Harpster) Organization: Tellabs, Inc., Lisle, IL Lines: 33 This was found by someone else here: The C compiler under Xenix 286 (for the PC/AT) gets confused about substrings in expressions. It generates an assertion error in emit.c and dies. The original code looked like: int a; char *x, tmp[30]; a = (int) (&tmp[30] - x); The fix was to use temporary variables: int a; char *x, *y, tmp[30]; y = &tmp[30]; a = (int) (y - x); The reason I'm mentioning this is because the assertion error message doesn't tell you where the problem is. Emit.c is a routine used by the compiler which doesn't help when you don't have source. I hope this saves somebody some time. -- ...ihnp4!tellab1!steve Steve Harpster Tellabs, Inc.