[Bug c++/80561] Missed optimization: std::array data is aligned if array is aligned
jzwinck at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue May 2 12:03:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80561
--- Comment #3 from John Zwinck <jzwinck at gmail dot com> ---
I'm aware of the workaround using __builtin_assume_aligned() - you can see I
formulated an equivalent but pure C++ workaround using alignas() in the
aforementioned Stack Overflow post. But 99% of users won't know to do that, so
will pay a runtime cost for a C++ abstraction which is supposed to be free.
More information about the Gcc-bugs
mailing list