Re: GCC warning options for numerical programs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 23, 2012 at 4:15 AM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:
> On 23 April 2012 05:20, Jeffrey Walton wrote:
>> Hi All,
>>
>> http://www.gnu.org/software/gsl/manual/html_node/GCC-warning-options-for-numerical-programs.html
>> recommends the following:
>>
>>     gcc -ansi -pedantic -Werror -Wall -W
>>       -Wmissing-prototypes -Wstrict-prototypes
>>       -Wconversion -Wshadow -Wpointer-arith
>>       -Wcast-qual -Wcast-align
>>       -Wwrite-strings -Wnested-externs
>>       -fshort-enums -fno-common -Dinline= -g -O2
>>
>> Is it possible to efficiently tell which of the above options are not
>> included with -Wall -Wextra?
>
> There are only nine of them, look them up in the manual and see if it
> says "This option is enabled by -Wall"
>
>> Wouldn't -Weverything be easier on folks who really want to know about
>> all errata? Its a helpful Clang switch.
>
> The switches above are not all warnings, a -Weverything would turn on
> a lot more and increase the number of false positives.
I don't think you give GCC and its static analysis capabilities enough credit.

Denying folks based on your personal taste is causing more harm than
good (with all do repsect). The Ostrich Algorithm
(http://en.wikipedia.org/wiki/Ostrich_algorithm) is worse, in my
humble opinion.

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).

Jeff



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux