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]
Other format: [Raw text]

Re: [PATCH INSTALLED]: Fix -Wc++-compat warnings in toplevel [t-z]*.c files


From: "Andrew Haley" <aph@redhat.com>

Having to cast the return value of malloc-like
functions is the worst offender, and perhaps we should write some
rules that forbid it.  This would require best practice to be
discussed and established, along with some support code.
Andrew.

I don't see casting the return value of malloc-like functions is so terrible. We used to do it when we supported K&R bootstrap compilers if you recall. As far as best practice and support code, isn't that what the libiberty allocators are for?


--Kaveh


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