RFC: Avoiding #warning (C/C++ preprocessor extension)

Kuba Ober kuba at mareimbrium.org
Mon Nov 7 14:28:13 GMT 2005


On Monday 31 October 2005 17:24, Michael Pyne wrote:
> On Monday 31 October 2005 17: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.
>
> Well the idea is that all of the warnings would be fixed between all of the
> compilers.  i.e. the union of all warning flags would be fixed.  This may
> be unrealistic 

It *is* unrealistic. I have faced it quite often that fixing a warning in one 
compiler (version, ...) would make another compiler barf. There typically was 
no sane way to rewrite the code to compile cleanly on both, short of 
resorting to unportable, ugly hacks or making the code actually worse (i.e. 
not using some C++ feature).

Cheers, Kuba




More information about the kde-core-devel mailing list