This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch to use concat instead of xmalloc/sprintf for JAVA dir
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: Patch to use concat instead of xmalloc/sprintf for JAVA dir
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Mon, 23 Apr 2001 15:45:17 +0100
- cc: ghazi at caip dot rutgers dot edu, per at bothner dot com, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Organization: ARM Ltd.
- Reply-To: Richard dot Earnshaw at arm dot com
> >>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
>
> Kaveh> Regarding NULL vs NULL_PTR, there is some inconsistency as
> Kaveh> both styles are currently used in calls to concat. However
> Kaveh> NULL_PTR is deprecated according to comments in ansidecl.h
> Kaveh> where it is defined, so I used NULL.
>
> Hmm. I thought we were supposed to use NULL_PTR (like NULL_RTX and
> NULL_TREE). But, I see that on the trunk there is indeed the comment
> you mentioned. So, I think using NULL is correct, and that we should
> stop using NULL_PTR on the trunk.
IIUC, NULL_PTR is useful as a parameter to functions which might not have
a prototype in force. This ensures that the size of the pointer is
correct on targets where pointer size is not the same as sizeof(int).
NULL_PTR has a type, whereas NULL does not.
Of course, most targets that have such behaviour should probably be
enforcing the use of prototypes nowadays...
R.