RFC: Avoiding #warning (C/C++ preprocessor extension)
nicolasg at snafu.de
Tue Nov 1 15:57:37 GMT 2005
On Tuesday 01 November 2005 13:26, Martijn Klingens wrote:
> On Tuesday 01 November 2005 09:58, Stephan Kulow wrote:
> > And SUSE had to remove -Werror from all well intended KDE packages
> > because gcc4 decided Qt needs way more virtual destructors and warns
> > about it in -Wall now. Just too bad that adding them to Qt3 is binary
> > incompatible. So good bye -Werror
> Doesn't it work if you patch the failing Qt includes with '#pragma GCC
> system_header'? AFAICS that shouldn't affect BC and should suppress the
> warnings and hence the -Werror traps.
That is the kind of things I meant. You have to add a gcc-ism to keep the
compiler calm. But we are supposed to make *portable* code!
I do not think that extra #ifs are better than warnings. (I would even think
the contrary, as it makes the code less readable.)
> See http://gcc.gnu.org/onlinedocs/gcc-3.2.3/cpp/Pragmas.html
Have a nice day!
More information about the kde-core-devel