Re: Program crashes when running it outside dev environment



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? Because if you ever really do need one and
forget to put it in and the compiler gives a diagnostic, you're advice
is to... do what? Don't fix it? I'm sure you don't mean that, since
then you'd never compile without any diagnostics! ;-)

4) think.

Dave

--
D.a.v.i.d T.i.k.t.i.n
t.i.k.t.i.n [at] a.d.v.a.n.c.e.d.r.e.l.a.y [dot] c.o.m
.



Relevant Pages

  • Re: Program crashes when running it outside dev environment
    ... fix every single diagnostic message, and *never* with a cast ... the right way to fix a diagnostic message. ... adding bad code and putting up with a bad warning, ... diagnostics are permitted for other code as well. ...
    (comp.lang.c)
  • Re: Question on accessing structure
    ... fix them. ... cast of pointer to non-equal pointer ... So why does gcc and ms vc++ compiler allowing such code to compiler at ...
    (comp.lang.c)
  • Re: Comments please
    ... > int main{ ... When the compiler gives you an error message, ... wrong, and fix it. ... Remove the cast. ...
    (comp.lang.c)
  • Re: Program crashes when running it outside dev environment
    ... fix every single diagnostic message, and *never* with a cast ... cast is not the right way to fix a diagnostic message. ... warning, I'll live with the bad warning. ... Do you think loss of precision diagnostics are "bad warnings"? ...
    (comp.lang.c)
  • Re: Program crashes when running it outside dev environment
    ... fix every single diagnostic message, and *never* with a cast ... need one and forget to put it in and the compiler gives a ... Don't fix it? ... without any diagnostics! ...
    (comp.lang.c)