ugkamins@sunybcs.uucp (John Kaminski) (04/13/89)
I think I'm way back at 3.5 or something. One of my friends let me program with his upgraded compiler and I kept on getting warning: function return value mismatch for stuff like main 'cuz I didn't declare it as returning void. Gimmie a break! If I wanted a lint-y compiler, I would toss my disk under my bed after I haven't vacuumed in a while! Or at least I would find a lint program from somewhere and run THAT. I guess I'm of the "UNIX Program- ming Environment" school where the authors mention something about having several programs that do their things well instead of one program trying to do everything.
kg19+@andrew.cmu.edu (Kurt A. Geisel) (04/13/89)
There is a switch, I don't remember exactly what it was, that turns off all that "lint-y" stuff. 4.0 wasn't really worth the upgrade, but I think 5.0 really is. Not only do you get the source-level debugger, but they ACTUALLY got significantly more speed out of it with the optimizer. Still, having 3.5, you would be paying a lot more $$$ to upgrade.... sigh.. - Kurt Kurt Geisel SNAIL : Carnegie Mellon University 65 Lambeth Dr. ARPA : kg19+@andrew.cmu.edu Pittsburgh, PA 15241 UUCP : uunet!nfsun!kgeisel "I will not be pushed, filed, indexed, stamped, BIX : kgeisel briefed, debriefed, or numbered!" - The Prisoner
jgary@ms.uky.edu (James E. Gary) (04/13/89)
In article <5239@cs.Buffalo.EDU> ugkamins@sunybcs.UUCP (John Kaminski) writes: >I think I'm way back at 3.5 or something. One of my friends let me program >with his upgraded compiler and I kept on getting warning: function return >value mismatch for stuff like main 'cuz I didn't declare it as returning >void. Gimmie a break! If I wanted a lint-y compiler, I would toss my disk <....stuff deleted.....> Interesting. You are willing to give up a global optimizer, a symbolic debugger, an integrated editor, a make utlity, precompiled header files, pragmas for library calls, support for making resident programs, support for getting traces from abending programs, a profiler, etc. all because you don't want to see warning messages? Are you aware that there is a switch for turning off warning messages from the compiler? Are you aware that warning messages do not prevent the compiling and linking from continuing? I usually ignore warning messages, probably not a good thing to do, but if they bothered me that much I would just set the switch (don't have my manual at hand or I would elaborate).
sean@ms.uky.edu (Sean Casey) (04/14/89)
In article <11495@s.ms.uky.edu> jgary@ms.uky.edu (James E. Gary) writes: >Interesting. You are willing to give up a global optimizer, a symbolic >debugger, an integrated editor, a make utlity, precompiled header files, >pragmas for library calls, support for making resident programs, support >for getting traces from abending programs, a profiler, etc. all because >you don't want to see warning messages? Warning messages are one thing. Excessive warning messages are another. Not declaring main() as void is perfectly legal C, and shouldn't generate warning messages. If a compiler spat that out at me, I'd want my money back. 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. Sean -- *** Sean Casey sean@ms.uky.edu, sean@ukma.bitnet *** What, me worry? {backbone|rutgers|uunet}!ukma!sean *** ``A computer network should be considerably faster than a slug.'' -Me
riley@batcomputer.tn.cornell.edu (Daniel S. Riley) (04/14/89)
synopsis: does the Lattice C compiler generate too many warnings? In article <11499@s.ms.uky.edu> sean@ms.uky.edu (Sean Casey) writes: >Not declaring main() as void is perfectly legal C, and shouldn't >generate warning messages. If a compiler spat that out at me, I'd want >my money back. Actually, not declaraing main() as void is not a warning. If you don't include <stdlib.h>, it doesn't generate any messages. If you include <stdlib.h>, it generates an "external item attribute mismatch" *error*. This is arguably a bug in <stdlib.h>, which declares main() as type void, not a problem with the compiler itself. >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. Lattice lets you turn off *individual* warning messages. So you can suppress just the ones you don't like, and still get the rest of the warnings. -Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley) -Wilson Lab, Cornell U.
daveh@cbmvax.UUCP (Dave Haynie) (04/19/89)
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