Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ptsfa!ihnp4!occrsh!uokmax!rmtodd From: rmtodd@uokmax.UUCP (Richard Michael Todd) Newsgroups: comp.os.minix Subject: bug in Minix C compiler Message-ID: <615@uokmax.UUCP> Date: Fri, 3-Jul-87 20:04:45 EDT Article-I.D.: uokmax.615 Posted: Fri Jul 3 20:04:45 1987 Date-Received: Sat, 4-Jul-87 19:52:49 EDT References: <614@uokmax.UUCP> Reply-To: rmtodd@uokmax.UUCP (Richard Michael Todd) Organization: University of Oklahoma, Norman Lines: 17 When porting John Gilmore's PD tar to MINIX, I discovered an incompatibility between MINIX's C compiler and others. The code contained numerous constructs of this form: struct stat statbuf[1]; ... size = statbuf->st_size; The MINIX C compiler objects violently, saying "error: -> applied to array". Aztec C gives warnings but creates correct code output. UNIX C compilers obviously see nothing wrong with this, and my reading of K&R is that there is nothing wrong with this construct -- whenever array names appear they are converted to pointers, and -> is a valid operation on a pointer to a structure. ___________________________________________________________________________ Richard Todd USSnail:820 Annie Court,Norman OK 73069 UUCP: {allegra!cbosgd|ihnp4}!okstate!uokmax!rmtodd