----- Original Message -----
From: "Grant Edwards" <gra...@visi.com>
To: <mspgcc-users@lists.sourceforge.net>
Sent: Monday, March 20, 2006 6:24 PM
Subject: [Mspgcc-users] Re: How to exit from low power mode?


> On 2006-03-20, Stokes, Mark <msto...@idexcorp.com> wrote:
>
> > That's a silly statement, the build code is exactly the same.
> > One has a warning, one doesn't.
>
> I always set up my Makefiles so that any compiler warning is
> considered an error.  I don't ship code with warnings.  You may
> think that's silly, but I'm convinced that I've prevented quite
> a few bugs by turning on all (or nearly all) of the compiler
> warnings and fixing all of the warnings.
>

I know this is slightly off topic...

I also compile my code with a range of warnings enabled (including -W
or -Wextra, depending on gcc version), at attempt to eliminate all warnings
in the code.  But one that I never manage to completely eridicate is if I
have "-Wunreachable-code" enabled.  This is normally a very useful warning
(it will catch code such as "if (x = 0) ... "), but when combined with
optimisation can give spurious warnings after combining "if" or "switch"
branches.  Have you any ideas how to keep the real warnings without getting
the spurious ones?

mvh.,

David



Reply via email to