------- Comment #40 from David dot Monniaux at imag dot fr 2008-11-11 06:24 ------- Yes, at least the manual should be updated to reflect this non-obvious behavior.
Possible fixes for the programmer: 1) Overload operators new. new[] for a class wrapping the vector datatypes. It works as long as you allocate memory through explicit new, however it fails for buffers allocated by STL's default allocator. 2) Overload the allocators for a wrapper class and select a specific allocator for STL arrays etc. of that class. Haven't tried that yet. 3) Replace the global ::new and ::new[] by something calling memalign instead of malloc. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15795