[Development] cast ... increases required alignment of target type [-Werror=cast-align]
Thiago Macieira
thiago.macieira at intel.com
Thu Mar 15 13:12:43 CET 2012
On quinta-feira, 15 de março de 2012 07.20.09, Atlant Schmidt wrote:
> > -Werror should never be enabled on non-developer builds.
>
> Why not? Is the plan to ship code that contains
> warnings?*
Qt should be always built with -Wall -Wextra, plus maybe one or two non-
standard warnings (candidates are -Wcast-align, -Wshadow, etc.). That's for
everyone:
- Qt developers working on Qt
- other developers building Qt
- other developers building their own apps that use Qt headers
Now, the -Werror flag is only enabled for the first group. We, the Qt
developers, fix those warnings. Other developers, in their course of using Qt,
which may involve building it first, should not have to deal with build errors
caused by warnings.
Warnings change frequently depending on the compiler version and optimisation
settings. New versions of the compilers will produce new warnings that we
hadn't seen before, and old versions we have not tested will produce old
false-positive warnings. For those reasons, enabling -Werror for anyone but us
is a mistake.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120315/9826f66a/attachment.sig>
More information about the Development
mailing list