Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!stanford.edu!msi.umn.edu!cs.umn.edu!mmm.serc.3m.com!news From: manning@halley.tmc.edu (Arthur T. Manning) Newsgroups: comp.os.os9 Subject: inconsistent *** illegal type combination *** error Message-ID: <1991Jun18.123455.12845@mmm.serc.3m.com> Date: 18 Jun 91 12:34:55 GMT Organization: Minnesota Mining & Manufacturing Lines: 46 cc68 doesn't behave consistently with types. It will complain about it in certain cases, but not in others due to nothing other than THE ORDER OF OPERANDS. cc68 is not comutative with == . try this code: /**************************************************************************/ /* test for bad type combination */ #include foo() { FILE *fptr; fptr=fopen("badtype.c","r"); if ( fptr == NULL ) /* no complaint here! */ printf("couldn't open\n"); if ( NULL == fptr ) /* cc68 complains about this line */ printf("couldn't open\n"); } /* cc68 output: % cc68 -r badtype.c 'badtype.c' cpp: c68: "badtype.c", line 15: **** illegal type combination **** if ( 0 == fptr ) ^ errors in compilation : 1 % ****************************************************************************/ QED. -- Arthur T. Manning 3M Center 518-1 St Paul MN 55144-1000 \___/______ ph. 612 733-4401 fax 612 736-3122 __ / _ _ _ \ Allin1--> (_/_/_/ / / /_/ <><