Boost logo

Boost :

Subject: Re: [boost] [move] [container] workaround for incorrect [-Wignored-attributes]
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2017-09-21 19:20:29


On 20/09/2017 17:25, Groke, Paul via Boost wrote:
> Hi,
>
> we've stumbled over a supposed bug in GCC 6 that generates incorrect [-Wignored-attributes] warnings.
> Using anything in Boost that relies on boost::move_detail::aligned_storage (like boost::container::small_vector), with a small enough type, will trigger this warning when compiling for certain architectures with at least GCC 6.2~6.4. Affected architectures are e.g. SPARC and ARM - not affected are x86 and ARM64.
> GCC bug ticket: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82270
>
> It would be possible to work around this issue by changing the implementation of boost::move_detail::aligned_storage_impl so that the aligned type no longer carries the attribute(aligned) itself, but just contains a member which carries that attribute. If I understand this correctly this should have the same effect (barring compiler bugs).
> Question: Would a pull request for such a change be welcome?

Yes, please

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk