Re: proposal: add -Werror-implicit-function-declaration to the default optflags

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

 



Lubomir Kundrak wrote:
On Mon, 2008-03-24 at 22:03 +0100, Hans de Goede wrote:
Hi all,

This is a new thread spawning from the "3.6% of heads up: Please correct your #includes or optflags use" thread.

I would like to propose to add "-Werror-implicit-function-declaration" to the default optflags. Why? Because missing prototypes can cause all sorts of problems:

You're not the first one with this idea. It's inevitable that this will
happen at some time. But, as was expressed in some other place of this
thread this needs some effort before it's done. It's going to break a
big part of distribution (far more than 3.6%) if it's done now, and
would need serious effort to be done.


I disagree, yes it will probably break a large part of the distribution, but fixing it does not have to be a huge effort. My plan is:
%define optflags "current_optflags -Werror-implicit-function-declaration"
%define lame_optflags "current_optflags"

And the if it turns out an application / lib is rather broken with regards to this and fixing it is non trivial, one can simply do:
export CFLAGS="%lame_optflags"
export CXXFLAGS="%lame_optflags"

Before %configure, and if one is using optflags manually in an other way, simply replace the use of %optflags there with %lame_optflags.

This way:
1) working around the breakage for not trivial to fix packages is easy
2) We can have a script which greps CVS for lame_optflags and reports packages
   which still need proper fixing.

So the effort for doing this does not need to be that big, as long as Matt does some mass rebuilds with the new flags in place to give people early warning of breakage before a mass rebuild during the F-10 cycle, if the F-10 cycle will have a mass rebuild that is.

So, why not create a wiki page, plan how to make this harm the least it
can (limit the number of packages affected by calling for changes before
the rule is enforced), and get it through packaging commitee (or
fesco?).

I could do that, but currently there has been only a little feedback in this thread, so lets discuss this some more first.

Regards,

Hans

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux