This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Even more ObjC cleanup
- To: Stan Shebs <shebs at apple dot com>
- Subject: Re: Even more ObjC cleanup
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Thu, 21 Jun 2001 18:46:30 +0100
- Cc: gcc-patches at gcc dot gnu dot org
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.