This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug c/54954] malloc optimizations not disabled by -fno-builtin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54954

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to swalter from comment #7)
> (In reply to Andrew Pinski from comment #6)
> > The header file malloc.h  (which is non-standard by the way) has the
> > attribute malloc on the malloc function call.
> > 
> > So this is invalid.
> 
> Sorry, can you spell that out for me?  You're saying that the behavior I'm
> seeing is because I'm using malloc.h for the definition of malloc(), rather
> than stdlib.h?  malloc.h's definition of malloc has __attribute__((malloc)),
> so that allows gcc to perform the optimization even when -fno-builtin in
> thrown?

No I am saying the definition inside both malloc.h and stdlib.h has the
attribute on it which allows gcc to perform the optimization even when
-fno-builtin is used.  My comment about malloc.h being non-standard was an
aside comment and just pointing out the use of a non-standard header.


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