Date: Sun, 9 Feb 1997 14:13:38 -0500 From: Joel Ray Holveck <joelh@gnu.ai.mit.edu> To: eivind@dimaga.com Cc: wollman@lcs.mit.edu, chat@freebsd.org Subject: Re: cvs commit: CVSROOT avail Message-ID: <199702091913.OAA27166@kropotkin.gnu.ai.mit.edu> In-Reply-To: <3.0.32.19970209193855.00ab2b40@dimaga.com> (message from Eivind Eklund on Sun, 09 Feb 1997 19:38:57 %2B0100)
next in thread | previous in thread | raw e-mail | index | archive | help
>>Is this incorrect? >No, it is correct. However, unless everybody is _very_ careful, it is >likely that we end up with some functions being defined somewhere their >prototype is not in scope. This can cause weirdness. Not with you. I thought that an ANSI definition acted precisely as a K&R definition and an ANSI declaration if the function has not been declared, and K&R definition with checking against the prototype if it has, so an ANSI definition will emit the same code as a K&R definition. The only time we get wierdness is when a function is *called* with its prototype being out of scope. Mind you, I was still learning C during the K&R -> ANSI move, so feel free to tell me that I misunderstood then. >>Although lint was handy in earlier days, I find that most compilers' >>warnings are better now. I typically use `gcc -Wall -W >I'm using a very powerful commerical lint called flexelint - >http://www.gimpel.com for more info. I've never heard of a commercial lint. I'll have to check it out. >It is _way_ better on error reporting than gcc. If gcc had been good >enough, how come machine/endian.h still has a non-paranthesed expression >for NTOHL, just inviting the users to create bugs? :) A point. Compilers will emit warnings wien it's convenient, which usually means spots in the emitted code that are spotty. I'll have to say, although the preprocessor is one of C's nicer features, it also has the potential to introduce a lot of bugs. -- http://www.wp.com/piquan --- Joel Ray Holveck --- joelh@gnu.ai.mit.edu All my opinions are my own, not the FSF's, my employer's, or my dog's. Second law of programming: Anything that can go wrong wi sendmail: segmentation violation -- core dumped
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702091913.OAA27166>
