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]

Re: Even more ObjC cleanup


Stan Shebs wrote:-

> While scanning for error messages to exercise, I noticed that the
> result of xmallocs were being checked for nullness.  Although it's
> reasonable defensive programming, nothing else in GCC does it that
> I could see, and there's no easy way to test the code either, so I
> took out the checks.  Tested on i686-pc-linux-gnu, no regressions in
> testsuite.

As I'm sure you're aware, xmalloc is guaranteed to return non-NULL, so
the checks are pointless.

Neil.


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