Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!m2c!wpi!lfoard From: lfoard@wpi.wpi.edu (Lawrence C Foard) Newsgroups: comp.lang.c Subject: Re: AT&T C compilers Message-ID: <1187@wpi.wpi.edu> Date: 4 Mar 89 07:43:42 GMT References: <569@marob.MASA.COM> <1071@auspex.UUCP> <1109@wpi.wpi.edu> <9761@smoke.BRL.MIL> Reply-To: lfoard@wpi.wpi.edu (Lawrence C Foard) Organization: Worcester Polytechnic Institute, Worcester, MA. USA Lines: 36 In article <9761@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >>Standard UNIX C still barfs on things like p=-1 . > >No, it doesn't. Yes it does. The c compiler that came with the system VS Gnu-c Script started on Sat Mar 4 02:32:12 1989 % cat tmp.c main() { int p=2; p=-1; printf("%d\n",p); } % cc tmp.c "tmp.c", line 4: warning: old-fashioned assignment operator % a.out 1 % gcc tmp.c % a.out -1 % exit script done on Sat Mar 4 02:32:36 1989 Maybe WPI is just brain damaged :) but so far every UNIX system I have seen here has this problem, so far every PC C compiler has not. Atleast UNIX could have implemented the ANSI Prototypes and gotten rid of this bug. This summer I had to write a program that converted ANSI style C to old fashioned C so it could be run on an HP workstation, the time saved by using ANSI prototypes was worth the effort. Actually it doesn't matter if 'A' is a char or integer it will get casted into whatever is needed any ways. -- /----------------------------------------------------------------------------\ | My opinions are violently objected to by my employer. I was fired last year| | but they forgot to remove my account. Lawrence Foard (entropy) | \----------------------------------------------------------------------------/