On Wed, Aug 03, 2011 at 03:55:39PM +0200, Richard Guenther wrote: > On Wed, Aug 3, 2011 at 3:06 PM, Paolo Bonzini <bonz...@gnu.org> wrote: > > On 08/03/2011 02:46 PM, Richard Guenther wrote: > >> > >> If that's reasonable then adding the malloc attribute should be, too. > > > > Making aliasing stricter for -D_FORTIFY_SOURCE=2 sounds wrong though. > > The patch unconditionally adds malloc_size.
alloc_size, yeah, unconditionally, on the other side it is used just by __builtin_object_size which is used (usually) only for -D_FORTIFY_SOURCE*. I wanted to separate alloc_size attribute issue from malloc (where I'd surely prefer also adding it by default and having an option to disable it for weird C++ sources), because with -D_FORTIFY_SOURCE* or __builtin_object_size one has to request it specially and/or use extensions and thus not be that tighly bound by the standard. Jakub