This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/59898] alignment problems in std::map with avx/avx2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59898

--- Comment #5 from ignat at gmx dot net ---
16 overloadable memory allocation functions??? brave new world!

Nothing against the possibility to have explicit alignment (when you need to
align to a cache line, page or disk-block), but why not just do the right thing
and let new return properly aligned pointers by default as it's supposed to do?
Isn't that the idea of using a typed language in the first place?

Unless I have missed something, I thought the whole point of introducing the
alignof operator is exactly to make this possible for user defined allocators.
And of course nothing has ever prevented the builtin new to return properly
aligned pointers as the compiler internally always has this info. Just because
a standard allows to return misaligned pointers to users doesn't mean the
implementation has to.

ignatius


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]