Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!oliveb!amiga!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: Why I don't use the newer Lattice compilers Message-ID: <6626@cbmvax.UUCP> Date: 18 Apr 89 21:43:07 GMT References: <11499@s.ms.uky.edu> Distribution: na Organization: Commodore Technology, West Chester, PA Lines: 43 in article <11499@s.ms.uky.edu>, sean@ms.uky.edu (Sean Casey) says: > Not declaring main() as void is perfectly legal C, and shouldn't > generate warning messages. Wrong. That's perfectly legal K&R C, it's perfectly illegal ANSI C. Everywhere I've looked I see that Lattice is telling me that they're trying to be ANSI conformant. It's not all that easy, since they're trying to hit a moving target. And they're nice enough to offer compiler switches that turn off the ANSI conformance warnings. So you've really got nothing to lose and everything to gain with Lattice V5.02. > Turning off warning messages is not a solution, because "normal" warning > messages (such as equivalancing a pointer to int) are useful. I think > the original poster was justified in saying that he wanted a compiler, > not lint. But what compiler? I'd like to think there's been at least a little progress made in the C language sine 1975. If what you want is a 1975 vintage compiler, fine, but I'd think those who make a living writing code, as well as folks like me who write as a hobby but have limited time to devote to the endeavour, have lots to gain by Lattice's warnings. And in reality, you've got nothing to loose, either. All they say is that you're doing something questionable; the code produced is the same code you'd get without the warnings. I firmly believe that if you haven't yet been saved at least 5-10 hours of work by an [ANSI conformant] function prototype at 4AM or so, you either aren't doing any serious C programming, or you should look into prototyping. In 1975 they didn't have many source level debuggers for C, or 68020/68030 systems to run them on, either. That doesn't imply that either of these enhancements, like many of the ANSI rules, are at all a bad idea. And regardless of how stubborn a K&R adherent you are, if you're doing any commercial work, there's an awful good chance that your competition is using these newer tools. If you aren't, you may go the way of the dinosaur or the 8088.... > Sean -- Dave Haynie "The 32 Bit Guy" Commodore-Amiga "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy Amiga -- It's not just a job, it's an obsession