RFC: Avoiding #warning (C/C++ preprocessor extension)
Nicolas Goutte
nicolasg at snafu.de
Tue Nov 1 15:53:10 GMT 2005
On Tuesday 01 November 2005 14:34, Mirko Boehm wrote:
> On Monday 31 October 2005 23:15, Nicolas Goutte wrote:
> > > I would
> > > say that no release tarball should contain -Werror. It may be useful
> > > during development but it would be unnecessarily painful for release.
> >
> > ... so you cannot even have it in development, except if everybody would
> > use the same gcc version.
>
> Why not? It can be used as a standard during development, and removed
> before the release.
>
> On the other hand, I do not see the point. Removing annoying "unused
> parameter" warnings should be a habit, no need to make the compiler barf at
Keeping "unused parameter" warnings is normally a sign that there is a detail
to fix in the code.
(For example, I have a hack in KBabel marked so. Sure I could use a #warning
to do the same (It would be perhaps clearer to everybody) but then -Werror
would break here too.)
> the first point where it encounters it. What is wrong with letting make
> finish the compile, and then removing all the warnings at once?
Indeed warnings of the compiler are supposed to help the developer and not to
turn the compiler into a dictator.
>
> Forcing -Werror is too much of an annoyance, I think.
Yes!
>
> --Mirko.
Have a nice day!
More information about the kde-core-devel
mailing list