[lug] C programming Q.

Bear Giles bgiles at coyotesong.com
Wed Apr 17 13:38:37 MDT 2002


> I can bug agree that on *rare* occations one cannot get the code 
> completely warning-free, however it should be tried for whenever 
> possible.

I had a specific situation in mind when I wrote that, but I can't
remember the details.  IIRC I was implementing C++ envelope/letter
polymorphism, but in C instead of C++, and the compiler didn't have
all of the information I had.

What I'm trying to say is that it's true that many people are too
quick to toss up their hands and say that a warning can't be eliminated,
but there really are some situations where the programmer knows more
than the compiler and eliminating the warning is either impossible
or highly undesirable (because it breaks what's actually being done).

But in these cases the warning, and the reason for ignoring it,
should be clearly documented in the code.

Bear



More information about the LUG mailing list