-Wall and -Werror are fine when the build system uses them WRT the GCC versions under which they have been tested.

The flags serve a useful purpose if the developer has been polite enough to specify the GCC version under which he released, and if there is some easy way to build without the flags.

I agree that not all software should have to compile without warnings. However, there is a deeply held superstition among managers (and some coders) that no warnings should be allowed in a released product. This reminds me of a 8200 commander who once publicly chastized an officer (Dr. Gabi Leshem) for having a "ברירת מחדל" in his code. The commander stated that he would not tolerate any "מחדלים" in his unit.

 - yba


On Thu, 5 Apr 2012, Nadav Har'El wrote:

Date: Thu, 5 Apr 2012 11:04:32 +0300
From: Nadav Har'El <[email protected]>
To: Baruch Siach <[email protected]>
Cc: ILUG <[email protected]>
Subject: Re: [YBA] kernel compile errors with GCC >= 4.6

On Wed, Apr 04, 2012, Baruch Siach wrote about "Re: [YBA] kernel compile errors with 
GCC >= 4.6":
I would be very much surprised if the kernel could not be built with
gcc-4.6 - this is stock on Fedora, so lots of people must be using it.
Maybe not on PowerPC, though

Recent kernel versions surely have all these warnings fixed. The kernel in
question, I suppose, is quite ancient.

Unless a new compiler or optimizer suddenly became "smarter" and
recognized some new possible mistakes that the previous one didn't.
Or, in the case of this bug (see the link that someone gave earlier in
this thread), that the warning only happens in some rare combination of
#ifdefs, where, for example, some variable is defined but never used.

Since the goal of the user is to *use* the program (not debug it), and
since issues like unused-but-set variables certainly don't prevent
the program from being used, I think it's stupid for the user's
compilation to abort when the compiler discovers such issues

Down with -Wall -Werror!



--
 EE 77 7F 30 4A 64 2E C5  83 5F E7 49 A6 82 29 BA    ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
     - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
_______________________________________________
Linux-il mailing list
[email protected]
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to