Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pur-ee.UUCP Path: utzoo!linus!decvax!genrad!grkermit!masscomp!clyde!floyd!harpo!ihnp4!inuxc!pur-ee!iuvax!apratt From: apratt@iuvax.UUCP Newsgroups: net.micro.pc Subject: Lattice CXERRs - (nf) Message-ID: <1362@pur-ee.UUCP> Date: Wed, 11-Jan-84 22:40:02 EST Article-I.D.: pur-ee.1362 Posted: Wed Jan 11 22:40:02 1984 Date-Received: Fri, 13-Jan-84 05:39:12 EST Sender: notes@pur-ee.UUCP Organization: Electrical Engineering Department , Purdue University Lines: 27 #N:iuvax:1500005:000:805 iuvax!apratt Jan 11 17:12:00 1984 Lattice C has a compiler error which I intend to report: certain errors with the conditional operator are not trapped and result in CXERR:18 (I think 18 is right). The following code will cause the error: main() { int c; c = 1 + (2 ? 1 : ); } (note the blank field following the :). Clearly this is a badly-formed expression, but the fact that it generates a CXERR is (by definition) a compiler error. Another strange item: using the constant 0 caused a CXERR in the second pass (of an entirely different program), while substituting a variable (initialized to zero) compiled properly. Has anyone else had this problem? I haven't studied it thoroughly enough to report on it yet. Your friendly neighborhood compiler watchdog... -- Allan Pratt ...ihnp4!inuxc!iuvax!apratt