This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC warning options for numerical programs
On Mon, Apr 23, 2012 at 9:45 AM, Andrew Haley <aph@redhat.com> wrote:
> On 04/23/2012 02:37 PM, Jeffrey Walton wrote:
>> If you don't want to know about potential problems, you don't have to
>> use -Weverything (or -Wall -Wextra). Folks who are interested in all
>> potential problems could use it (if available).
>
> I don't think so, given the variety of odd style warnings.
>
> I'm not even sure that the warnings are compatible with each other!
> Anyone who just turns on *everything* is probably either doing so
> because they're clueless because or a pointy-haired boss said "no
> warnings."
I fall into the later (but I'm not a boss). A clean compile is a security gate.
When I start seeing problems with, for example, -Wconversion, I start
questioning the lack of attention to detail and wonder if I'm dealing
with a lazy or sloppy programmer or someone who has thought each
warning through. I then write a negative test case and usually find
its a sloppy programmer.
Jeff