[Development] [Request] Compiler warnings in Qt
Olivier Goffart
olivier at woboq.com
Sat Dec 7 12:09:14 CET 2013
On Friday 06 December 2013 09:15:47 Thiago Macieira wrote:
> On sexta-feira, 6 de dezembro de 2013 13:41:34, Olivier Goffart wrote:
> > There used to be a 'compilerwarnings' autotest that made sure there was no
> > warning in the headers (in a more strict ways that the warnings we check
> > while compiling Qt itself). But i think it's gone.
>
> I still have a pending change that compiles each and every public header
> independently -Werror and defining the keywords.
>
> None of my builds with Clang or GCC have any warnings. There are a few with
> ICC because it's too eager on warning 177 (unused function).
>
> I have warnings in MSVC's own headers after we started using <algorithms>
> more, so I don't bother with MSVC warnings anymore.
There use to be a compilerwarnings autotest which was removed in qtqa (commit
9d078c8f14, the message commit claims it is a duplicate of headersclean, but
it is not really)
The test was compiling all the public headers with different flags, including
strict warnings such as -pedantic -Wold-style-cast -Woverloaded-virtual - -
Wshadow -Wunreachable-code -Wformat-security and more.
We don't want to be so strict in our own code. But maybe users want to, and
so it make sens to compile headers with stricter warnings that the ones of Qt
itself. (for example we could add -Weffc++ there)
--
Olivier
Woboq - Qt services and support - http://woboq.com - http://code.woboq.org
More information about the Development
mailing list