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

swalter at lexmark dot com gcc-bugzilla@gcc.gnu.org
Wed Nov 20 13:46:00 GMT 2013


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

--- Comment #7 from swalter at lexmark dot com ---
(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?



More information about the Gcc-bugs mailing list