Re: Program crashes when running it outside dev environment



David Tiktin said:

On 08 Jun 2007, Richard Heathfield <rjh@xxxxxxxxxxxxxxx> wrote:

So my suggestions would be:

1) crank up your warning level to the max
2) turn off any extensions you can live without
3) fix every single diagnostic message, and *never* with a cast

I'm with you right up to the last clause. Are you saying you never
actually *need* a cast?

No, there are (rare) occasions when you do need a cast. But I don't know
of any occasion where you *need* a cast AND omitting it violates a
constraint or constitutes a syntax error. So adding a cast is not the
right way to fix a diagnostic message. If the choice is between adding
bad code and putting up with a bad warning, I'll live with the bad
warning.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
.



Relevant Pages