[Development] cast ... increases required alignment of target type [-Werror=cast-align]

Atlant Schmidt aschmidt at dekaresearch.com
Thu Mar 15 12:20:09 CET 2012


Thiago:

> -Werror should never be enabled on non-developer builds.

  Why not? Is the plan to ship code that contains
  warnings?*

  This is the sort of thing that destroyed Symbian.
  When I last counted, the Symbian build routinely
  produced more than 7,000 warnings. No one at Nokia
  besides myself seemed to have any concern about
  this nor any real idea what any of those warnings
  represented.

  And when I started tracking them down, I was able
  to prove that at least a few of those warnings (30
  or so, IIRC) were genuine coding failures and at
  least a handful of those were the root cause of
  bugs that were *ALREADY* in the bug tracking system.

  Think of that: If some software engineer had only
  taken the time to fix that (e.g.) "Variable used
  before being initialized" warning, some set of
  users in the field wouldn't be having their
  Symbian phones routinely crashing!

  But amid 7,000+ warnings, what's one more, ehh? ;-)

  All code should build warning free, at least until
  the customer introduces changes. And then, the fact
  that the warning count went from *0* to n will probably
  tip the user off that they just did something wrong,
  whereas a change from 7,397 to 7,398 will probably
  go unnoticed, just like it always did at Nokia.

                          Atlant


* Yes, I understand that in a configurable build,
  eliminating all warnings from all configurations
  is hard work. But that's why we get paid the
  big bucks/Euros/Kroner/etc.


-----Original Message-----
From: development-bounces+aschmidt=dekaresearch.com at qt-project.org [mailto:development-bounces+aschmidt=dekaresearch.com at qt-project.org] On Behalf Of Thiago Macieira
Sent: Wednesday, March 14, 2012 18:15
To: development at qt-project.org
Subject: Re: [Development] cast ... increases required alignment of target type [-Werror=cast-align]

On quarta-feira, 14 de março de 2012 21.37.23, lars.knoll at nokia.com wrote:
> >Possible options:
> >     a.) fix the underlying warning (probably very tough for alpha one)
> >     b.) remove -Wcast-align from the headersclean.pri for the alpha one?
> >     c.) don't mind that qtbase does not compile for MIPS in the alpha
> >     d.) ???
>
> I'd go for (b), but if possible only for MIPS.

Note that most users do not build the tests. So the build will not stop for
them.

-Werror should never be enabled on non-developer builds.

--
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

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.



More information about the Development mailing list