This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [arm] EABI array cookies
On Tuesday 29 June 2004 14:31, Nick Burrett wrote:
> Paul Brook wrote:
> >>You're missing the documentation for the new hooks again...
> >
> > +@deftypefn {Target Hook} tree TARGET_CXX_GET_COOKIE_SIZE (tree
> > @var{type}) +This hook returns the size of the cookie to use when
> > allocating an array +whose elements have the indicated @var{type}.
> > Assumes that it is already +known that a cookie is needed. The default
> > is
> > +@code{max(sizeof (size_t), alignof(type))}.
> > +@end deftypefn
>
> It would be useful to expand on this to at minimum point the reader to
> further information about these 'cookies' so that they can determine
> whether or not they need to define this target hook.
I've added a bit mentioning that the default comes from the Section 2.7 of the
C++ ABI.
Paul