[Development] cast ... increases required alignment of target type [-Werror=cast-align]
thiago.macieira at intel.com
Wed Mar 7 17:12:04 CET 2012
On quarta-feira, 7 de março de 2012 19.36.17, Rohan McGovern wrote:
> Thanks, so can we use #pragma GCC diagnostic to selectively silence
> warnings like this? There doesn't seem to be much precedent for it so
> far (just one usage I can find in qatomic.h).
We can do that to silence the warning.
However, the proper solution is to redesign the function in question so that
the bad code never appears on it. The STL solution for this is to use tag
types and indirect via another function call.
João knows all about this and he had a plan to implement this cleaner code at
That's why we need static_if in C++2x :-)
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: not available
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/development/attachments/20120307/1de579e0/attachment.bin
More information about the Development