This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC warning options for numerical programs


On Mon, 23 Apr 2012, 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).

Some warnings are about style. There can be one that tells you to add parentheses to make your intent clearer, while if you do add those parentheses another warning will trigger telling you they are useless. Do you really want both of those? (I don't have a specific example in mind, but the existence of -Weverything should certainly not become an argument against adding those)


To me, the main point of -Weverything is as a way to discover new options. It certainly shouldn't be used with -Werror unless you add a number of -Wno-* to compensate, and that list of -Wno-* grows at each release.

Now, whether some -Wspeed or -Wscientific or whatever meta-warning (like -Wall and -Wextra) that groups the options you want makes sense, or some more warnings should be included in -Wextra, is a different debate.

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]