http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53900
--- Comment #7 from Christoph Hertzberg <chtz at informatik dot uni-bremen.de> 2013-01-07 10:19:13 UTC --- (In reply to comment #6) > > __attribute__((aligned(16))) float array[4]; > > Explicitly says the array is aligned to 16 bytes which means it is undefined > by > the C/C++ standard what happens if you a pointer to the struct which contains > this array. As this pointer will always be aligned by definition of the > struct > (and any other use of it is undefined), then by definition > std::ptrdiff_t(array) will always have the lower 8bits be zero. So does that mean that new and std::allocator act undefined for aligned objects? Is there anything wrong with Gael's second test case?