This is the mail archive of the gcc-patches@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]

Re: [patch]: new returns misaligned pointers


>>>>> Mark Mitchell <mark@codesourcery.com> writes:

 > OK, so are we all agreed then that we should modify this patch so that
 > it only affects those programs that wouldn't have worked before anyhow
 > (because the first array element would have been misaligned)?

Yes.  I think that the right answer for the current ABI is to align the
cookie at MAX(alignof (double_type_node), alignof (array element type)).
For -fnew-abi, I think it can just be alignof (array element type).

Jason


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